Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report📚 Storybook Preview🧪 Sandbox PreviewComponent Size
Sizes are gzip. Import counts the JavaScript the import loads eagerly; CSS counts the package stylesheet rules referenced by the modules it can load from its own package, lazily loaded ones included. Bundle Size SummaryGzip figures measure each package's entry file, not the code an import pulls in.
Accessibility AuditStatus: No accessibility violations detected. Visual Regression55 of 502 shot(s) changed. A change here is a question, not a failure: check whether the after is the
and 35 more. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
There was a problem hiding this comment.
This change does what it describes: in uppercase, tracked or shadowed text, a Link without href now renders the same words as the anchor form, links in plain text are unchanged, and the changeset's escape rule brings back the old look. Approval waits on governing spec for one decision that no current record covers: whether a Link's button form takes letter-spacing, word-spacing, text-transform and text-shadow from its surrounding text, as the anchor form does. An engineering owner records that decision by commenting /approve-spec followed by the full head SHA on this pull request, and as an engineering owner the author may do so. No code changes are requested.
[Automated review]
A Link without href renders a <button>, and browsers set letter-spacing, word-spacing, text-transform and text-shadow on every <button>, so in uppercase, tracked or shadowed text its words stayed lowercase, untracked and plain beside an anchor form that matched the text. In Chromium 149, WebKit 26.5 and Firefox 151 the anchor form's words computed 3.2px / 4.8px / uppercase / shadow (134px wide) and the button form's normal / 0px / none / none (78px). The button form's own reset now inherits those four properties, as the anchor form already does; text-indent and text-align stay reset, because inherited they would indent or realign the button itself. A new story shows both forms in styled text, and a real-browser spec over it checks that the button form's words compute the same values and width as the anchor form's. pr-a11y selects the spec by name (meta#8367); its @Pr-a11y scope line runs it whenever Link's folder or its story changes. The change alters only appearance, so the changeset is a patch [feat] (spec:AST-017 FR3, DEC-17) that names the old and new look and the escape. component:Link calls the button form "styled as a link", but its FR6 lists only family, size, weight and line height as inherited; whether FR6 extends to these four is the open owner decision.
4d63ac4 to
c328e53
Compare
… text's spacing, case and shadow FR6 lists what Link's root inherits. With this pull request the button form also inherits letter-spacing, word-spacing, text-transform and text-shadow, so FR6 gains that clause, marked as proposed DEC-1 pending the record owner's review.
There was a problem hiding this comment.
This change does what it describes: in uppercase, tracked or shadowed text, a Link without href now renders its words like the anchor form, links in plain text are unchanged, and the changeset's escape rule brings back the old look exactly. Approval waits on one spec decision, whether component:Link FR6 takes the proposed button-form clause and DEC-1, which an engineering owner records by commenting /approve-spec followed by the full head SHA on this pull request; as an engineering owner, the author may do so. Before that, please correct the reason DEC-1, the comment in Link.tsx and the changeset give for keeping text-align reset: inheriting it does not move the button, it only starts wrapped lines at the edge as the anchor form does, so under this proposal wrapped button-form text stays centered.
[Automated review]
The button form now also inherits text-align, so its wrapped lines start where the anchor form's do instead of centering. Inheriting it never moved the button itself, as the earlier comment, changeset and DEC-1 said. Text indent stays reset: inherited, it would indent the words inside the button's own box. The browser spec gains a wrapped-lines case, and the changeset's escape gains text-align: center.
There was a problem hiding this comment.
This change does what it describes: in uppercase, tracked, shadowed or wrapped text, a Link without href now renders its words like the anchor form, while links in plain text and the existing Link stories are unchanged. Approval waits on one spec decision, whether component:Link FR6 takes the proposed button-form clause (letter spacing, word spacing, text transform, text shadow and text alignment inherited from the surrounding text) together with DEC-1, which keeps text indent reset; an engineering owner records it by commenting /approve-spec followed by the full head SHA on this pull request, and as an engineering owner the author may do so. Optionally, before that approval, list the new browser check in the record's verified_by and verification map, since any later commit needs a fresh approval.
[Automated review]
…sed evidence The verification map gains a proposed FR6 row for LinkButtonText.a11y.browser.spec.ts (both cases, Chromium and WebKit), and the record's verified_by lists the spec, so an owner approving DEC-1 needs no later commit.
There was a problem hiding this comment.
This change does what it describes: in uppercase, tracked, shadowed or wrapped text, a Link without href now renders its words like the anchor form, while links in plain text and the existing Link stories are unchanged. Approval waits on one spec decision: whether component:Link FR6 takes the proposed button-form clause (letter spacing, word spacing, text transform, text shadow and text alignment inherited from the surrounding text), its verification row and DEC-1, which keeps text indent reset. An engineering owner records that decision by commenting /approve-spec followed by the full head SHA on this pull request, and as an engineering owner the author may do so. No code changes are requested.
[Automated review]
CI runs LinkButtonText.a11y.browser.spec.ts in Chromium only, so the proposed FR6 verification row names Chromium alone; WebKit runs stay local evidence in the pull request.
There was a problem hiding this comment.
This change does what it describes: in uppercase, tracked, shadowed or wrapped text, a Link without href now renders its words like the anchor form, links in plain text and the existing Link stories are unchanged, and the changeset's escape rule restores the old look exactly. Approval waits on one spec decision: whether component:Link FR6 takes the proposed button-form clause (letter spacing, word spacing, text transform, text shadow and text alignment inherited from the surrounding text), its verification row and DEC-1, which keeps text indent reset. An engineering owner records that decision by commenting /approve-spec followed by the full head SHA on this pull request, and as an engineering owner the author may do so. No code changes are requested.
[Automated review]
…#8381) ## User impact **Why:** Keyboard and screen reader users lose their place when a dialog inside an iframe closes: both ways to close it (2 of 2: Escape or a button) send focus to the frame's empty page. **What:** The dialog now returns focus to the control that opened it, with a ring after a key, none after a click. Picture-in-Picture windows were already fine. **How to check:** In the "Dialog in a second document" story, open the frame's dialog and press Escape: focus returns to "Open dialog", with its ring. ## Problem and solution fit What led here: we hit this moving one product onto Astryx, which renders some UI in a second window. Dialog remembers its opener as the page's `document.activeElement`, which for focus inside an iframe is the `<iframe>`. Focusing that `<iframe>` on close moves the frame's focus to its `<body>`. Options: - Follow the page's active element into iframes: misses Picture-in-Picture windows, which the page cannot see into. - Always read the dialog's own document: a page control opening a dialog inside an iframe would lose focus. - Read the dialog's own document while it has focus, else the page's: covers both. Chosen. For the ring, Dialog tracks its own document's input, which the page never hears. Skipping its focus call would change the page, where it hides WebKit's ring after a click. ## Expected behavior and authority `component:Dialog` (current) FR4 and AR2: closing returns focus to the element that opened it. `architecture:interaction-modality` (current) INV1: programmatic focus shows the ring only after keyboard input. Neither is page-only; #7356 fixed this for Popover. ## Smallest restoration - `Dialog.tsx`: record the opener as above, take the entry direction from its window, return focus with its document's modality. - Internal utils: `trackInteractionModalityIn(doc)`, counted so the last mounted Dialog removes its listeners; an optional document for `getInteractionModality`; an optional modality for `focusForLastInput`, which checks text fields against their own window. The page's tracker and other callers are unchanged. No public API, visual or timing change. ## Evidence - Reproduction before the change: main fails the iframe cases in Chromium and WebKit. - Result after the change: every case passes. - Representative unchanged path: the page Dialog passes before and after; the page's modality ignores other documents. - Regression test or other mutation-sensitive proof: the Testing cases, red without the fix. ## Scope - [x] One defect is restored. - [x] Separable contradictory or unsettled tagalongs were removed or split. - [x] No new public API, visual representation, default, or interaction model is hidden under the bug-fix label. - [x] Public text and artifacts contain no internal Meta context. ## Testing - Unit tests (Vitest), 115 files and 3137 tests: Dialog and every other component that returns focus or reads the last input. New cases cover a control inside an iframe, a control in the page, a text field, and the input listeners going away when the last Dialog unmounts. Each new case fails on the code from before the fix it covers. - Browser test in Chromium, 10 cases (`DialogSecondDocument.a11y.browser.spec.ts`): the dialog in the page, an iframe and a Picture-in-Picture window, closed with Escape, with a click, and after a text field opened it, plus a page button that opens a dialog in the iframe. All pass. With the code from before the last review round (0d47027), the iframe and Picture-in-Picture text-field cases fail; with main's `Dialog.tsx`, the iframe cases fail. - The same test in WebKit 26.5: 7 pass, and the 3 Picture-in-Picture cases are skipped, since only Chromium has that window. - CI finds the test by its file name (#8367), and its routing line also covers its story and the two utilities. Locally, `pnpm test:a11y-contract:pr origin/main` picks it and passes 115 browser tests. - Typecheck, repo checks, ESLint and Prettier pass. Merged with our open #7732, #8014 and #7524, typecheck and the utility tests (516) pass; #7525, #7527 and #7529 each merge cleanly with this change.
…8543) CI note: this head's checks were blocked by the repository's Actions policy (no jobs ran since 17:43Z); they need a re-run. ## Why, what, how to check **Why.** This comes from one product's effort to get its production JavaScript errors to zero: its log shows this one 12 times from 5 people in 7 days (9 on WebKit, 3 on Chrome). Pressing Escape inside an open popover throws it: the browser closes the popover and returns focus to its button, the tooltip there asks to open while the close still runs, and Chromium 151 and 156 refuse (149 does not). The tooltip stays closed. **What led here.** The Popover API refuses a show while any popover shows or hides, and a hide returns focus inside that window. #6941 makes a show wait while `useLayer` runs its own show or hide; a close the browser runs itself (Escape, a tap outside) never entered that bookkeeping. **Options.** (a) Catch the error and drop it: hides a real failure, and the tooltip still never opens. (b) Wait out every browser close before any show: tried first; it delayed a press that closes one menu and opens another, so focus no longer moved into the new menu. (c) Count the browser's close, try the show at once, retry after the close only if the browser refused. Chosen: it fixes the Escape case and keeps every other path as fast as before. **What.** `useLayer` counts the browser's own popover closes in its ledger, from the close's start to its `toggle` event; a show refused during one replays after it, once. **How to check.** Storybook `Core/Layer` → `BrowserHideWakesAFocusLayer`, Chromium 151+: Tab, Enter, Tab, Escape. Before: `InvalidStateError` in the console, no tooltip. After: no error, the tooltip shows. ## Expected behavior and authority `architecture:layer-runtime` (current): browser-initiated closes are observed through the queued `toggle` event; that holds. Restored: #6941. ## Smallest restoration - `popoverOperations.ts` holds the ledger `useLayer.tsx` kept privately, plus the browser-close count and the replay, tested alone there. No public API, default, record or visual change. ## Scope - [x] One defect is restored. - [x] Separable contradictory or unsettled tagalongs were removed or split. - [x] No new public API, visual representation, default, or interaction model is hidden under the bug-fix label. - [x] Public text and artifacts contain no internal Meta context. ## Testing - Unit tests for Layer, its ledger, Tooltip, DropdownMenu, Popover, Drawer and Selector: 7 files, 652 passed. Without the fix, `useLayer.test.tsx` "defers the show a browser-run hide wakes…" and "keeps counting…" fail; with option (b), "opens a layer at once…" fails; `popoverOperations.test.ts` "ends each hide exactly once…" fails without `clearTimeout`. - Type check, repository checks, lint, formatting: clean. - Browser spec `LayerBrowserHide.a11y.chromium.spec.ts` (3 cases) on this branch's Storybook build: 3 passed. CI's Playwright runs Chromium 149, which allows these shows, so there the spec passes on main too. On Chromium 156 the story's steps throw `InvalidStateError … during another show operation` on main, tooltip hidden, and show it with no error here; a tap outside closes the layer with no error on both; the press that closes one layer and opens another focuses the new one at once. - Open PRs #7732, #8381 and #8014 touch nothing under `packages/core/src/Layer/`; a trial merge with #7732 is clean; the other two conflict with main on their own.
User impact
Why: anyone with an action
Link(nohref) in uppercase, tracked or shadowed text: its words render plain, 78px wide beside a 134px link.What led to it: moving one product onto Astryx meant dropping its reset patches; a reset-wide fix (#7531) was declined, leaving this gap.
Visual authority
DDrow reused or amended.Design decisionstable by a team design owner.docs/design/.Options and tradeoffs: inherit in Link's button form (this PR; only styled action links change); inherit in the reset for every control (declined: controls keep their own style); a type-scale tracking token (misses case and shadow); or per-product restyling (repeated everywhere).
Why this choice: the smallest change making Link's two forms match. Text indent stays reset: inherited, it would indent the words inside the button's own box. Escape (restores
main's look exactly):button.astryx-link { letter-spacing: normal; word-spacing: normal; text-transform: none; text-shadow: none; text-align: center; }.Owner decision: whether
component:LinkFR6 takes these five for the button form (proposed DEC-1, pending owner review). Until then,patch[feat](spec:AST-017FR3, DEC-17).Before and after
mainState matrix
Scope
Writing rubric results
R1 narration: none.
R2 research: none.
R3 evidence: the row names the spec.
R4 rejected alternatives: one, in DEC-1.
R5 change references: none.
R6 open questions: none.
Testing
How to check: in the
Core/Linkstory "Button Fallback In Styled Text", both links read uppercase, tracked and shadowed, at one width. Narrowed, both wrap to the left edge.Evidence:
LinkButtonText.a11y.browser.spec.tschecks that; it fails onmainand passes here (Chromium in CI, WebKit 26.5 locally). With #7525, #7527 or #7529's reset added, they still match in all three browsers.pr-rtlis red only becausemainadded an RTL test file after this branch last tookmain.