Phone hit: Spread28/36, Room36, shared test kit and size-tie check #129

Merged
void merged 3 commits from void/phone-hit-foundation into dev 2026-11-13 07:13:33 +00:00
Member

Foundation for the IconButton phone-hit audit (scratch/iconbutton-audit.md), so the later group PRs only add data.

  • PhoneHit.css.ts: PhoneHitSpread28, PhoneHitSpread36, PhoneHitRoom36 (margin-block 4). Room<N> now takes its inline margin from the Spread class of the same size instead of a parameter that could disagree.
  • src/app/phoneHitTestKit.ts (not a test): emitted, rulesFor, iconButtonTags, expectPhoneHitClasses (class per IconButton in source order plus the import-path regex), expectSizeTie. phoneTapTargets.test.ts uses it with every assertion kept; later PRs add src/app/phoneHit.<group>.test.ts.
  • Size tie: a Spread/Room number must equal the drawn px (IconButton size 300/400/500/600 = padding 4/8/12/16, Icon 50..500 = 16/18/20/22/24/28; both default to 400). A size the source does not state needs an allow-list entry (one now: the Message quick-reaction emoji buttons, which wrap Text), and an entry for a derivable size fails.
  • The tie found a real fault: RoomInput's reply-cancel button (16 px icon, size 300 = 24 px) carried Spread32; now Spread24.
  • Margin test pins Spread 24/26/28/32/36/40 = 10/9/8/6/4/2 and Room26/36 block margins 9/4.

Tests, tsc (files touched), eslint and prettier run on a copy outside the workspace; tsc elsewhere reports only matrix-js-sdk import errors from that environment.

🤖 Generated with Claude Code

Foundation for the IconButton phone-hit audit (scratch/iconbutton-audit.md), so the later group PRs only add data. - `PhoneHit.css.ts`: `PhoneHitSpread28`, `PhoneHitSpread36`, `PhoneHitRoom36` (margin-block 4). `Room<N>` now takes its inline margin from the Spread class of the same size instead of a parameter that could disagree. - `src/app/phoneHitTestKit.ts` (not a test): `emitted`, `rulesFor`, `iconButtonTags`, `expectPhoneHitClasses` (class per IconButton in source order plus the import-path regex), `expectSizeTie`. `phoneTapTargets.test.ts` uses it with every assertion kept; later PRs add `src/app/phoneHit.<group>.test.ts`. - Size tie: a Spread/Room number must equal the drawn px (IconButton size 300/400/500/600 = padding 4/8/12/16, Icon 50..500 = 16/18/20/22/24/28; both default to 400). A size the source does not state needs an allow-list entry (one now: the Message quick-reaction emoji buttons, which wrap Text), and an entry for a derivable size fails. - The tie found a real fault: RoomInput's reply-cancel button (16 px icon, size 300 = 24 px) carried Spread32; now Spread24. - Margin test pins Spread 24/26/28/32/36/40 = 10/9/8/6/4/2 and Room26/36 block margins 9/4. Tests, tsc (files touched), eslint and prettier run on a copy outside the workspace; tsc elsewhere reports only matrix-js-sdk import errors from that environment. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Phone hit tests: shared kit, size tie, pinned new variants
All checks were successful
Build pull request / Build pull request (pull_request) Successful in 2m11s
d917ccd3bb
The helpers moved to phoneHitTestKit.ts so each later group adds its own phoneHit.<group>.test.ts. A new
check ties PhoneHitSpread<N>/Room<N> to the px the button draws (IconButton size padding + Icon size); a size the
source does not state needs an explicit allow-list entry. It found RoomInput's reply-cancel (16 px icon, 24 px
button) carrying Spread32; it is Spread24 now. Room<N> takes its inline margin from the Spread class of the same
size, so the two axes cannot disagree.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Phone hit kit: pin Room composition, spread props are undetermined, tighter tag match
All checks were successful
Build pull request / Build pull request (pull_request) Successful in 4m4s
fe12d8a4b1
Room<N> throws when no Spread of its size exists, and a test reads the compiled class lists to prove Room<N>
composes Spread<N> and PhoneHit. Props spread into an IconButton or Icon make the size undetermined (allow-list
entry required). <IconButton and <Icon match only before whitespace, > or /. iconButtonTags derives from iconButtons.
expectSizeTie fails on a file with no IconButton. Fixture tests live in phoneHitTestKit.test.ts.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
void merged commit 54ac1ba480 into dev 2026-11-13 07:13:33 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
GameCult/Ratatoskr!129
No description provided.