Repository navigation
fix(core): a Table stays the scroll region when a host scrolls every table's parent - #12357
josephfarina wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC |
|---|---|---|
| Markdown | 205.3 kB (+20 B) · 22.1 kB CSS (0) | — |
| Table | 121.8 kB (+19 B) · 19.8 kB CSS (0) | — |
| lab/Comments | 376.9 kB (+17 B) · 2.5 kB CSS (0) | — |
8 more components
| Component | Size | LoC |
|---|---|---|
| lab/CommentThread | 370.1 kB (+10 B) · 2.4 kB CSS (0) | — |
| TableBody | 3.5 kB (0) · 3.3 kB CSS (0) | — |
| TableCell | 104.6 kB (0) · 19.3 kB CSS (0) | — |
| TableFooter | 3.5 kB (0) · 3.3 kB CSS (0) | — |
| TableHeader | 3.5 kB (0) · 3.3 kB CSS (0) | — |
| TableHeaderCell | 104.4 kB (0) · 19.1 kB CSS (0) | — |
| TableRow | 7.1 kB (0) · 4.0 kB CSS (0) | — |
| TableSelectionToolbar | 76.5 kB (0) · 14.1 kB CSS (0) | — |
Package size: @astryxdesign/core 7.65 MB packed (+589 B); no new dependencies.
Not run on this PR: add ci:run-visual for Visual, ci:run-a11y for Accessibility, ci:run-rtl for RTL.
Current run: CI concluded cancelled; parts of this report may be missing.
Generated by PR Enrichment workflow | View full report
There was a problem hiding this comment.
Changes requested. The fix works: with the host rule from the new test, the Table's wrapper is the scroller again and takes the tab stop, and pages without such a rule are unchanged. Two claims in the description are not accurate at this head:
- The description says no other component has a
<table>as the direct child of its scroll content, but Lab's DiffViewer renders its unified-view<table>directly inside its scroll content box (packages/lab/src/DiffViewer/DiffViewer.tsx) and the same host rule moves its scrolling to that inner box, so please reword this to "no other Core component" and name DiffViewer as a remaining case, or give its content box the same style. - The description says keyboard users cannot reach a wide table, but in Chromium the browser makes the inner scroller its own unnamed tab stop, so please reword it to say that users lose the Table's named scroll region and focus ring rather than all keyboard access.
Two non-blocking notes are in the inline comments: the new browser case's attribute checks also pass on the base, and a host rule that uses the overflow shorthand still makes the inner box scroll.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claim: a host rule giving every table's parent
overflow-x: automade the inner box scroll instead of the wrapper: verified in Chromium on the base. - Claim: the wrapper then lost its keyboard stop, focus ring and overflow state: verified (no
tabindexand nodata-scrollable-inlineon the base). - Claim: the wrapper now stays the scroll region on such pages: verified (browser probe and the new test on the head).
- Claim: an unlayered host rule beats Astryx's layered classes: verified (
packages/build/src/index.jsemits library CSS inside@layer). - Claim: keyboard users cannot reach a wide table: false in Chromium (Tab reaches the unnamed inner scroller).
- Claim: features that read the overflow state did not see it: verified.
- Claim: the inline
overflow-x: visiblebeats the host rule, so the inner box never scrolls: verified for the described rule; anoverflowshorthand rule is not covered (non-blocking). - Claim: Table FR1 and the one-viewport scroll spec govern the behavior: verified.
- Claim: one inline style in
Table.tsxis the smallest restoration: verified. - Claim: no other component has a
<table>directly in its scroll content: false (Lab DiffViewer). - Claim: before the change the inner box computed
autoand the new test failed: verified (the new case fails on the base at the computed-style check). - Claim: after the change the inner box is
visibleand the wrapper overflows withtabindex="0": verified. - Claim: the two existing Table scroll browser tests pass: verified (3 of 3 pass on the head).
- Claim: scope checklist (one defect, no tagalong, no new API or default, no internal context): verified; the public API surface is unchanged.
- Claim: Table unit tests and the type check pass: verified (906 tests at this head; the description's 893 is a stale count).
- Changeset: a Table stays the one scroll region under such a host rule, and before, the inner box scrolled and the Table lost its keyboard stop and focus ring: verified.
- File
.changeset/table-content-not-scroller.md: clear. - File
packages/core/src/Table/Table.tsx: non-blocking (overflowshorthand host rule; comment wording). - File
packages/core/src/Table/__tests__/TableScroll.a11y.chromium.spec.ts: non-blocking (the attribute checks pass on the base).
…st rule before render
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet. The CI workflow was refused for capacity and its jobs were cancelled, so it needs a re-run before merge.
The latest commit resolves every earlier point: the description now names Lab's DiffViewer as the remaining exposed case and states the keyboard impact accurately, the inline style keeps both axes visible so an overflow shorthand host rule no longer wins, and both new browser cases add the rule before render and fail on the base.
Claims and files checked
Review mode: incremental; reason: none
- changed rules (0): none
- Claim: host pages that give every table's parent an unlayered
overflow-x: autorule make the box between the wrapper and the table scroll instead: verified in Chromium on the base (the inner box scrolls 360 px in 318 px; the wrapper does not overflow). - Claim: the Table then loses its named scroll region, focus ring and overflow state, and Chromium gives the inner box an unnamed tab stop: verified (no
tabindexordata-scrollable-inlineon the wrapper; Tab lands on the inner box). - Claim: an unlayered rule beats Astryx's layered classes and an inline style beats that rule: verified (library CSS is emitted inside
@layer; the inline style wins on the head). - Claim: both axes must stay visible because a shorthand host rule leaves
overflow-y: autoand a lonevisibleaxis computes toauto: verified (the head keeps the inner boxvisibleon both axes under both rules). - Claim: keyboard and screen-reader users reach an unnamed scroller and overflow-state readers miss the overflow: verified.
- Claim: Table FR1 and the one-viewport scroll spec govern the behavior: verified.
- Claim: one inline style in
Table.tsxis the restoration, and no other Core component has a<table>directly in its scroll content while Lab's DiffViewer does: verified. - Claim: both new browser cases fail on the base at the wrapper overflow check and pass on the head, and the two existing scroll cases pass: verified (4 of 4 on the head; the two new cases fail on the base).
- Claim: Table unit tests and the Core type check pass: verified (906 tests).
- Claim: scope checklist (one defect, no tagalong, no hidden API, visual, default or interaction change, no internal context): verified; the public API surface is unchanged and pages without such a rule render identically.
- Changeset: the Table stays the one scroll region under an
overflow-x: autohost rule, where the inner box used to scroll and the Table lost its keyboard stop and focus ring: verified. - File
.changeset/table-content-not-scroller.md: clear. - File
packages/core/src/Table/Table.tsx: clear. - File
packages/core/src/Table/__tests__/TableScroll.a11y.chromium.spec.ts: clear.
…crolls every table's parent
…crolls every table's parent
- #12252 docs(cli): agent docs name the prop names that differ from other libraries Author: Joey Farina <[email protected]> - #12154 fix(core): a numeric typography weight builds through an extended base's adaptation rules Author: Joey <[email protected]> - #12092 fix(cli): theme build reads the Core it builds with for variant declarations, and names the build command alone Author: Joey Farina <[email protected]> - #12316 fix(core): a shorthand never follows its own longhand in one style merge Author: josephfarina <[email protected]> - #12357 fix(core): a Table stays the scroll region when a host scrolls every table's parent Author: Joey Farina <[email protected]> - #12349 fix(core): end a mouse drag a sandboxed frame never saw released Author: josephfarina <[email protected]> - #12425 fix(cli): use a stored doc parse only with the zod release that made it Author: Joey <[email protected]> - #12396 fix(AppShell): with the standard width points, a server-rendered shell hides its inline side nav on a phone before its script runs Author: Joey <[email protected]> - #12438 fix(charts): end dots draw whole and a thinned axis keeps its last label Author: Joey Farina <[email protected]> - #12448 fix(cli): upgrade outside a project names the project, not --from Author: Joey Farina <[email protected]> - #12459 fix(templates): the dashboard scorecard fits a phone screen Author: Joey Farina <[email protected]> - #12428 fix(core): Field labels draw in a bolder face than their description Author: Joey Farina <[email protected]> - #12435 fix(theme-matcha): dark menus, popovers and muted fills take the theme's deep gray neutral Author: Joey <[email protected]> - #12432 fix(templates): dashboard chart labels show whole instead of clipped by the chart edge Author: Joey Farina <[email protected]> - #12441 fix(cli): mark icon-set generated calls pure so apps drop unused icons Author: Joey Farina <[email protected]> - #12472 fix(MetadataListItem): a value breaks only a word longer than its line Author: Joey <[email protected]>
|
Landed in #12718. |
User impact
Some pages that show an Astryx page inside another app add a global rule that gives the parent of every
<table>overflow-x: auto. Inside a Table, that parent is the box between the scroll wrapper and the<table>. That box then scrolled instead of the wrapper. The wrapper never overflowed, so a wide Table lost its named scroll region, its focus ring, and its overflow state. In Chromium the inner box still took an unnamed tab stop of its own. Now the wrapper stays the scroll region on such pages.Problem and solution fit
overflow: visibleon both axes. An inline style beats the unlayered host rule. Both axes stay visible, because a hostoverflowshorthand would otherwise leaveoverflow-y: auto, and CSS then computes a lone visible axis toauto.Expected behavior and authority
component:TableFR1: one named scroll region around one observed content box.spec:AST-025: one viewport owns scrolling.Smallest restoration
One inline style on the content box in
Table.tsx. No other Core component has a<table>as the direct child of its scroll content. Lab's DiffViewer does (its unified view) and stays open to the same host rule; it is left to its own change.Evidence
overflow-x: auto, and theoverflow: autoshorthand), the wrapper does not overflow and the new browser cases fail at the wrapper'sscrollWidth > clientWidthcheck.visibleon both axes, and the wrapper overflows, reports inline overflow, and hastabindex="0".Scope
Components: Table
Testing
playwright test --project=chromium TableScrollagainst a built Storybook (two new cases:overflow-x: autoandoverflow: autohost rules, injected before render)vitest run packages/core/src/Table,tsc -p packages/core/tsconfig.build.json