Repository navigation
docs(TransferListSelector): dense text names the control props - #11922
Conversation
The dense overlay keyed the control box's class, style and StyleX text as xstyle, className and style, which TransferListSelector does not document, so the overlay dropped that text and dense docs showed the English. The keys now name controlXstyle, controlClassName and controlStyle. A new test checks that every dense key names a documented prop.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec 8678208 |
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC |
|---|---|---|
| lab/TransferList | 112.1 kB (0) · 1.2 kB CSS (0) | — |
| lab/TransferListSelector | 121.1 kB (0) · 1.4 kB CSS (0) | — |
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
There was a problem hiding this comment.
Requesting changes: the docs fix itself is correct, but two claims in the pull request description are false. Both are fixed by editing the description.
- The User impact says the docsite's dense view shows the English text, but the docsite builds component pages from
docsonly (apps/docsite/scripts/generate-data.mjs:651-652,:687-688) and never readsdocsDense; drop the docsite from that sentence. - The Testing line says
vitest run packages/lab/src/TransferListgives "54 passed, plus the 2 new doc cases", but that command runs 54 tests in 4 files with the 2 new cases among them (52 existing), and Evidence counts the same 4 files and 54 tests as the unchanged suites; write "54 passed in 4 files: 52 existing, plus the 2 new doc cases".
Non-blocking: the new test restates the overlay-key check that astryx doctor integration validate already runs over every Lab doc, so running that validator for Lab in CI would guard the other Lab docs too.
Claims and files checked
Review mode: same-head; reason: none
- Claim: the three dense keys named props the selector does not document, so their text was dropped: verified (
TransferList.doc.mjs:241-256,TransferListSelector.tsx:104-106; the validator reports the three keys on the base). - Claim: the keys now name the documented props, and the member's own
xstyletext is unchanged: verified (TransferList.doc.mjs:781-783,:815). - Claim:
astryx component TransferList --denseshows the short text: verified (its output differs in exactly those three lines). - Claim: the docsite's dense view changes: false (the docsite reads
docsonly). - Claim: the integration validator reports this case as an unknown translated prop: verified.
- Claim: the new test fails before the change with the three keys and passes after: verified.
- Claim: 54 passed plus the 2 new cases, and 4 files and 54 tests as the unchanged suites: false (the 54 include the 2 new cases).
- Claim: Prettier is clean: verified.
- Claim: no public API, prop or visual change, and no changeset because the Lab package is private: verified (
packages/lab/package.json). - Claim: the two overlapping open pull requests change only the
reorderabletext in this doc file, on other lines: verified. - File
packages/lab/src/TransferList/TransferList.doc.mjs: clear. - File
packages/lab/src/TransferList/TransferList.doc.test.mjs: one non-blocking note (it restates the validator's check).
| function unknownKeys(props, descriptions) { | ||
| const names = new Set((props ?? []).map(prop => prop.name)); | ||
| return Object.keys(descriptions ?? {}).filter(key => !names.has(key)); | ||
| } |
There was a problem hiding this comment.
Non-blocking: this restates the unknown_translated_prop rule that astryx doctor integration validate already applies to every Lab doc (it reports these three keys before the change and none after). Running that validator for Lab in CI would guard the other Lab docs too, and this per-file helper could then go.
There was a problem hiding this comment.
Approved. The dense-text fix is correct, every claim in the description matches the evidence, and CI passes on this head; no changes are needed.
Non-blocking: the new test restates the overlay-key check that astryx doctor integration validate already runs over every Lab doc, so running that validator for Lab in CI would guard the other Lab docs too.
Claims and files checked
Review mode: same-head; reason: none
- Changed rules since the last review: 0.
- Claim: the three dense keys named props the selector does not document, so the dense docs showed the English text: verified (
TransferList.doc.mjs:241-256,TransferListSelector.tsx:104-106; base--denseoutput lines 72-74; the validator reports the three keys on the base). - Claim: a dense overlay applies a description by the prop's whole name: verified (
packages/cli/foundation/doc-compiler/overlays.mjs:74-79). - Claim: the keys now name the documented props with control-box text, and the member's own
xstyletext is unchanged: verified (TransferList.doc.mjs:781-783,:815,:389). - Claim:
astryx doctor integration validatereports this case as an unknown translated prop: verified (three warnings on the base, none on the head). - Claim: one docs file and one new test change, with no record change: verified.
- Claim: no public API, prop or visual change, and no changeset because the Lab package is private: verified (
packages/lab/package.json;CONTRIBUTING.mdexempts private and canary-only packages). - Claim: the new test fails before the change with the three keys and both cases pass after: verified (the new test run against the base's doc).
- Claim:
vitest run packages/lab/src/TransferListpasses 54 tests in 4 files, 52 existing plus the 2 new cases: verified, locally and in CI. - Claim: Prettier is clean: verified.
- Claim: the two overlapping pull requests change only the
reorderabletext in this doc file, on other lines: verified. - Claim: public text carries no internal context: verified.
- File
packages/lab/src/TransferList/TransferList.doc.mjs: clear. - File
packages/lab/src/TransferList/TransferList.doc.test.mjs: one non-blocking note (it restates the validator's check).
User impact
People and agents who read Lab
TransferListSelector's dense docs (astryx component TransferList --dense) see the full English text forcontrolXstyle,controlClassNameandcontrolStyleinstead of the short dense text. The dense overlay names those three propsxstyle,classNameandstyle, whichTransferListSelector's docs do not list, so the overlay drops their text.Problem and solution fit
TransferListSelectorPropspickscontrolXstyle,controlClassNameandcontrolStylefromComplexSelector, and the English doc lists them by those names. The dense keysxstyle,classNameandstylematch no prop, so their text is dropped.TransferListmember's own densexstyletext is unchanged; it names a prop that member documents.Expected behavior and authority
The dense overlay contract in the docs pipeline: a
propDescriptionskey names a documented prop, or its text is never shown (astryx doctor integration validatereports this case asunknown_translated_propfor integrations). This is a docs defect repair; no record changes.Smallest restoration
TransferList.doc.mjs), plus one new test.@astryxdesign/labis private.Evidence
TransferList.doc.test.mjschecks that every dense key names a documented prop, forTransferListSelectorand for each member component. Before the change it fails with['xstyle', 'className', 'style'].Scope
Components: TransferListSelector (lab)
Testing
vitest run packages/lab/src/TransferList: 54 passed in 4 files: 52 existing, plus the 2 new doc cases.Overlap checked: #11575, #11454 (they change the
reorderabletext in the same doc file for the reorder handle's placement; this PR changes only the three control-box dense keys, on different lines, and neither PR touches those keys)Owner and land path
Owner: Cindy's Astryx gaps lane 3 (agent). Land path: Specs stamp as a docs defect repair, then CodeBunny review on the exact head, then ready, CI, and merge through the drain queue. No release (
@astryxdesign/labis private).