Repository navigation
chrome C8a: the explanation as a bottom sheet on a phone - #567
Merged
Merged
Conversation
Contributor
|
Web preview removed: the pull request is closed. |
sf624
added a commit
that referenced
this pull request
Nov 1, 2026
…ng, the new height said once, the focus home at full) - fitsRow (web/layout.ts): a form fits when no item runs past the row's end padding; scrollWidth alone let the pill run up to 10 px into the padding, under the edge's swipe strip (390 px en, 360 px ja). One check for the sheet's row, the desktop panel header and the editor's header (C5). - Tests: a tap at the inner edge of the row's last control finds it, and the row's boxes keep 12 px from the edges; the desktop header never runs into its end padding. - The grabber's new height is said once, in the page's live region; its name waits while it has the focus. - focusHome gives the grabber while the sheet is full (the editor is inert). - overscroll-behavior on the pane did nothing: removed, and the real guards tested. The hit-area check leaves out the grabber only. - Docs: Collapse and Copy as Markdown on a phone (details file), decision 11's note pending the maintainer's agreement. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sf624
added a commit
that referenced
this pull request
Nov 1, 2026
…alue at once; one source for the editor's and the explanation's stops) - The grabber is a slider (role="slider", vertical, values 0 to 2 with the height in words), named once: its value is set at once, never stale while it has the focus. Enter cycles in `keyed`. Chromium's accessibility tree, as CDP shows it, has the number but an empty valuetext (also for a native range input), so the live region still says a new height, once. - paneStops (web/main.ts): where the editor's and the explanation's stops are while they are inert (the settings sheet side by side; the grabber at full for the editor, folded for the explanation). focusHome and F6 read it; the sheet's `folded` and `covers` also drive `inert`. - Tests: the slider in the accessibility tree at every change; F6 at full, folded and half. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On a phone, and on a touch screen held upright up to 1024 px, the explanation is a sheet over the editor at three heights (peek, half, full). Its header is one 48 px row: the tabs Explanation (with "Ln 8"), Problems (counts by level) and Reference, and the view pill. The header is the grabber: a tap cycles the heights, a drag settles by position and speed (src/ui/sheet.ts), the grabber button takes the arrow keys. At full the app bar slides away. Read | Edit moves into the strip above the editor. Problems is a tab; toasts sit above the sheet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ng, the new height said once, the focus home at full) - fitsRow (web/layout.ts): a form fits when no item runs past the row's end padding; scrollWidth alone let the pill run up to 10 px into the padding, under the edge's swipe strip (390 px en, 360 px ja). One check for the sheet's row, the desktop panel header and the editor's header (C5). - Tests: a tap at the inner edge of the row's last control finds it, and the row's boxes keep 12 px from the edges; the desktop header never runs into its end padding. - The grabber's new height is said once, in the page's live region; its name waits while it has the focus. - focusHome gives the grabber while the sheet is full (the editor is inert). - overscroll-behavior on the pane did nothing: removed, and the real guards tested. The hit-area check leaves out the grabber only. - Docs: Collapse and Copy as Markdown on a phone (details file), decision 11's note pending the maintainer's agreement. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…alue at once; one source for the editor's and the explanation's stops) - The grabber is a slider (role="slider", vertical, values 0 to 2 with the height in words), named once: its value is set at once, never stale while it has the focus. Enter cycles in `keyed`. Chromium's accessibility tree, as CDP shows it, has the number but an empty valuetext (also for a native range input), so the live region still says a new height, once. - paneStops (web/main.ts): where the editor's and the explanation's stops are while they are inert (the settings sheet side by side; the grabber at full for the editor, folded for the explanation). focusHome and F6 read it; the sheet's `folded` and `covers` also drive `inert`. - Tests: the slider in the accessibility tree at every change; F6 at full, folded and half. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…as not the focus A screen reader says the focused slider's new value (aria-valuetext) itself: with the live region too, each key was said twice. A tap or a drag from elsewhere is still said once; a resize says nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…line goes; decision 11 on a phone) - sheetForms: after "Ref", the Problems tab keeps its highest level only, and only then the line goes. With CI's fonts and the sample, the row keeps "Ln 8" from 360 to 430 px in English and Japanese. The tab's name keeps every count. - The Problems-tab test is back at 390 px in English (44 px to spare). - Decision 9 has the new order, decision 11 the agreed phone form (2026-11-01). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sf624
added a commit
that referenced
this pull request
Nov 1, 2026
…ng, the new height said once, the focus home at full) - fitsRow (web/layout.ts): a form fits when no item runs past the row's end padding; scrollWidth alone let the pill run up to 10 px into the padding, under the edge's swipe strip (390 px en, 360 px ja). One check for the sheet's row, the desktop panel header and the editor's header (C5). - Tests: a tap at the inner edge of the row's last control finds it, and the row's boxes keep 12 px from the edges; the desktop header never runs into its end padding. - The grabber's new height is said once, in the page's live region; its name waits while it has the focus. - focusHome gives the grabber while the sheet is full (the editor is inert). - overscroll-behavior on the pane did nothing: removed, and the real guards tested. The hit-area check leaves out the grabber only. - Docs: Collapse and Copy as Markdown on a phone (details file), decision 11's note pending the maintainer's agreement. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sf624
added a commit
that referenced
this pull request
Nov 1, 2026
…alue at once; one source for the editor's and the explanation's stops) - The grabber is a slider (role="slider", vertical, values 0 to 2 with the height in words), named once: its value is set at once, never stale while it has the focus. Enter cycles in `keyed`. Chromium's accessibility tree, as CDP shows it, has the number but an empty valuetext (also for a native range input), so the live region still says a new height, once. - paneStops (web/main.ts): where the editor's and the explanation's stops are while they are inert (the settings sheet side by side; the grabber at full for the editor, folded for the explanation). focusHome and F6 read it; the sheet's `folded` and `covers` also drive `inert`. - Tests: the slider in the accessibility tree at every change; F6 at full, folded and half. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Step C8a of docs/design/chrome-redesign.md ("The sheet"). C8b (the keyboard and the peek's summary row) follows; no release between them.
What users see
overscroll-behavior: contain. Reduced motion: no animation.The rule (src/ui/sheet.ts, unit-tested in test/sheet.test.ts)
snapHeights(peek = row + edge + safe area; half = 55% of the window; full = up to the strip),settle(≥ 0.5 px/ms: next height that way; else nearest to where 150 ms of speed carries it),tapped,keyed,sheetForms(tools under icons → no tools → "Ref" → no line → highest level only),problemCounts.Plan changes (recorded in the C8a Done note)
bottom-sheet(.sheetis the menu/settings dialogs). Upright =screen.orientation, so the keyboard cannot turn the sheet off. A phone in desktop-site mode gets no sheet.pointer-events: none); the header takes taps and drags; the chosen tab is the 44 px tap target. The hit-area check now skips pass-through controls (test/support/hit-areas.ts) and measures the phone at all three heights.#menu-copy-md, shown only then).snug/noline/icons/compactsteps and per-language widths were the prototype's; main never had them.Real-device checks for this PR (section 8)
3 (drag, no pull-to-refresh), 4 (thumb taps on grabber/tabs/pill), 5 (app bar at full), 6 (safe areas, Safari's bottom bar), 9 (chip sheet and settings at full), 10 (130% text), 11 (landscape, iPad upright/turned), 13 (reduced motion), 14 (VoiceOver/TalkBack: sheet, tabs with full counts, chip). Checks 1, 2, 7 wait for C8b.
Tests
.cm-contentfocus instead of a click where its middle lies under the sheet.npm testlocally: 10520 passing. tsc root and-p web, stylelint, snippets check, level-css check.Screenshots: 390 and 360, en and ja, each height (local, measured).
🤖 Generated with Claude Code