Skip to content

ADR-0082: Sheets, the thumb bar, and a phone's tables

Status: Accepted, amended by ADR-0085 (a phone's bar without the mark), and by ADR-0092 (the sheet's handle; the bar and the tray) Date: 2026-10-27 Deciders: Alex Nodeland Amends: ADR-0080 (the small screens)

Context

The design pass (ADR-0080, ADR-0081) gave a phone its fundamentals: targets a finger can hit, fields a phone won't zoom, safe areas, nothing wider than the page. It left what floats as it was: a menu, a popover and a dialog placed by the pointer or centred, which a thumb reaches badly and the on-screen keyboard covers; a question far up the thread that must be scrolled back to; tables cut off; and the 44px rules held by reading the stylesheet, since the test browser could not be told its pointer was a finger. The owner asked for the rest, in a pull request of its own, with the app's initial budget untouched.

Decision

  • What floats sits as a sheet on a phone. Where the window is narrow and a finger is a pointer ((max-width: 48rem) and (any-pointer: coarse), the phone: variant), a dialog, a confirm, a menu, the account menu and a popover sit along the bottom of the window, the full width to 36rem and centred past it (a tablet held upright is inside the variant), rounded at the top, with a handle, sliding up and down (not where motion is reduced), scrolling inside themselves past most of the window's height, keeping the home indicator and, turned on its side, the notch's edge clear, and keeping their scroll to themselves. Each stays what it was: a dialog with its focus kept in and brought back, closed by Escape and its backdrop; a menu with its items and arrow keys. A popover, which floats free of the page on a desk, is modal as a sheet: the page behind neither scrolls nor takes the focus, under the scrim, with a Done to leave by. Admin's toolbar forms that make something open as such a dialog on a phone rather than a card beneath the row; its filters stay cards, so what they find is seen as it is typed, and a form keeps what was typed when the phone turns through the width where one becomes the other. The look is classes alone, in the initial stylesheet, so a mouse pays only for the rules.
  • The drag is loaded when a sheet opens. The touch module (on-demand/touch.ts) holds the sheet's drag and the on-screen keyboard's inset. The drag is by the handle alone, a band a finger can hit, shown once the drag listens: dragged past a third of the sheet's height or flicked, the sheet closes from where it was let go; let go sooner, or when the browser takes the gesture to scroll, it springs back. The sheet follows the finger through a custom property the popup's own rule reads (a dialog's popup, or a menu's or popover's inside its positioner), so its place's transform is never fought. A confirm, which an alert's backdrop doesn't close, isn't dragged away either. The module is an add-on chunk, imported the first time a sheet opens on a phone (the keyboard's inset, the first time a composer's dock is on a page with a finger), so a mouse never loads it; it is measured under the app's add-ons as touch and counts toward neither of the app's own totals, as every add-on does; a load that fails is asked again.
  • The keyboard. The viewport asks the browser to resize the page for the on-screen keyboard (interactive-widget=resizes-content); where it doesn't, the touch module keeps --keyboard-inset on the root at the height the visual viewport says the keyboard covers, and the composer's dock sits above it, so Send is never under the keyboard or the home indicator. A pinch zoom shrinks the visual viewport too and is no keyboard: nothing is kept then. While the keyboard is up the root is marked, and the dock drops the room it keeps for the home indicator, which the keyboard covers.
  • The thumb bar. On a phone, the active request's next step sits in the composer's row within the thumb's reach: a question's Next, then its Answer; a plain approval's Approve, and only a plain one: a reviewed approval is never mirrored, as it is read before it is given, never a press away on the bar. The card marks the button to mirror (data-thumb-action); the bar's button presses it, so the handlers are the card's, and the bar is hidden from assistive technology, which reaches the card's own: one tab stop. Its words and its disabled state follow the card's. It gives way while the card's own button is on screen, while the keyboard is up, and in a short window, so what is pinned never covers most of the page: on a 667px phone the composer's row, bar and all, is a quarter of the window at most.
  • Tables on a phone. An item table was already a list of cards on a phone (ADR-0021). What scrolls sideways, a table in a message or a note or a block of code, shows it on a phone: a shadow at each edge that is scrolled past, drawn by the stylesheet alone. The shadow is the text's colour thinned, so it is seen on a dark surface too, and none under forced colours; the covers take the box's own colour. The kit's own table pins its first column as the rest scrolls, no wider than a third of the window and with an edge of its own; a Markdown table, which has no row headers, scrolls whole.
  • Coarse, and a phone. useCoarsePointer asks any-pointer: coarse rather than hover: none: a touch laptop with a mouse plugged in hovers, yet its screen is still pressed, so what a finger must hit (the 44px floor, a long press) follows the finger, while the coarse: variant, the look where nothing hovers, stays hover: none. A sheet's drag is a phone's alone (usePhone: narrow and coarse), never a touch laptop's or a tablet's floating popover.
  • A finger measured. The kit's tests gain a touch project, and the app's and admin's a phone project in each scheme: Chromium as a phone (a finger, a narrow window, twice the scale), running the *.touch.test.tsx files alone, so the 44px floor, the 16px fields, the sheets, the thumb bar and the keyboard's inset are measured on the routes themselves, not read from the rules. Where any pointer is coarse (any-pointer, so a touch laptop with a mouse plugged in counts), admin's compact rows reach 44px too and hold at 36px for a mouse alone. The app's and admin's own routes, the sign-in page among them, are held never wider than the page at 320, 360, 390, 430 and 768, and a thread at 200% text (WCAG 1.4.4; the 320px case is 1.4.10's reflow).
  • Not done, and why. Swiping a thread's row for its actions is not built: it costs a gesture layer and a menu mirror for what a long press and the row's menu already give. A real device is still not in the loop: emulation stands in for it, the on-screen keyboard is a visual viewport the tests shrink by hand, and the drag's gestures are pointer events dispatched by the tests rather than a finger's.

Consequences

  • The app's initial chunk carries the sheet classes and the thumb bar; the drag and the keyboard inset are an add-on. The budget's add-on line for touch is new. The app's total ceiling rises from 475,000 to 485,000 gzipped bytes (the owner approved the 10 KB on 2026-10-27): the sheets and what mounts them sit in chunks the lazy routes share, and the ceiling had under a kilobyte left; it is a ceiling, not a target. The app's initial ceiling rises from 203,000 to 203,500 gzipped bytes (the owner approved it on 2026-10-27): the phone's stylesheet, the sheets' rules and a scrolled table's shadows and pinned column, is about 625 bytes of the first load's CSS, and with the streaming turn (ADR-0083) main had 328 bytes left; measured 203,356 after the rebase. Admin's 225,000 and the canvas's 165,000 are not raised.
  • Every floating surface's screenshot moves on a phone; the desktop baselines don't.
  • A kit of its own gets the sheets through the same classes, as they take the kit's radii and shadow.