Skip to content

ui-react: the viewer's Preview/Raw pills and the dismissal-reason chips still draw a 44px pill #3531

Closed

Description

@schlessera

Context

#3252 established compact control paint with 44px effective touch targets through .bk-hit. The file viewer's Preview/Raw pills and the Actions dismissal-reason pills still draw visibly enlarged controls.

Verified at main 1619741f291f525d17cde4970a5ada40644117c1:

  • (FilterRowProps, packages/ui-kit/src/rows/FilterRow.tsx:45-51) has no reach policy; (const row, packages/ui-kit/src/rows/FilterRow.tsx:68-74) clips with overflow: hidden.
  • (<div className=, packages/ui-react/src/components/files/file-viewer-frame.tsx:76-76) forces Preview/Raw tabs to 44px boxes.
  • (function DismissConfirm, packages/ui-react/src/components/activity/durable-actions.tsx:453-485) renders raw pressed chips with min-h-11; kit Chip remains non-interactive.
  • The binding reach and neighbour-gap rules are in docs/decisions/design-kit/components-and-interactions.md, “One hit-area utility reaches 44px past the paint (ui-react: controls inflate their visible box to 44px instead of extending the tap target past the paint #3252)” and its follow-on.

The existing design brief supplies 320px/1280px mocks, spacing, edge probes and alternatives. Its opt-in recommendation is superseded by the ruling below.

Maintainer decision — 2026-11-08

Approve the compact-paint design with reach enabled by default for every interactive FilterRow pill. No caller opt-in is required. This provides broader touch coverage and makes a complete caller audit part of the implementation, rather than a later follow-up. Decorative pills remain non-interactive.

  • Preview/Raw uses existing FilterRow paint (about 20.5px tall) and effective 44px targets under any-pointer: coarse; fine-pointer paint remains compact.
  • Every interactive FilterRow caller must be checked for clipping, narrow labels, wrapping, focus and neighbour overlap before the default ships. With the brief's 6px horizontal gap, each pill needs at least 38px paint width or adjusted spacing/width that meets the same non-overlap rule. Do not assume every caller already satisfies this.
  • The viewer follows the proposed non-clipping vertical reach and 20px coarse-pointer wrapped-row gap, removing its 44px tab-box overrides. Horizontal clipping and inset focus must still be verified.
  • Dismissal reasons use the existing kit pill geometry (about 29.5px tall) on raw aria-pressed buttons with .bk-control.bk-hit; kit Chip stays non-interactive. Wrapped rows use 16px coarse-pointer gaps. Accessible names, pressed state and independent actions remain intact.
  • The 44px floor, coarse-pointer condition and neighbour-gap rule remain binding. A caller must be corrected to meet them; default reach is not permission to overlap another target.

Scope

Finish this design-record task: append the approved ruling to docs/decisions/design-kit/components-and-interactions.md, identify the older opt-in proposal as superseded for FilterRow, and scope a separate implementation issue covering the default behavior, all interactive FilterRow callers, viewer toolbar and dismissal chips.

Out of scope

Acceptance criteria

  • The design-kit record contains the dated maintainer ruling, chosen paint sizes, default interactive FilterRow reach, spacing/clipping/focus requirements and rationale for rejecting the opt-in branch.
  • Preserve/link the 320px and desktop mocks in the existing brief, explicitly applying its geometry to the default-reach branch.
  • Create a separate implementation task with a complete inventory/audit requirement for all interactive FilterRow callers, including library stories and application consumers, plus the viewer and dismissal-chip changes.
  • That task requires actual browser proof at 320px/1280px with coarse and fine pointers: each 44px target reaches all four edges, adjacent/stacked targets do not steal clicks, keyboard/focus/pressed behavior remains correct, and late/wrapped layouts are covered. Include a deliberate reach/spacing mutation that fails the intended assertion, then passes after restoration.
  • The implementation task assesses the selected public component behavior against docs/integration-contract/package-api.md, requires relevant contract/schema/API-report updates if applicable, and requires a published-behavior changeset.

Verification

For this task, review the durable record against this ruling and the linked brief; verify the separate implementation issue has checkable scope, exclusions, acceptance criteria and browser/mutation proof requirements. Run the documentation/citation checks and lint appropriate to the record change. Runtime/browser results belong to the implementation task and are not claimed by this decision.

Contract impact

This task records the design and scopes implementation. No opt-in reach prop is required by the chosen branch. The implementation must assess the default public component behavior under the package-API contract and apply CONTRACT:/documentation/versioning rules where required.

Refs #3252

2026-11-08 decision reconciliation: the maintainer selected default reach rather than the brief's opt-in recommendation. The body now makes the complete caller audit mandatory, preserves the separate implementation-task boundary, and is ready for the remaining record/scoping work. No runtime change or browser qualification is claimed.

Activity

  1. schlessera commented on Nov 3, 2026

    @schlessera
    OwnerAuthor

    Design needed. The hit-target rule is settled: paint stays small and the target reaches 44px. What isn't settled is the visual size of two pills that have no kit primitive. One sits in a clipping strip, so it cannot reach without a layout or kit change. The code can't choose between growing the strip, adding an interactive chip size, or keeping 44px as the design.

    Read first:
    - docs/decisions/design-kit/components-and-interactions.md: the hit-target rule (line 62), "One hit-area utility reaches 44px past the paint (#3252)" and its 2026-11-03 follow-on (line 1277), D27 (pseudo-element vs negative margin), D55
    - packages/ui-kit/src/rows/FilterRow.tsx:68-71 (strip clips with overflow: hidden), pill style ~line 100
    - packages/ui-react/src/components/files/file-viewer-frame.tsx:76 (forces pills to 44x44)
    - packages/ui-react/src/components/activity/durable-actions.tsx:465-478 (dismissal-reason chips, min-h-11)
    - packages/ui-kit/src/tokens.css `.bk-hit`
    
    Problem: the viewer's Preview/Raw FilterRow pills and the Actions dismissal-reason chips draw a visible 44px pill to meet the touch floor.
    
    Design:
    1. Viewer Preview/Raw: keep FilterRow pills at their kit paint and let them reach (which needs FilterRow's strip not to clip, or padding to absorb the reach), use a different kit control (for example a segmented control), or rule 44px as this toolbar's design?
    2. Dismissal-reason chips: what is the visual size of a pressable chip? Should the kit gain one, or should these become Buttons or ChoiceOptions?
    3. For each choice: the neighbour gaps at 320px under a coarse pointer, so no target overlaps another.
    
    Requirements to hold: a 44px target under any-pointer: coarse; the neighbour rule (gap >= sum of the two reaches); focus rings per #1775 (bk-control-inset in clipping strips); 320px legibility; accessible names unchanged; no new seam unless a second use exists.
    
    Deliverable: one ruling per site, with ASCII mocks at 320px and 1280px. "Keep 44px, documented as the design" is an acceptable outcome for either site.
    
  2. added
    type: fixSomething is broken and must behave the way it is documented.
    area: ui-reactReact chat/files/voice components, stores, WebSocket transport.
    area: ui-kitThe presentational design kit: components, tokens, Storybook, visual baselines.
    needs: designBlocked on a design drop or a visual answer.
    on Nov 3, 2026
  3. uploads-sh commented on Nov 3, 2026

    @uploads-sh

    3531-pills-320-1280.png
    Preview/Raw pills and dismissal-reason chips: kit paint with 44px reach at 320 and 1280 · after

    View on uploads.sh

    uploads put <file> --issue 3531 · docs

  4. schlessera commented on Nov 3, 2026

    @schlessera
    OwnerAuthor

    Design brief: Preview/Raw pills and dismissal-reason chips

    Ruling in one line: neither site keeps a 44px paint. Both paint at an existing kit size and reach 44px under any-pointer: coarse. The viewer needs one additive FilterRow prop. The Actions chips need no kit change.

    3531-pills-320-1280.png

    Dashed boxes are the 44px targets under a coarse pointer. Under a fine pointer the target is the paint, as #3252 already rules.


    1 · Viewer Preview/Raw → FilterRow pills reach

    Visual size: the kit FilterRow pill, unchanged: 4px 10px padding, 10.5px/1 type, 1px border, 20.5px tall. Preview is about 67px wide and Raw about 43px.

    How it meets 44px:

    1. FilterRow gains an optional reach?: boolean, mirroring Button.reach (additive, CONTRACT:).
    2. With reach, the strip goes from overflow: hidden to overflow-x: clip; overflow-y: visible. With clip, the other axis stays visible and does not compute to auto. The strip still clips horizontally, so nothing about horizontal overflow changes. Paint is identical, because pills never overflow vertically.
    3. With reach, each interactive pill adds .bk-hit. Vertical reach is (44 − 20.5) / 2 = 11.75px per side. Horizontal reach is 0 for pills 44px or wider, and 0.5px for Raw.
    4. Focus keeps bk-control-inset, because the strip still clips at its left and right ends (ui-kit: fix focus frames clipped by rounded containers across the UI #1775).
    5. The viewer drops its [&_[role=tab]]:min-h-[44px] min-w-[44px] wrapper overrides and passes reach.

    Neighbour gaps (coarse):

    Edge Gap Sum of reaches OK
    Preview ↔ Raw (6px strip gap) 6 0 + 0.5 ✓
    Pill ↔ Share or Copy (gap-x-4) 16 0 + 0 (44px boxes) ✓
    Pill ↔ toolbar edge (py-3) 12 11.75 ✓ (stays inside the toolbar)
    Pill ↔ wrapped line above (gap-y-3) 12 → 20 11.75 + up to 7.8 (a reaching sm control, e.g. an untrusted-mark Button) ✓ only with the change

    So the toolbar adds any-pointer-coarse:gap-y-5. The fine-pointer layout does not change.

    Caller rule (goes in the reach doc): with the 6px strip gap, the horizontal reach on each side must be ≤ 3px, so every interactive pill in a reaching row must be at least 38px wide. Preview and Raw pass. The kit story asserts the theft at a 36px pill, as NarrowGapStealsTheClick does.

    320, coarse, with Share
    ┌────────────────────────────────────┐
    │ [▢]  trip-notes.md           [⧉]   │  44px boxes
    │      notes/odyssey/trip-not…       │
    │                                    │  row gap 20 (coarse)
    │ [⇪]   (Preview)( Raw )             │  pills 20.5 paint, 44 target
    └────────────────────────────────────┘
    
    1280
    ┌──────────────────────────────────────────────────────────────┐
    │ [▢] trip-notes.md                       [⧉] [⇪] (Preview)(Raw)│
    │     notes/odyssey/trip-notes.md · 4.2 KB                      │
    └──────────────────────────────────────────────────────────────┘
    

    Rejected:

    • A segmented control. The kit has none, and a new seam needs a second use, which doesn't exist.
    • Keeping 44px as the design. A 44px pill around 10.5px type is what this issue is about. Nothing else in the toolbar draws a pill that tall.
    • Padding the strip to absorb the reach. That changes the paint for every FilterRow and grows the toolbar line by 23px under fine pointers too.

    2 · Dismissal-reason chips → kit pill geometry plus .bk-hit

    Visual size: the kit Chip variant="pill" geometry: 6px 12px padding, 11.5px/1.35 type, radius 999, 29.5px tall. The current 12px text-xs steps down 0.5px to the kit size. Colour, pressed state (aria-pressed) and accessible names (label plus aria-description) stay as they are.

    How it meets 44px: keep the documented raw-button: select element. Kit Chip stays non-interactive. Change the class from bk-row to bk-control bk-hit:

    • bk-control, because a pill is control-shaped, as FilterRow and SuggestionChips already rule. The focus ring is outside at +2. The group has no clipping, so nothing cuts the ring.
    • bk-hit reaches (44 − 29.5) / 2 = 7.25px per side vertically. Every chip is wider than 44px, so there is no side reach.
    • Drop min-h-11.

    Neighbour gaps (coarse):

    Edge Gap Sum of reaches OK
    Chip ↔ chip, same row 8 0 + 0 ✓
    Chip row ↔ wrapped row 8 → 16 7.25 + 7.25 = 14.5 ✓ only with the change
    Chips ↔ DispositionBar (via the hint line) 8 + ~14 + 8 7.25 + ≤ 7.8 ✓

    So the group adds any-pointer-coarse:gap-y-4, the row gap #3533 already uses.

    320, coarse (card inner ≈ 290)
    ┌──────────────────────────────────┐
    │ Dismiss this decision?           │
    │ (Don't ask again) [Wrong call]   │  29.5 paint, 44 target
    │                                  │  row gap 16 (coarse)
    │ (Need more info) (No longer rel…)│  may wrap to 3 rows
    │ Optional feedback. A reason …    │
    │ [   Dismiss   ] [    Keep    ]   │
    └──────────────────────────────────┘
    
    1280 (detail pane, max-w-3xl): one row, 8px gaps
    │ (Don't ask again) [Wrong call] (Need more info) (No longer relevant) │
    

    Rejected:

    • A kit interactive Chip. That would be the only pressable chip, so it fails the no-new-seam rule. If a second pressed chip appears, promote this one then.
    • ChoiceOption rows. They read as a required, effectful choice. That would stack four full-width rows in a confirmation whose copy says the reason "never grants or stops anything".
    • Buttons. Button has no pressed state.

    For the implementation task (agent-ready)

    • ui-kit: FilterRow.reach, x-clip/y-visible when set, .bk-hit on interactive pills, the doc rule (pills ≥ 38px wide), a story plus an elementFromPoint edge probe. Changeset and a package-api.md entry.
    • ui-react: file-viewer-frame.tsx (drop overrides, add reach and any-pointer-coarse:gap-y-5). durable-actions.tsx DismissConfirm (pill geometry, bk-control bk-hit, any-pointer-coarse:gap-y-4).
    • Extend hit-reach.app.pointer.tsx with the viewer toolbar (markdown file, with and without Share) and the dismiss confirm, at 320 and 1280.
    • Design-kit record: replace the two "no kit size" lines in the 2026-11-03 follow-on with this ruling.

    Open decision

    • P1. Should FilterRow reach by default? This brief makes reach opt-in, as Button.reach is, so no other FilterRow row changes without being checked. The other choice is to turn it on for every interactive pill. That also brings the other interactive FilterRow callers up to the touch floor (they haven't been audited here), but it needs every row to meet the 38px-wide rule first. Recommendation: opt-in now, and audit the other callers in a follow-up.
  5. added
    needs: decisionBlocked on a maintainer or designer ruling, not on code.
    priority: p2Wanted, not scheduled. Pulled in when a milestone has room.
    and removed
    needs: designBlocked on a design drop or a visual answer.
    on Nov 3, 2026
  6. schlessera commented on Nov 8, 2026

    @schlessera
    OwnerAuthor

    Decision (maintainer, 2026-11-08): Approve the compact-paint design with reach enabled by default for every interactive FilterRow pill, rather than opt-in.

    Audit every interactive caller before shipping, correcting narrow pills, clipping and neighbour/wrapped-row gaps so each coarse-pointer target reaches 44px without overlap. The viewer uses the brief's compact FilterRow paint; dismissal reasons use kit pill geometry plus .bk-control.bk-hit on their existing raw pressed buttons. Fine-pointer visuals and Button's opt-in policy remain as ruled.

    This supersedes P1's opt-in recommendation in the design brief. The body now selects default reach and gives the remaining design-record/scoping task complete acceptance criteria, including a separate implementation issue with all-caller browser/mutation proof. No other needs: label remains, so this issue is agent-ready for that record/scoping work; runtime implementation is not claimed.

  7. added
    agent-readyContext and acceptance criteria are complete enough for an agent to take this unattended.
    and removed
    needs: decisionBlocked on a maintainer or designer ruling, not on code.
    on Nov 8, 2026
  8. added
    priority: p1Scheduled into the current or next milestone.
    and removed
    priority: p2Wanted, not scheduled. Pulled in when a milestone has room.
    on Nov 10, 2026
  9. schlessera commented on Nov 10, 2026

    @schlessera
    OwnerAuthor

    2026-11-10 triage at main 3aadc8df5: raised from priority: p2 to priority: p1. Following the maintainer's 2026-11-10 approval of the GitHub component design, #3800 (p1) is now Blocked by #3531: its PR tabs keep FilterRow, and the 44px touch-target criterion depends on this fix. The repository rule says a blocker carries at least the priority of every issue it blocks, so this issue rises to match. The scope and acceptance criteria are unchanged.

  10. added this to the 0.45.0 milestone on Nov 16, 2026
  11. schlessera commented on Nov 16, 2026

    @schlessera
    OwnerAuthor

    Milestoned 0.45.0 (maintainer, 2026-11-16): this blocks #3800, which blocks #3795, both part of the GitHub support shipping in 0.45.0 (epic #3791).

  12. self-assigned this
    on Nov 16, 2026
  13. schlessera commented on Nov 16, 2026

    @schlessera
    OwnerAuthor

    Claimed for implementation. Claim token: claim-3a374c49. Branch: docs/3531-filterrow-default-reach-record.

    collisions: see report at claim time; doc-only record change

  14. schlessera commented on Nov 16, 2026

    @schlessera
    OwnerAuthor

    Delivered in #4087, squash 05bf0d6a0 on main (claim claim-3a374c49).

    Proof: check:pr passed at the merged head. The candidate confirmation run was 43878205226. No runtime behaviour is claimed here; that belongs to #4086.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

agent-readyContext and acceptance criteria are complete enough for an agent to take this unattended.area: ui-kitThe presentational design kit: components, tokens, Storybook, visual baselines.area: ui-reactReact chat/files/voice components, stores, WebSocket transport.priority: p1Scheduled into the current or next milestone.type: fixSomething is broken and must behave the way it is documented.

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions