Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
d4c4f71 to
ae14dc9
Compare
|
Real Safari check (iOS simulators, Safari 18.6 and Safari 26.2): a modal dialog's |
PR Analysis Report
Generated by PR Enrichment workflow | View current CI run |
There was a problem hiding this comment.
Approval is waiting on a maintainer decision: no current spec says which elements @astryxdesign/core/reset.css gives its box model, so a maintainer needs to provide or identify the governing spec for extending it to ::backdrop, and to settle whether that restores a named visual authority ([fix]) or intentionally changes a visual default ([feat]). The rule itself works as described in Chromium and Firefox, and Astryx's own backdrops render the same. Once that is settled, the changeset should move from [breaking]/minor to that tag with a patch bump, since AST-017 FR3 and DEC-17 (through FR54) treat a change that only alters a backdrop's size or border appearance as compatible. The branch also needs a rebase to resolve its Pages manifest conflict with main.
[Automated review]
| '@astryxdesign/core': minor | ||
| --- | ||
|
|
||
| [breaking] `reset.css`'s box model now reaches `::backdrop`, the layer behind a modal dialog, a popover or a fullscreen element. Like every element, `::before` and `::after`, a backdrop is now `box-sizing: border-box` with a `0 solid currentColor` border. A backdrop that sets `width` or `height` together with padding or a border now includes them in that size; setting only `border-width` now draws a solid border, and setting only `border-style` draws nothing until a width is set. |
There was a problem hiding this comment.
Once a maintainer decides whether this restores a named visual authority or intentionally changes a visual default, this changeset needs the matching compatible tag. Under AST-017 FR3 and DEC-17, a change that only alters a backdrop's size or border appearance ships as [fix] (restoring a named visual authority) or [feat] (an intentional visual-default change) with a patch bump. Line 7 then serves as the note on keeping the old look, and the failing check:changesets step clears on the current patch plan.
There was a problem hiding this comment.
Done in e5075a1: the changeset is now a patch [feat]. No current record says which elements reset.css gives its box model, so this is an intentional visual-default change until a maintainer records that authority, which would make it [fix]. The entry names the old box (content-box, no border style) and the new one. Its escape is now one exact rule, ::backdrop { box-sizing: content-box; border-style: none; }, which computes as on main in Chromium 149. Rebased on main with the Pages copy and hash regenerated; check:changesets passes. The description now follows the visual-update template, with before and after screenshots.
ae14dc9 to
e5075a1
Compare
There was a problem hiding this comment.
Approval is waiting on a maintainer decision: no current spec says which elements @astryxdesign/core/reset.css gives its box model, so a maintainer needs to provide or identify the governing spec for extending border-box and the 0 solid currentColor border reset to ::backdrop, which also settles whether the changeset stays [feat] or becomes [fix]. The rule itself works as described in Chromium, and Astryx's own Dialog and BottomSheet backdrops render the same. One fix is needed in the changeset either way: the escape on line 7 does not keep the old look for a backdrop that sets only border-style (its border drops from 3px to 0) or one whose border comes from a cascade layer (the unlayered escape overrides it), while @layer reset { ::backdrop { box-sizing: content-box; border-width: medium; border-style: none; } }, added after the reset import, restored every case checked.
[Automated review]
|
|
||
| [feat] `reset.css`'s box model now reaches `::backdrop`, the layer behind a modal dialog, a popover or a fullscreen element. A backdrop was `content-box` with no border style; like every element and `::before`/`::after`, it is now `border-box` with a `0 solid currentColor` border. Astryx's own backdrops look the same. A backdrop that sets `width` or `height` with padding or a border now includes them in that size, and one that sets only `border-width` now draws a solid border in its text color. | ||
|
|
||
| To keep the old look, add `::backdrop { box-sizing: content-box; border-style: none; }`. |
There was a problem hiding this comment.
This escape doesn't fully restore the old backdrop. It never puts border-width back to its initial medium, so a backdrop that sets only border-style still loses its border (3px to 0px in Chromium), and written unlayered it overrides a backdrop border that comes from a product cascade layer. This version matched main in every case checked, added after the reset import:
@layer reset {
::backdrop {
box-sizing: content-box;
border-width: medium;
border-style: none;
}
}Line 5 could also say that a backdrop setting only border-style no longer draws a border.
There was a problem hiding this comment.
Done in 2ed77d8. The escape is now @layer reset { ::backdrop { box-sizing: content-box; border-width: medium; border-style: none; } }, added after the reset.css import, and line 5 now says a backdrop that sets only border-style no longer draws a border. In Chromium 149 it matches main for a backdrop that sets nothing, only border-width, only border-style, or a border in a product layer. Loaded before the reset it does not match, which is why the entry says "after". The description's escape and state matrix say the same.
There was a problem hiding this comment.
Approval is waiting on a maintainer decision: no current spec says which elements @astryxdesign/core/reset.css gives its box model, so a maintainer needs to provide or identify the governing spec for extending border-box and the 0 solid currentColor border reset to ::backdrop, which also settles whether the changeset stays [feat] or becomes [fix]. The corrected escape on line 7 of the changeset now keeps the old backdrop in every case checked, including a backdrop that sets only border-style and a border set in a product cascade layer, and Astryx's own Dialog and BottomSheet backdrops render the same. Nothing else needs to change once that decision is made.
[Automated review]
2ed77d8 to
966989b
Compare
There was a problem hiding this comment.
Approval is waiting on a maintainer decision: no current spec says which elements @astryxdesign/core/reset.css gives its box model, so a maintainer needs to provide or identify the governing spec for extending border-box and the 0 solid currentColor border reset to ::backdrop, which also settles whether the changeset stays [feat] or becomes [fix]. The rule works as described in Chromium, Astryx's own Dialog and BottomSheet backdrops render the same, and the changeset's escape keeps the old backdrop in every case checked. Separately, pr-a11y fails only because a step added on main after this branch's base runs a spec the branch does not have yet; a rebase onto main clears it.
[Automated review]
The reset gives every element, ::before and ::after `box-sizing: border-box` and a `0 solid currentColor` border, but `*` does not reach ::backdrop, the layer behind a modal dialog, a popover or a fullscreen element. It now gets the same box model, in its own rule so that a browser that does not know the pseudo-element drops only that rule. Astryx's own backdrops set no border, padding or size, and look the same. The change alters only a backdrop's appearance, so the changeset is a patch [feat] (spec:AST-017 FR3, DEC-17) that names the old and new box and the escape. No current record governs what reset.css declares. The GitHub Pages landing serves a byte-identical copy of the file, which its test requires to match, so the copy and its manifest hash move with it.
The opt-out sits in the reset layer, so it still yields to the styles a product or theme layers above the reset, and it now restores every old computed value checked in Chromium 149 (CodeBunny).
966989b to
4482547
Compare
There was a problem hiding this comment.
Approval is waiting on a maintainer decision: no current spec says which elements @astryxdesign/core/reset.css gives its box model, so a maintainer needs to provide or identify the governing spec for extending border-box and the 0 solid currentColor border reset to ::backdrop, which also settles whether the changeset stays [feat] or becomes [fix]. The rule works as described in Chromium and Firefox, Astryx's own Dialog and BottomSheet backdrops render the same, and the changeset's escape keeps the old backdrop in every case checked. Nothing else needs to change once that decision is recorded.
[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.
User impact
Why: anyone who styles a dialog's or popover's backdrop under Astryx's reset: unlike every other element, it keeps the browser's box, so padding grows a sized backdrop and a 12px
border-widthalone draws nothing.What led to it: one product we're moving onto Astryx copies this rule for
::backdropitself.Visual authority
DDrow reused or amended.Design decisionstable by a team design owner.docs/design/.Options and tradeoffs: extend the reset's box model to
::backdrop(this PR; a backdrop that sets onlyborder-styledrew a 3px border onmainand draws none now); or leave it, and every product that styles a backdrop adds its own rule.Why this choice: one box model for every element, and Astryx's own backdrops (Dialog, BottomSheet) look the same: none sets a border, padding or size. Escape, after the reset import:
@layer reset { ::backdrop { box-sizing: content-box; border-width: medium; border-style: none; } }.Owner decision: whether the reset's box model reaches
::backdrop. No current record governsreset.css's declarations (spec:AST-080covers only its layer), sopatch[feat](spec:AST-017FR3, DEC-17).Before and after
Chromium 149; the backdrop sets only
border-width: 12pxand a bluecolor:mainState matrix
content-box/nonetoborder-box/solid.mainfor a backdrop that sets nothing, onlyborder-width, onlyborder-style, or a border in a product layer.Scope
Testing
How to check: open a modal
<dialog>whose::backdropsets onlyborder-width: 12px: here it shows that border; onmain, none.Evidence:
reset.backdrop.a11y.browser.spec.tspasses in Chromium in CI and fails withmain's reset; WebKit 26.5 ran locally before a rebase. The reset's Chromium contract and its backdrop, reset, until-found and Pages unit tests pass, as do the pre-commit checks and core typecheck.