Skip to content

fix(docs): dense prop text in docs with only component entries reaches readers - #11839

Draft
cixzhang wants to merge 4 commits into
mainfrom
fix/doc-multi-component-props
Draft

cixzhang wants to merge 4 commits into
mainfrom
fix/doc-multi-component-props

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Primary intent

Fix: translated prop text that the docs pipeline silently drops. One guard test, plus three docs moved to the place the overlay reads.

User impact

  • People and agents reading dense docs (astryx component <Name> --dense; the docsite reads only each doc's English docs export, so it is unchanged) for ComplexSelector, Outline and TreeList:
    • Before: they saw the full English text for most props instead of the short dense text written for them, and an older, thinner short text for four Outline props.
    • After: they see the dense text.
  • Maintainers: a doc whose translated or dense prop text sits at the top level, where a doc with only component entries never reads it, now fails a test, instead of shipping silently.

Cause

A doc whose props live only on its components entries has no top-level prop table. The overlay (foundation/doc-compiler/overlays.mjs) lays a translation's top-level props or propDescriptions over the doc's top-level props only, so in such a doc that text matches nothing and is dropped. A doc whose parent has its own top-level props (for example Avatar, SegmentedControl) is not affected: its top-level text is read.

Change

  • New test packages/cli/test/core-doc-translation-placement.test.mjs: for every Core and Lab .doc.mjs with components and no top-level props, the docsZh and docsDense overlays must have no top-level props or propDescriptions.
  • ComplexSelector: the 23 dense prop descriptions move to a new components entry, with a dense description of the component. The accessibility key named no prop; its text ("custom content must provide its own accessible structure; use focus hooks; evaluate against WCAG 2.2") is already in the dense description, so it is removed.
  • Outline: the component entry takes the top-level text. For density, offset, scrollContainerRef and hasScrollOnClick that text matches the English more closely than the older entry text, which it contains.
  • TreeList: the component entry gains animatedLayout. The other five were the same.

No text lost: run through the real overlay, every top-level dense description on main (except the non-prop accessibility key) is shown after the change, and no prop that showed dense text before shows English after.

Evidence

Not in this pull request

  • TransferList (Lab): its dense overlay has three top-level keys (xstyle, className, style) for props the English TransferListSelector doc does not list. That is a stale-key fault, not a placement fault, so it is reported separately.
  • Integration docs: doctor integration validate's unknown_translated_prop skips this case for third-party docs. Reporting it there is a new finding, which ships first as a next note (architecture:cli-surface), so it is a separate change.

Owner and land path

  • Owner: Astryx maintainers, fix-loop lane 1.
  • Land path: code review, CI, merge.

…s readers

A doc whose props live only on its `components` entries has no top-level
prop table, so an overlay's top-level `props` or `propDescriptions` match
nothing and the overlay drops that text. A new CLI test fails on any Core
or Lab doc that places translated prop text there.

ComplexSelector, Outline and TreeList kept their dense prop text at the
overlay's top level. It now sits on each overlay's component entry:
- ComplexSelector: 23 descriptions move to a new component entry. The
  `accessibility` key named no prop; its text is already in the dense
  description, so it is removed.
- Outline: the component entry takes the top-level text, which matches
  the English for density, offset, scrollContainerRef and hasScrollOnClick
  more closely than the older entry text.
- TreeList: the component entry gains animatedLayout; the rest was the same.

MobileNav has the same fault and is fixed in its own pull request, so
this test passes once that one lands.
@vercel

vercel Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 19, 2026 9:32am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 15, 2026
@astracat-bot

astracat-bot Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 19, 2026, 10:15 AM UTC

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 8c86bd7

@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

Current run: The current CI run concluded skipped. Current analysis is unavailable.


Generated by PR Enrichment workflow | View current CI run

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes: the dense-docs move checks out, but this head cannot merge on its own.

  • The new test packages/cli/test/core-doc-translation-placement.test.mjs fails at this head because packages/core/src/MobileNav/MobileNav.doc.mjs still keeps its docsZh and docsDense prop text at the top level, so rebase onto main once #11621 merges (the test passes with that pull request's MobileNav.doc.mjs) or move MobileNav's text here.
  • The title says dense prop text in docs with only component entries reaches readers, but MobileNav still shows English at this head, so either land after #11621 or name the three docs in the title.
  • Miss: the description lists the docsite's dense view among the places readers gain the dense text, but the docsite loads only each component doc's English docs export (apps/docsite/scripts/generate-data.mjs:688), so drop it from the user impact or name the view that reads the dense text.

The moved text for ComplexSelector, Outline and TreeList reaches dense readers with nothing lost, and the public API is unchanged. As a follow-up, the guard could run each doc through the overlay itself, since it checks only where the text sits, not that the overlay applies it.

Claims and files checked

Review mode: same-head; reason: none

  • Changeset: the three docs now show their own short prop descriptions. Verified with the dense component read before and after.
  • Changeset: the text sat where the dense overlay never reads it. Verified in overlays.mjs:74.
  • Changeset: dense readers saw English for those props, or an older short version for four Outline props. Verified; the default component read shows the English first sentence and the props read shows it whole.
  • Description: top-level overlay props or propDescriptions match nothing in a doc with only component entries, and docs with top-level props such as Avatar and SegmentedControl are unaffected. Verified.
  • Description: the new test covers every Core and Lab doc with components and no top-level props, for both overlays. Verified in the test source.
  • Description: the 23 ComplexSelector descriptions move unchanged, and the non-prop accessibility text is already in the dense description. Verified.
  • Description: Outline's four props take wording closer to the English, and TreeList gains animatedLayout while its other five already matched. Verified.
  • Description: no dense text is lost and no prop falls back to English. Verified through the real overlay on base and head.
  • Description: the test fails on main naming four docs. Verified.
  • Description: at this head only MobileNav remains, and with #11621's file the test passes. Verified; this is the blocking finding.
  • Description: the related doc suites pass. Verified with 348 tests in 16 files; the stated 432 counts a wider selection.
  • Description: dense readers include the docsite's dense view. False: the docsite reads only each doc's English text, so it does not change (blocking).
  • Description: the TransferList stale keys and the integration validator's skip are out of scope. Verified.
  • File .changeset/dense-docs-component-prop-text.md: clear.
  • File packages/cli/test/core-doc-translation-placement.test.mjs: fails at this head (blocking).
  • File packages/core/src/ComplexSelector/ComplexSelector.doc.mjs: clear.
  • File packages/core/src/Outline/Outline.doc.mjs: clear.
  • File packages/core/src/TreeList/TreeList.doc.mjs: clear; the rest of the file is a formatting-only change.

Automated review (maintainer link)

A clean merge onto current main; no conflicts.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes: the dense-docs move for ComplexSelector, Outline and TreeList checks out, but this head still cannot merge on its own.

  • The new test packages/cli/test/core-doc-translation-placement.test.mjs still fails at this head because packages/core/src/MobileNav/MobileNav.doc.mjs keeps its docsZh and docsDense prop text at the top level, so merge main again once #11621 lands (the test passes with that pull request's MobileNav.doc.mjs) or move MobileNav's text here.
  • The title says dense prop text in docs with only component entries reaches readers, but MobileNav still shows English at this head, so either land after #11621 or name the three docs in the title.
  • Miss: the description lists the docsite's dense view among the places readers gain the dense text, but the docsite loads only each component doc's English docs export (apps/docsite/scripts/generate-data.mjs:688), so drop it from the user impact or name the view that reads the dense text.

The latest merge of main changes nothing in this pull request's own files, and the public API is unchanged. As a follow-up, the guard could run each doc through the overlay itself, since it checks only where the text sits, not that the overlay applies it.

Claims and files checked

Review mode: incremental; reason: none

  • changed rules (1): "Whatever the scope, these are computed over the whole pull request at the issued head" (incremental re-review scope). Result: checked: all five changed files, the governing architecture records and the full test, overlay and API runs at this head, no finding.
  • Changeset: the three docs now show their own short prop descriptions. Verified with the dense component read before and after.
  • Changeset: the text sat where the dense overlay never reads it. Verified in overlays.mjs:74.
  • Changeset: dense readers saw the full English text for those props, or an older short version for four Outline props. Verified; exactly those four Outline values change.
  • Description: top-level overlay text matches nothing in a doc with only component entries, while docs with their own top-level props such as Avatar and SegmentedControl are unaffected. Verified; their top-level dense text applies 12 of 12 and 8 of 8.
  • Description: the new test covers every Core and Lab doc with components and no top-level props, for both overlays. Verified in the test source.
  • Description: the 23 ComplexSelector descriptions move unchanged, and the non-prop accessibility text is already in the dense description. Verified.
  • Description: Outline's four props take wording closer to the English, and TreeList gains animatedLayout while its other five already matched. Verified.
  • Description: no dense text is lost and no prop falls back to English. Verified through the real overlay on base and head.
  • Description: the test fails on main naming ComplexSelector, MobileNav (both overlays), Outline and TreeList. Verified on the base.
  • Description: at this head only MobileNav remains, and with #11621's file the test passes. Verified; this is the blocking finding.
  • Description: the related doc suites pass. Verified with 375 tests in 18 files; the stated 432 counts a wider selection.
  • Description: dense readers include the docsite's dense view. False: the docsite reads only each doc's English text, so it does not change (blocking).
  • Description: the TransferList stale keys and the integration validator's skip are out of scope. Verified; TransferList's xstyle, className and style dense keys name no prop.
  • File .changeset/dense-docs-component-prop-text.md: clear.
  • File packages/cli/test/core-doc-translation-placement.test.mjs: fails at this head (blocking).
  • File packages/core/src/ComplexSelector/ComplexSelector.doc.mjs: clear.
  • File packages/core/src/Outline/Outline.doc.mjs: clear.
  • File packages/core/src/TreeList/TreeList.doc.mjs: clear; the rest of the file is a formatting-only change.

Automated review (maintainer link)

# Conflicts:
#	packages/core/src/ComplexSelector/ComplexSelector.doc.mjs
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec ebbe7b9

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes: the dense-docs move for ComplexSelector, Outline and TreeList works and the new test passes at this head, but the latest merge of main brought back a key the description says is removed.

  • packages/core/src/ComplexSelector/ComplexSelector.doc.mjs:430-431 puts the accessibility key back into the dense ComplexSelector component entry, where it names no prop, so the overlay drops it, the CLI's own overlay-key check reports it as unknown_translated_prop, and the description's "so it is removed" no longer holds: delete the two lines and narrow the maintainer line to the top-level placement the new test checks.

The public API is unchanged. As a follow-up, running the CLI's componentDocProblems over Core and Lab docs in the same test would also catch keys that name no prop, once TransferList's three stale keys are fixed.

Claims and files checked

Review mode: same-head; reason: none

  • changed rules (0): none
  • Changeset: the three docs now show their own short prop descriptions. Verified with the dense component read on base and head.
  • Changeset: the text sat where the dense overlay never reads it. Verified: the overlay applies top-level prop text only to a top-level prop table.
  • Changeset: dense readers saw English for those props, or an older short version for four Outline props. Verified; the default dense read showed English first sentences, and the props view the whole text.
  • Description: one guard test plus three docs moved to where the overlay reads. Verified.
  • Description: dense readers of the three docs now see the dense text, and the docsite, which reads only the English export, is unchanged. Verified.
  • Description: a doc that puts translated prop text where no reader gets it now fails a test. False as stated: the test checks only top-level placement and passes with the re-added accessibility key (part of the blocking finding).
  • Description: docs whose parent has its own top-level props, such as Avatar and SegmentedControl, are unaffected. Verified: both keep a top-level prop table.
  • Description: the new test covers every Core and Lab doc with components and no top-level props, for both overlays. Verified in the test source.
  • Description: the 23 ComplexSelector dense descriptions move to a new component entry with a dense component description. Verified.
  • Description: the accessibility key names no prop and its point is already in the dense description. Verified.
  • Description: so the accessibility key is removed. False: it is back at lines 430-431 (blocking).
  • Description: Outline's four props take wording closer to the English, and TreeList gains animatedLayout while its other five already matched. Verified.
  • Description: no dense text is lost and no prop falls back to English. Verified through the real overlay on base and head.
  • Description: the test fails before the fix, naming the affected docs. Verified on the current base, where it names ComplexSelector, Outline and TreeList.
  • Description: after merging main, the test passes at this head. Verified.
  • Description: the CLI node test project and the related doc suites pass. Not rerun in this review.
  • Description: TransferList's three stale dense keys and the integration check's blind spot are left to separate changes. Verified: both exist and are untouched.
  • File .changeset/dense-docs-component-prop-text.md: clear.
  • File packages/cli/test/core-doc-translation-placement.test.mjs: clear; it passes at this head.
  • File packages/core/src/ComplexSelector/ComplexSelector.doc.mjs: re-added accessibility key (blocking).
  • File packages/core/src/Outline/Outline.doc.mjs: clear.
  • File packages/core/src/TreeList/TreeList.doc.mjs: clear; the rest of the file is a formatting-only change.

Automated review (maintainer link)

… prop

The merge of main put the dense accessibility key back into the dense
ComplexSelector component entry. It names no prop, so the overlay drops it
and the CLI's overlay check reports it as an unknown translated prop. Its
point is already in the dense component description.
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 19af958

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI: CI has not run on this draft head yet, and runs once the pull request is marked ready for review.

The dense prop text for ComplexSelector, Outline and TreeList now reaches astryx component --dense readers with nothing lost, the stray accessibility key is gone, the new test fails without the fix and passes here, and the public API is unchanged. As a follow-up, running the CLI's componentDocProblems over Core and Lab docs in the same test would also catch keys that name no prop, once the existing displayName, PowerSearch and TransferList findings are fixed.

Claims and files checked

Review mode: incremental; reason: none

  • changed rules (0): none
  • Changeset: the dense docs of ComplexSelector, Outline and TreeList now show their own short prop descriptions. Verified with the dense component reads on base and head.
  • Changeset: the text sat where the dense overlay never reads it. Verified: the overlay applies top-level prop text only to a top-level prop table, and these docs have none.
  • Changeset: dense readers saw the full English text for those props, or an older short version for four Outline props. Verified: ComplexSelector showed English for every prop and TreeList for animatedLayout; exactly four Outline values change.
  • Description: the fix is one guard test plus three docs moved to where the overlay reads. Verified.
  • Description: dense readers of the three docs now see the dense text, while the docsite, which reads only the English export, is unchanged. Verified: the English and Chinese exports evaluate identically on base and head.
  • Description: a doc with only component entries that keeps translated or dense prop text at the top level now fails a test. Verified: the test fails on the base naming the three docs.
  • Description: the overlay lays top-level prop text over top-level props only, so such a doc drops it, while docs with their own top-level props such as Avatar and SegmentedControl are unaffected. Verified: both keep a top-level prop table.
  • Description: the new test covers every Core and Lab doc with component entries and no top-level props, for both overlays. Verified in the test source.
  • Description: the 23 ComplexSelector dense descriptions move to a new component entry with a dense component description. Verified; the text is unchanged.
  • Description: the accessibility key named no prop, its point is already in the dense description, and it is removed. Verified at this head.
  • Description: Outline's four props take the fuller wording, closer to the English and keeping every point of the older text. Verified.
  • Description: TreeList gains animatedLayout and its other five entries were already the same. Verified.
  • Description: no dense text is lost and no prop that showed dense text before shows English after. Verified through the real overlay on base and head.
  • Description: the test failed on main before the MobileNav fix, naming ComplexSelector, MobileNav (both overlays), Outline and TreeList. Verified: MobileNav kept top-level text in both overlays before that fix, and the other three fail on the base.
  • Description: with main merged after the MobileNav fix, the test passes at this head. Verified, and it also passes merged with the current tip of main.
  • Description: the CLI's node tests and the related doc suites pass. Verified: at this head the CLI's node tests pass apart from four environment-dependent tests (a git file listing, the system temp folder, process titles) that fail the same way without this change; the stated count covers a different selection.
  • Description: TransferList's three stale dense keys and the integration check's skip of this case are left to separate changes. Verified: both exist and are untouched.
  • File .changeset/dense-docs-component-prop-text.md: clear.
  • File packages/cli/test/core-doc-translation-placement.test.mjs: clear; fails on the base, passes at this head.
  • File packages/core/src/ComplexSelector/ComplexSelector.doc.mjs: clear; the non-prop accessibility key is gone.
  • File packages/core/src/Outline/Outline.doc.mjs: clear.
  • File packages/core/src/TreeList/TreeList.doc.mjs: clear; the rest of the file is a formatting-only change.

Automated review (maintainer link)

This branch was successfully deployed

1 active deployment
Preview — 19af9587 Deployed Nov 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant