Repository navigation
fix(ListInput): base props reach the group, and styling only named parts - #13761
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
There was a problem hiding this comment.
Changes requested: the new prop routing matches the Field-input contract, but ListInput carries its own copy of the shared styling rule.
packages/lab/src/ListInput/ListInput.tsxlines 492-551 copy Core'suseFieldInputStyling, which Lab can already call from@astryxdesign/core/internal/selectable-cardas SelectableCardGroup does, so call it there, delete the copy, and have #13734 keep an internal route for the hook instead of removing the entry.
Please also fill in the description's {{STACK}}, #{{I6}} and #{{MOVE}} placeholders so the comparison head and the follow-up Core move can be found. The routing itself and the new prop-target tests look right.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claims:
- Before the change, a caller's ref, id, data attributes, aria-describedby, aria-details and handlers landed on the Field box: verified (the base passes rest and ref to Field, which spreads them onto its box).
- The old type accepted root xstyle, className and style: verified (it extended BaseProps).
- Base props and ref now reach the group, which joins a caller's aria-labelledby and aria-describedby to its own: verified (ListInput.tsx 1305-1313).
- container* props reach the Field box where one renders, and control* props reach the group after its own styles: verified (1302-1304, 1328-1331, 513-550).
- An untyped caller's root styling is dropped with a development warning: verified (521-535).
- The props type matches CheckboxList's: verified.
- Lab cannot import Core's shared styling rule: false (the selectable-card internal entry re-exports it, and Lab's SelectableCardGroup imports it there).
- The local copy keeps the same warnings: partly true (same conditions; the root-styling message is reworded).
- A later Core move replaces the copy: not verifiable (the pull request number is a placeholder).
- Lab is unreleased, so no migration or changeset is needed: verified (Lab is private and canary-only).
- All sixteen captured story states are pixel-identical: not verified.
- Five new tests fail before the change and the type test fails its typecheck there: consistent with the code; not verified by a run.
- The test file passes 43 tests and typecheck, lint, formatting and pre-review checks are clean: not verified by a run; the head test file holds 43 tests.
- Files:
- ListInput.tsx: one blocking finding (the copied styling rule).
- ListInput.test.tsx: clear.
- ListInput.doc.mjs: clear.
77ddfb7 to
f3cadba
Compare
fc7fbbb to
90f9370
Compare
|
Addressed at 90f9370.
|
There was a problem hiding this comment.
Changes requested: ListInput's prop routing now goes through Core's shared Field styling hook, which resolves the earlier review's finding, but the description no longer matches the code.
- The description says ListInput carries its own copy of the styling rule because Lab cannot import the shared one, and that 43 tests pass, while this head imports and calls
useFieldInputStylingfrom@astryxdesign/core/internal/selectable-card(ListInput.tsxlines 55 and 726) and holds 46 tests, so please update it and say that #13734, which deletes that entry, lands after #13762 or keeps it.
The routing itself and the new prop-target tests look right. Two non-blocking notes: the shared warning's pointer to astryx upgrade does not apply to Lab's ListInput, and the file header is past the comment length guideline.
Claims and files checked
Review mode: full; reason: author-not-engowner
- Claims:
- Before the change, a caller's ref, id, test id and other data attributes, aria-describedby, aria-details and DOM handlers landed on the Field box: verified (the base passes its rest props and ref to Field, which spreads them onto its box).
- The old type accepted root xstyle, className and style: verified (it extended BaseProps).
- Base props and ref now reach the group, which joins a caller's aria-labelledby and aria-describedby to its own: verified (ListInput.tsx 1239-1247).
- container* props reach the Field box where one renders, and control* props reach the group after its own styles: verified (ListInput.tsx 726-730, 1236-1238, 1262-1265).
- An untyped caller's root styling is dropped with a development warning: verified (the shared hook strips it and warns).
- The props type matches CheckboxList's, and CheckboxList and RadioList route these props through the same hook: verified.
- Lab cannot import the shared styling rule, so ListInput carries a local copy that the Core move later replaces: false (ListInput.tsx 55 imports the shared hook and 726 calls it; there is no copy).
- Lab is unreleased, so no migration or changeset is needed: verified (Lab is private and canary-only).
- All sixteen captured story states are pixel-identical: not verified by a capture; consistent with the code, since no story passes the retargeted props.
- Five new tests fail before the change and the type test fails its typecheck there: consistent with the base code; not verified by a run.
- The test file passes 43 tests: false for this head, whose test file holds 46 test cases; the clean typecheck, lint, formatting and pre-review checks were not verified by a run.
- Files:
- ListInput.tsx: clear (one non-blocking header-length note).
- ListInput.test.tsx: clear.
- ListInput.doc.mjs: clear.
90f9370 to
fda25c6
Compare
f3cadba to
33a22b5
Compare
|
Updated at fda25c6.
|
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet; it runs once this pull request targets main.
ListInput's base props now reach its role="group" element and its styling goes through Core's shared Field styling rule, and the description now matches the code, which resolves the earlier review's request.
Claims and files checked
Review mode: full; reason: author-not-engowner
- Claims:
- Before this change, a caller's ref, id, test id and other data attributes, aria-describedby, aria-details and DOM handlers landed on the Field box around the labelled group: verified (the base passes its ref and remaining props to Field, which spreads them onto its box).
- The old props type accepted root xstyle, className and style, which styled the Field box: verified (it extended BaseProps).
- Base props and ref now reach the group, which joins a caller's aria-labelledby and aria-describedby to its own: verified (ListInput.tsx 1230-1236).
- container* props reach the Field box where one renders, and control* props reach the group after its own styles: verified (ListInput.tsx 715-719, 1227-1229, 1253-1256).
- The shared rule drops an untyped caller's root styling with a development warning and ignores container* with a warning where no Field box renders: verified (Core's fieldParts.ts 136-161).
- The props type matches CheckboxList's, and CheckboxList and RadioList route these props through the same rule: verified.
- The input-fields family contract requires this routing for every component that composes Field: verified against the current family record.
- The defect was found by a component audit: not checked (provenance only; it does not bear on the code).
- The change is limited to the props type, the destructuring, the two elements' props and six documented props: verified.
- ListInput calls the shared styling rule through Core's internal selectable-card entry, as Lab's SelectableCardGroup does, with no copy: verified (ListInput.tsx 53 and 715).
- SelectableCardGroup's move to Core keeps that entry with the styling rule as its only export, so the two can land in either order: verified against that pull request's current files.
- The shared warning's pointer to astryx upgrade does not apply to ListInput, because the codemod does not list it: verified (the codemod lists only Core components and matches only Core imports).
- Lab is unreleased, so no migration or changeset is needed: verified (Lab is private and canary-only, and the changeset coverage rule exempts it).
- Sixteen captured story states are pixel-identical, with matching group attributes and focus: not verified by a capture; consistent with the code, since no story or block passes the retargeted props.
- The new prop-target tests fail before the change (five at runtime, the type test in the typecheck): consistent with the base code; not verified by a run.
- The regression tests cover base props, ref and handlers, the joined ids, the container* and control* targets, dropped root styling, the horizontal-labels warning and the props type: verified (ListInput.test.tsx 1711-1823).
- The test file passes 47 tests, and the Lab typecheck, strict lint, formatting and pre-review checks are clean: the file holds 47 test cases (verified); the runs were not verified.
- One defect, no tag-alongs, no hidden public API, default or interaction, and no internal context: verified.
- Files:
- ListInput.tsx: clear.
- ListInput.test.tsx: clear.
- ListInput.doc.mjs: clear.
|
/approve-spec fda25c6 |
33a22b5 to
60f6fc7
Compare
fda25c6 to
2385091
Compare
|
Rebased onto the new #13760 (60f6fc7). The content is unchanged apart from the rebase. There was one conflict, from #13757 on On this head: 50 ListInput tests pass; Lab's typecheck after a Core build, strict lint, Prettier, and |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet; it runs once this pull request targets main.
The rebase keeps ListInput's prop routing as approved: base props and ref reach the role="group" element, styling goes through Core's shared Field styling rule, and the only difference from the approved head is #13757's start-handle style line, which the group keeps before controlXstyle.
Claims and files checked
Review mode: full; reason: author-not-engowner
- Claims:
- Before this change, a caller's ref, id, test id and other data attributes, aria-describedby, aria-details and DOM handlers landed on the Field box around the labelled group: verified (the base passed its ref and remaining props to Field, which spreads both onto its box).
- The old props type accepted root xstyle, className and style, which styled the Field box: verified (it extended BaseProps, and Field applies them to its box).
- Every Field-composed input routes these props the same way, CheckboxList and RadioList included: verified (every input component in Core and Lab source that renders Field calls the shared styling rule; the other two Field users are InputGroup, a container, and PowerSearch, which the family record treats as a composition rather than an input).
- The new props type is the one CheckboxList uses: verified (CheckboxList.tsx 50-53).
- Base props and ref now reach the group, which joins a caller's aria-labelledby and aria-describedby to its own: verified (ListInput.tsx 1282-1290; the tests at 1840 and 1859 contain these cases).
- container* props reach the Field box where one renders, and control* props reach the group after its own styles: verified (ListInput.tsx 760-764, 1279-1281, 1300-1309).
- The shared rule drops an untyped caller's root styling with a development warning and ignores container* with a warning where no Field box renders: verified (Core fieldParts.ts 136-161).
- The input-fields family contract requires this routing for every component that composes Field: verified against the current family record (FR10 and DEC-7).
- The defect was found by a component audit: reported (provenance only).
- The change is the props type, the destructuring, the two elements' props and six documented props: verified (it also keeps internal ids on the generated base so a caller id names only the group, and updates the file header).
- ListInput calls the shared rule through Core's internal selectable-card entry, as SelectableCardGroup does, with no copy of the rule: verified (ListInput.tsx 53 and 760; SelectableCardGroup.tsx 37-39; no copy remains).
- SelectableCardGroup's move keeps that entry with the styling rule as its only export, so the two land in either order: verified (that pull request's current head leaves only that re-export, and ListInput imports nothing else from the entry).
- The shared warning ends by pointing to astryx upgrade, whose codemod does not list ListInput: verified (fieldParts.ts 97-100; the v0.7.0 field-styling codemod lists no ListInput).
- Lab is unreleased, so the type change needs no migration and no Changeset: verified (Lab's package is private and canary-only, and CI's Lab-only lane accepts a change without a Changeset).
- The 16 captured story states are pixel-identical before and after: reported.
- The new prop-target tests fail on the base (five tests, plus the type test's typecheck): reported (red-first run not repeated).
- After the change the props land on the group: verified (ListInput.tsx 1282-1290; test at 1840).
- The regression tests cover base props, ref and handlers, the joined ids, container* and control*, dropped root styling with a warning, container* ignored in a horizontal-labels FormLayout, and a type test: verified (ListInput.test.tsx 1839-1952).
- The rebase's one conflict was #13757's start-handle style line, and the rest of the diff is unchanged: verified (the pull request's own added and removed lines match the previous head's; only that context line differs).
- 50 ListInput tests pass, and the Lab typecheck, strict lint, Prettier, the review pre-check and the knowledge check are clean: reported (the file holds 50 tests; CI has not run on this head).
- One defect is restored, no new public API is hidden under the fix, and no internal context is included: verified (Lab is unpublished; no internal context in the title, body, branch, commit or added lines).
- Files:
- packages/lab/src/ListInput/ListInput.tsx: clear
- packages/lab/src/ListInput/ListInput.test.tsx: clear
- packages/lab/src/ListInput/ListInput.doc.mjs: clear (the six rows match the code's targets and CheckboxList's wording)
60f6fc7 to
cf3302c
Compare
2385091 to
a04fc85
Compare
|
Rebased onto the new #13760 (cf3302c). The content is unchanged apart from the rebase: this pull request's own diff is the same patch (identical On this head: 50 ListInput tests pass. Lab's typecheck after a Core build, strict lint, Prettier, and |
There was a problem hiding this comment.
Approved pending CI: the repository's CI suite has not run on this head, because it runs on pull requests into main and this one targets fix/listinput-empty-state-grammar. It runs once the pull request is retargeted, and the merge guard still requires those checks.
No blocking findings. Reproduced locally, the ListInput suite passes (50 tests), five of the six new prop-target cases fail against the base, and a browser capture shows containerStyle on the Field box and controlStyle and a test id on the role="group" element, where the base put a root style and the test id on the Field box.
- Non-blocking: the group joins caller ARIA ids with the file's local
joinIDs(ListInput.tsx:522, used at:1287-1288), which neither trims nor removes duplicates, while Core'sjoinAriaIDsdoes and is exported from the internal entry this file already imports; it is worth folding in before the move to Core, since #13734 removes that export.
Claims and files checked
Review mode: same-head; reason: none
- Title, read live ("fix(ListInput): base props reach the group, and styling only named parts"): verified (
ListInput.tsx:1279-1290and:1306-1309; the six new cases pass). - Claims:
- Before this change, a caller's
ref,id, test id and other data attributes,aria-describedby,aria-detailsand DOM handlers landed on the Field box: verified (the base passedrefand the remaining props toField; the new cases fail against the base, and the capture shows the test id on the Field box there). - The old props type accepted root
xstyle,classNameandstyle, which styled the Field box: verified (it extended the base props type; the base capture shows the root style on the Field box). - The cause was the base props type plus spreading the rest and
refontoField: verified (the base source). - A test id or ref found the wrapper, and caller descriptions reached nothing a screen reader announces for the group: verified (the Field box has no role; the first new case fails against the base).
- Every Field-composed input routes these props the same way, so code that works on CheckboxList or RadioList broke quietly here: verified as the family record's own rule, bounded by its statement that every component that composes Field targets base props and styling the same way.
- The new props type is the one CheckboxList uses: verified (
CheckboxList.tsx:50-53,ListInput.tsx:125-128). ref,id, DOM and ARIA props reach the group, which joins a caller'saria-labelledbyandaria-describedbyto its own: verified (ListInput.tsx:1283-1290; the cases atListInput.test.tsx:1840and:1859pass).container*reaches the Field box where one renders andcontrol*reaches the group after its own styles: verified (ListInput.tsx:1279-1281,:1306-1309; the case at:1880passes; the capture).- The shared rule drops untyped root styling with a development warning and ignores
container*with a warning where no Field box renders: verified (Core'sfieldParts.ts:136-172; the cases at:1899and:1913pass). - The governing family rule requires this routing and forbids root styling: verified (the input-fields family record's FR10 and DEC-7 text).
- The defect was found by a component audit: reported (provenance only).
- The change is the props type, the destructuring, the two elements' props and six documented props: verified, plus a generated id base so a caller
idnames only the group, and the file header. - ListInput calls the shared styling rule through Core's internal entry, as SelectableCardGroup does, and keeps no copy: verified (
ListInput.tsx:53,:760;SelectableCardGroup.tsx:37-39). - The SelectableCardGroup move keeps that entry with the styling rule as its only export, so the two land in either order: verified (that pull request's current head re-exports only
useFieldInputStylingthere). - The shared warning ends by pointing to
astryx upgrade, whose codemod does not list ListInput: verified (the warning text and the v0.7.0 field-styling transform's component lists). - Lab is unreleased, so no migration or changeset is needed: verified (the package is private and canary-only).
- A
ref,id, test id,aria-detailsandonFocusland on the Field box before and on the group after: verified (the first new case fails against the base and passes on the head, run locally). - The new prop-target cases mirror the shared suite's cases, five fail before the change and the type test fails its typecheck there: verified for the six cases and the five failures (run locally); the typecheck failure is reported.
- The 16 captured story states are pixel-identical before and after: reported (the Tag options story, captured locally, is pixel-identical).
- The rebase changed only the base, with no conflicts, and the pull request's own patch is unchanged: verified (this patch equals the previously approved head's apart from index lines).
- 50 ListInput tests pass: verified (run locally).
- The Lab typecheck, strict lint, Prettier, the pre-review check and the knowledge check are clean: reported.
- One defect is restored, no new public API is hidden under the fix, and no internal context is included: verified (no published package's surface changes; the title, body, branch name, commit message and every added line carry no internal context).
- Before this change, a caller's
- Files:
packages/lab/src/ListInput/ListInput.tsx: clearpackages/lab/src/ListInput/ListInput.test.tsx: clearpackages/lab/src/ListInput/ListInput.doc.mjs: clear (the six rows name the same targets as the code, in CheckboxList's wording)
a04fc85 to
63e48d1
Compare
|
Rebased onto On this head: 50 ListInput tests pass. Lab's typecheck after a Core build, strict lint, Prettier, |
There was a problem hiding this comment.
Changes requested: the code, tests and docs hold up, but two claims in the pull request description, and the matching commit-message lines, are false at this head. Rewording them clears the review.
- Miss: The description says
containerXstyle,containerClassNameandcontainerStyle"reach the Field box where one renders" (The fix) and that styling reaches the two named parts (User impact), but inside anInputGroupListInput still renders its own Field box while the shared styling rule dropscontainer*with a "no Field box renders" warning (reproduced locally), so bound both sentences as the doc row already does: "except inside an InputGroup and in ahorizontal-labelsFormLayout, where they are ignored with a development warning". - Miss: "Every Field-composed input routes these props the same way" (Why that matters, and "As in every Field-composed input" in the commit message) is false, because RichTextEditor (
RichTextEditor.tsx:321-323,:690-694) and PowerSearch (PowerSearch.tsx:341-343,:1660-1662) compose Field and still take rootxstyle/className/style, so narrow it to the inputs that follow the input-fields family's FR10, such as CheckboxList and RadioList.
Reproduced locally, the ListInput suite passes (50 tests) and five of the six new prop-target cases fail against the base; CI's lint, typecheck and unit-test jobs pass at this head.
Claims and files checked
Review mode: full; reason: author-not-engowner
- Title, read live ("fix(ListInput): base props reach the group, and styling only named parts"): verified (
ListInput.tsx:1282-1310; the new cases pass). - Claims:
- Before the change, a caller's ref, id, test id and other data attributes,
aria-describedby,aria-detailsand DOM handlers landed on the Field box: verified (the base passedrefand the rest toField; five new cases fail on the base, run locally). - The old type accepted root
xstyle,classNameandstyle, which styled the Field box: verified (the base type extended the base props, andFieldmerges them onto its box). - The cause was the base props type plus spreading the rest and
refontoField: verified (the base source). - A test id or ref found the wrapper and a caller's description reached nothing a screen reader announces for the group: verified (the first two new cases fail on the base); the root-className layout point is reported.
- Every Field-composed input routes these props the same way: false (RichTextEditor and PowerSearch; finding above).
- The new props type is the one CheckboxList uses: verified (
CheckboxList.tsx:50-53,ListInput.tsx:125-128). ref,id, DOM and ARIA props reach the group, which joins a caller'saria-labelledbyandaria-describedbyto its own: verified (ListInput.tsx:1282-1290; the cases atListInput.test.tsx:1840and:1859pass); the group's own role, and its disabled, busy and state attributes while set, take precedence on that element.container*reach the Field box where one renders: false inside an InputGroup (finding above); verified standalone (ListInput.test.tsx:1880).control*reach the group after its own styles: verified (ListInput.tsx:1300-1309; the case at:1880).- The shared rule drops an untyped caller's root styling with a development warning and ignores
container*with a warning where no Field box renders: verified (Core'sfieldParts.ts:136-172; the cases at:1899and:1913). - The input-fields family rule requires this routing, forbids root styling and binds every component that composes Field: verified (the record's FR10 and DEC-7 text).
- The defect was found by a component audit: reported (provenance only).
- The restoration is the props type, the destructuring, the two elements' props and six documented props: verified; the change also moves derived ids to a generated base and updates the file header.
- ListInput calls the shared styling rule through Core's internal entry, as SelectableCardGroup does, and keeps no copy: verified (
ListInput.tsx:53,:760;SelectableCardGroup.tsx:34-39). - The SelectableCardGroup move keeps that entry with the styling rule as its only export, so the two land in either order: verified (that pull request's current head).
- The shared warning ends by pointing to
astryx upgrade, whose codemod does not list ListInput: verified (fieldParts.ts:97-100and the field-styling transform's component lists). - Lab is unreleased, so no migration or changeset is needed: verified (the package is private and canary-only, and no changeset names it).
- The 16 captured story states are pixel-identical, with matching role, class, state attributes, record count and focus: reported.
- A
ref,id, test id,aria-detailsandonFocusland on the Field box before and on the group after: verified (the first new case fails on the base and passes on the head, run locally). - The new cases mirror Core's shared suite, five fail before the change and the type test fails its typecheck there: verified (Core's suite has the same five runtime cases; five fail on the base and its typecheck reports the unused
@ts-expect-error, run locally). - One defect is restored, no public API, visual, default or interaction change is hidden, and no internal context is included: verified (no published package changes; the title, body, branch, commit message and added lines carry no internal context).
- Rebased onto
mainwith no conflicts, with the pull request's own patch unchanged: verified for the patch (it equals the previously reviewed head's apart from index lines); no conflicts is reported. - The group keeps the start-handle style expression
maingained and then takescontrolXstyle: verified (ListInput.tsx:1300-1307). - A fresh capture of the 16 story states is pixel-identical to
main's: reported. - 50 ListInput tests pass: verified (run locally).
- The Lab typecheck after a Core build is clean: verified (run locally, and CI's typecheck job passes at this head).
- Strict lint, Prettier, the pre-review check, the knowledge check and the changeset check are clean: verified for Prettier, the knowledge check and the changeset check (CI's Lint workflow passes at this head and runs them with the regular ESLint pass); strict lint and the pre-review check are reported.
- The three earlier ListInput fixes have merged, and the Core move is based on this pull request: verified (
mainhistory; the Core move targets this branch).
- Before the change, a caller's ref, id, test id and other data attributes,
- Files:
packages/lab/src/ListInput/ListInput.tsx: clear (the code matches its doc rows)packages/lab/src/ListInput/ListInput.test.tsx: clearpackages/lab/src/ListInput/ListInput.doc.mjs: clear (the rows already saycontainer*have no effect inside InputGroup or in horizontal labels)
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC |
|---|---|---|
| lab/ListInput · Storybook | 102.6 kB (+483 B) · 1.3 kB CSS (0) | 1,345 (+26) |
Package size: no published package changed; no new dependencies.
Not run on this PR: add ci:run-visual for Visual, ci:run-a11y for Accessibility, ci:run-rtl for RTL.
Generated by PR Enrichment workflow | View full report
ListInput composes Field, but it put a caller's ref, id, data and ARIA attributes, and handlers on the Field box, an unlabelled wrapper around the labelled role="group" element, and its type took root xstyle, className, and style. As in CheckboxList, RadioList, and the other inputs that follow the input-fields family's FR10, base props and ref now reach the group, which joins a caller's aria-labelledby and aria-describedby to its own. The type takes no root styling: containerXstyle, containerClassName, and containerStyle style the Field box, except inside an InputGroup and in a horizontal-labels FormLayout, where they are ignored with a development warning; controlXstyle, controlClassName, and controlStyle style the group. An untyped caller's root styling is dropped with a development warning.
63e48d1 to
2e20a52
Compare
|
Addressed at 2e20a52. Only the description and the commit message change; the tree is byte-identical to 63e48d1, so the code, tests, and docs are what this review read.
#13762 is restacked on this head (c6e2007): the same patch on the same tree. Both merge cleanly into the latest |
There was a problem hiding this comment.
Approved. The two description claims from the last review now match the code: container* is bounded to exclude an InputGroup and a horizontal-labels FormLayout, and the routing comparison names CheckboxList, RadioList and the other FR10 inputs. Reproduced locally: the ListInput suite passes (50 tests), the Lab typecheck is clean, and the new prop-target tests fail against main; CI passes on this head.
One non-blocking note for the Core move: inside an InputGroup the shared warning says no Field box renders while ListInput still renders its own, which the description already notes.
Claims and files checked
Review mode: full; reason: author-not-engowner
Claims:
- The title: base props reach the group, and styling goes only through named parts: verified (ListInput.tsx:1282-1310; tests at ListInput.test.tsx:1840-1935; probe and captures run here)
- The three earlier ListInput fixes in the series are merged and two pull requests remain: verified (live pull request states)
- The Core move is based on this branch, and only this pull request targets main: verified (live pull request bases)
- Before the change, a caller's ref, id, test id and other data attributes, describedby, details and handlers landed on the unlabelled Field box: verified (removed lines ref={ref} and {...rest} on Field; base capture run here)
- The old type accepted root xstyle, className and style: verified (BaseProps.ts; the removed BaseProps extension)
- Base props and ref now reach the group, which joins a caller's labelledby and describedby to its own: verified (ListInput.tsx:1283-1290; tests at :1840-1878; probe for dir, aria-disabled, tabIndex and onKeyDown)
- container* reach the Field box, except inside an InputGroup and in a horizontal-labels FormLayout, where they are ignored with a development warning: verified (fieldParts.ts:129, :152-173; tests at :1880-1935; InputGroup probe and capture run here)
- control* reach the group after its own styles: verified (ListInput.tsx:1300-1309; test at :1880-1897; capture run here)
- The type matches CheckboxList's: verified (CheckboxList.tsx:50-53; ListInput.tsx:125-128)
- CheckboxList, RadioList and the other FR10 inputs route these props the same way: verified (CheckboxList.tsx:330-343; RadioList.tsx:454-496)
- The shared rule drops untyped root styling with a warning and gives the container* warning in both excluded places: verified (fieldParts.ts:131-161; test at :1899-1911; probe run here)
- Inside an InputGroup ListInput still renders its own Field box, so the warning's wording is the rule's reason, not what the page shows: verified (probe and capture run here)
- The input-fields family's FR10 and DEC-7 describe this routing and bind every component that composes Field: verified (the current family record, FR10, DEC-7 and its membership note)
- A component audit found the defect: reported (the audit rubric is not in the repository)
- The smallest restoration is the type, the destructuring, the two elements' props and six doc rows: verified (the diff)
- ListInput calls the shared hook through Core's internal selectable-card entry, as SelectableCardGroup does: verified (ListInput.tsx:53; SelectableCardGroup.tsx:34-39)
- SelectableCardGroup's move keeps that entry with the hook as its only export, so the two land in either order: verified (that pull request's head; ListInput imports only that export)
- The shared warning points to astryx upgrade, whose codemod does not list ListInput: verified (fieldParts.ts:97-100; the v0.7.0 field-input-styling codemod's component lists)
- Lab is unreleased, so no migration and no changeset: verified (Lab's package.json is private and canary-only)
- Sixteen story states are pixel-identical before and after: reported (Tag options captured here: identical)
- Five of the new tests fail before the change, and the type test fails its typecheck there: verified (run here on main with the new test file: 5 failed, 45 passed; TS2578 at :1947)
- The new tests mirror Core's shared input-fields suite: verified (ListInput.test.tsx:1839-1951; fieldInputFamily.render-testing.tsx:58-161)
- Scope is ListInput, with no hidden public API and no internal context: verified (the diff; Lab is unpublished; private-context check found nothing)
- Rebased onto main after the empty-state fix merged, with the same patch: verified (merge base; tree identical to the previous head)
- The group keeps main's start-handle style and then takes controlXstyle: verified (ListInput.tsx:1300-1305; that commit is in the merge base)
- 50 ListInput tests pass: verified (run here: 50 passed)
- The Lab typecheck is clean: verified (run here after a Core build)
- Strict lint and Prettier are clean: reported (CI's Lint workflow passes at this head)
- The pre-review script, knowledge and changeset checks are clean: reported (not run here)
Files:
packages/lab/src/ListInput/ListInput.tsx: clearpackages/lab/src/ListInput/ListInput.test.tsx: clearpackages/lab/src/ListInput/ListInput.doc.mjs: clear
|
/approve-spec 2e20a52 |
1 similar comment
|
/approve-spec 2e20a52 |
cixzhang
left a comment
There was a problem hiding this comment.
Approved at this exact head.
ListInput to Core: #13758, #13759, and #13760 merged; two pull requests remain. Review and merge them in this order. #13762 is based on #13761, and only #13761 targets
main, so #13762 gets CI once it is retargeted.User impact
ListInput composes Field, but it put a caller's
ref,id,data-testidand otherdata-*attributes,aria-describedby,aria-details, and DOM handlers on the Field box: an unlabelled wrapper around the labelledrole="group"element. A test id or a ref pointed at the wrong element, and a caller's description never reached the group that assistive technology reads. Its type also took rootxstyle,className, andstyle, which styled the Field box. After this change base props andrefreach the group, and styling reaches the two named parts that CheckboxList and RadioList style:control*the group, andcontainer*the Field box, except inside an InputGroup and in ahorizontal-labelsFormLayout, where they are ignored with a development warning.Problem and solution fit
ListInputPropsextendedBaseProps, and the component spread the rest of its props and itsrefonto<Field>.getByTestIdand a ref find the wrapper, not the group;aria-describedbyandaria-detailsdescribe nothing a screen reader announces; a rootclassNamestyles a box that ListInput's own layout does not expect.Omit<FieldInputBaseProps<HTMLDivElement>, 'onChange'>.ref,id, DOM, and ARIA props reach the group, which joins a caller'saria-labelledbyandaria-describedbyto its own.containerXstyle,containerClassName, andcontainerStylereach the Field box, except inside an InputGroup and in ahorizontal-labelsFormLayout, where they are ignored with a development warning.controlXstyle,controlClassName, andcontrolStylereach the group after its own styles. Core's shared rule,useFieldInputStyling, drops an untyped caller's root styling with a development warning, and gives thecontainer*warning in both of those places. Inside an InputGroup, ListInput still renders its own Field box, so there the warning's "no Field box renders" names the rule's reason, not what the page shows.Expected behavior and authority
family:input-fieldsFR10 (base props reach the primary semantic control, therole="group"element for a group input; no root styling;container*reaches the Field box andcontrol*the control box) and DEC-7 (Field-composed components forbid root styling). FR10 binds every component that composes Field.Smallest restoration
ListInput.tsx; the six styling props in the doc's prop list and its dense descriptions.useFieldInputStylingthrough Core's internal@astryxdesign/core/internal/selectable-cardentry, as Lab's SelectableCardGroup does, so it has no copy of the rule and its warnings are the family's own.useFieldInputStylingas its only export, so this stack and feat(core): SelectableCardGroup moves to Core #13734 land in either order.astryx upgrade. Its codemod does not list ListInput, so that pointer does not apply here; the warning is the family's own, so this pull request leaves it as it is.Evidence
Real-browser screenshots of the Lab/ListInput stories at #13760's head and at this head, from static Storybook builds in headless Chromium at 2× scale, scoped to
#storybook-root. All 16 captured states are pixel-identical (0 differing pixels), and in each one the group's role,astryx-list-inputclass,data-state,data-reorderable,aria-busy, record count, and focused element match.The others: tag-options-dark, tag-options-gothic-dark, tag-options-y2k, tag-options-rtl, tag-options-forced-colors, tag-options-coarse-pointer, empty-mailing-list, disabled, loading, validation-statuses, reorder-handle-options, expense-allocations, family-member-declaration-320.
ref,id,data-testid,aria-details, andonFocuspassed to ListInput land on the Field box (the new prop-target tests fail on fix(ListInput): the English empty state adds no plural ending or article to the noun #13760's head).role="group"element.ref, and handlers; the joinedaria-labelledbyandaria-describedby;container*on the Field box andcontrol*on the group; untyped root styling dropped with a warning;container*ignored with a warning in a horizontal-labels FormLayout; and a type test, whose@ts-expect-errorfails the Lab typecheck if rootclassNametype-checks again. Five fail on fix(ListInput): the English empty state adds no plural ending or article to the noun #13760's head; the type test fails its typecheck there.Scope
Components: ListInput
Testing
main(0d0c173) after fix(ListInput): the English empty state adds no plural ending or article to the noun #13760 merged, with no conflicts; this pull request's own diff is unchanged (the same patch). Earlier,maingained fix(ListInput): a start reorder handle's finger target is at least an end handle's #13757, which changed the group's start-handle style: the group keeps fix(ListInput): a start reorder handle's finger target is at least an end handle's #13757's style expression and then takescontrolXstyle. A fresh capture of the 16 story states at this head is pixel-identical tomain's.pnpm exec vitest run --project ui packages/lab/src/ListInput/ListInput.test.tsx: 50 passed.pnpm -F @astryxdesign/lab exec tsc --noEmit -p tsconfig.json(after a Core build): clean.ASTRYX_STRICT_LINT=1 pnpm exec eslint packages/lab/src/ListInput/andprettier --check: clean.pnpm review:pre --base main: 0 findings.pnpm check:knowledgeandpnpm check:changesets: clean.