Skip to content

fix(indicator): close the six audit blocks on the indicator layer - #4890

Merged
cixzhang merged 2 commits into
mainfrom
indicator-audit-fixes
Aug 11, 2026
Merged

cixzhang merged 2 commits into
mainfrom
indicator-audit-fixes

Conversation

@cixzhang

Copy link
Copy Markdown
Contributor

What

The first rubric audit of the indicator layer (68.0 / D, mode O, at 505ccaa327) found six blocking defects. This closes all six, plus the raw radius the same audit recorded as a FIX.

The system-level design came through the audit intact — replacement by name works, families type-check, hover reaches the visual with no props, and the owner-drawn focus ring survives a replacement that forwards nothing. Every defect here is at an edge: one indicator honoured the props contract on only one of its two paths, the documented extension path returned undefined, the docs prescribed an API that was never built, and a public theme target was deleted as a patch.

Rubric ID Section Defect Fix
P2 §3 API contract CheckIndicator's children branch rendered a bare span that dropped ...rest and xstyle — a caller's data-testid, id, handlers and styling vanished whenever children were passed The branch now spreads the same props as the primary path
B15 §4 Behavior if (!isChecked) return null ran before the children branch, so a host passing a busy Spinner through an unchecked row rendered nothing — the state a listbox row is usually in Children are checked first; state only decides what the mark is
B12 §4 Behavior defaultIndicators was typed as a total map over the open IndicatorName union, so the documented augmentation path compiled while getIndicator handed back undefined and rendering it threw Core's names are a closed CoreIndicatorName; getIndicator/useIndicator are overloaded — a core name always resolves, an augmented one is | undefined
T33 §2 Theming Public target astryx-dropdown-menu-radio-dot was removed with a patch changeset and no codemod; runtime themes are not validated, so a theme keyed on it silently stops matching [breaking] changeset + rename-dropdown-menu-radio-dot-target, staged in transforms/next
V3 §6 Testing No test covered CheckIndicator at all — the default mark, and the component carrying three of the audit's defects Three CheckIndicator cases + a new indicatorRegistry.test.tsx
X5a §8 Docs The docs told theme authors to spread indicatorFocusRingProps(), which exists nowhere in the repo, and described a "tells the owning control to stand down" marker that was never built Replaced with what shipped: the owner paints the ring on the indicator's own element (useIndicatorFocusRing), and a replacement only needs a root element with the radius it wants the outline to follow

Two other doc clauses contradicted the design we merged and now match T34: children is "rendered INSTEAD of the mark" in every state, and the DON'T against "render only in the selected state" became a DON'T against assuming you are only mounted when selected — the host renders unconditionally and passes state; drawing nothing in a state is the indicator's call.

⚠️ One thing to rule on: --radius-full squares the radio under a sharp theme

Per your note, the radio circle and dot now use radiusVars['--radius-full'] instead of a raw 50%. On the neutral theme this is pixel-identical, as expected — the boxes are square (24/20 for the circle, 10/8 for the dot) and --radius-full is 9999px:

0 of 5,670,000 pixels differ across RadioList, the menu radio, and the Selector radio replacement, in light and dark.

neutral before/after

But y2k sets --radius-full: 0px (it zeroes every radius — radius.multiplier: 0, brutalist by design). So the radio becomes a square there. Measured, not inferred: the corner pixel of the 24×24 box goes from rgb(255,255,255) (outside the circle) to rgb(47,41,46) (border), and the painted fraction of the box goes 16.8% → 84.0%.

y2k before/after

selector radio replacement, y2k

The consequence worth your call: under y2k the radio now has the same silhouette as the checkbox, so the mark inside (dot vs check) is the only thing telling single-choice from multi-choice apart.

silhouette collision

Arguments both ways, briefly:

  • Keep the token (what this PR does). It is the house convention — Avatar already uses --radius-full and is already square under y2k — and it is the whole point of this workstream: the radio's shape becomes themeable instead of hard-coded. A theme that asked for zero radius everywhere gets it.
  • Go back to 50%. Shape is the affordance for single-vs-multiple selection, and a theme squaring an avatar is not the same decision as a theme squaring a radio. Reverting is two lines in RadioIndicator.tsx.

I implemented the first because you asked for the token; say the word and I'll flip it.

Note also: 7 other core files still use borderRadius: '50%' (Pagination, Calendar, AspectRatio, Table row status, ListItem, NavIcon, StatusDot). I did not sweep them — 50% and --radius-full are interchangeable only while the box is square (measured: square 24×24 → 0/7056 px differ; wide 60×24 → 23.5% differ, ellipse vs stadium), and several of those are not guaranteed square.

Consumer-facing API changes

Resolving an indicator core doesn't ship. Augmenting IndicatorMap no longer lies about resolution:

declare module '@astryxdesign/core/Indicator' {
  interface IndicatorMap {
    'brand-star': 'singleSelection';
  }
}

const Check = useIndicator('check');            // IndicatorComponent<'singleSelection'>
const Star  = useIndicator('brand-star');       // ... | undefined  ← you own the default
const Safe  = useIndicator('brand-star') ?? BrandStar;

No core call site changes: every one of them passes a literal core name, which hits the non-optional overload.

Removed theme target. dropdown-menu-radio-dot is gone; menu radios draw the shared radio indicator, so the dot carries radio-indicator-dot (and the legacy radio-dot). The row's circle keeps dropdown-menu-radio. astryx upgrade rewrites the key and the astryx-dropdown-menu-radio-dot class.

The rename is not scope-preserving and cannot be — there is no menu-only dot element left to address, so radio-indicator-dot reaches every radio dot in the app. The codemod therefore leaves a TODO at each site it rewrites rather than pretending the swap is equivalent.

Judgment call: I marked this [breaking] / minor, per T33 and the changeset gate ([breaking] must be minor while 0.x). You said patch was fine for the radio dot rename — and it was, because that one kept both names via legacyNames. This target is genuinely deleted with no alias, and a theme gets no error. If you'd rather hold the release train, deleting the second changeset keeps it a patch and the codemod still ships.

Test plan

Everything below was run on this branch, not assumed.

Positive controls first — each new test was run against the pre-fix code to confirm it fails.

  • CheckIndicator children/props tests, run against 505ccaa327:CheckIndicator.tsx: 2 failed (renders children INSTEAD of the mark, in both states; forwards caller props and styling on both render paths), 17 passed.
  • Registry type test, tsc against 505ccaa327:indicatorRegistry.ts: fails with TS2741: Property '"brand-star"' is missing in type ... but required — the unsoundness made visible — plus TS2578: Unused '@ts-expect-error' directive where the old signature wrongly promised a component.
  • Visual harness control: light-vs-dark diff of the same story reports 5,670,000 differing pixels, so a 0 is a real 0.
  • Codemod: no-op on files that never mention the target; dropdown-menu-radio (the surviving circle target) left untouched; idempotent.

Suites

Check Result
vitest — Indicator, CheckboxInput, RadioList, Selector, DropdownMenu, theme, cli codemods 1663 passed (87 files)
tsc core clean
tsc docs (typecheck:docs) clean
CI=true eslint --no-cache on both touched trees 0 errors, 0 warnings
check:sync / check:changesets / check:use-client / check:package-boundaries / check:cli-structure all green
sync:exports:check up to date

Visual

Real Chromium via Playwright against two Storybook instances — 505ccaa327 (before) and this branch (after) — 51 image pairs across 7 stories × {neutral light, neutral dark, y2k light}, at deviceScaleFactor: 3, with full-page shots and element crops of the circle, dot and checkbox box. Each capture asserts its subject is in the DOM before shooting, so a missing story or an unopened listbox fails loudly instead of diffing two error pages.

  • 37 of 51 pairs are byte-identical. Every differing pair is y2k, and every one of them is the radius change above.
  • Negative control: CheckboxInput / All Variations — untouched by this PR — is 0-pixel identical in all three theme/mode combinations.
  • Computed border-radius recorded for every crop: 50% → 9999px under neutral, 50% → 0px under y2k.

Follow-up

Re-audit and the ledger row update (the rubric requires the score to move and the change to be explained) once this lands.

Related: #4712 (the indicator layer this audits), rubric T34 corrected on the wiki in 3812e91.

The first rubric audit of the indicator layer (68.0/D, mode O, commit
505ccaa) found six blocking defects. This closes all six, plus the
raw radius the same audit flagged.

- P2  CheckIndicator dropped `...rest` and `xstyle` on its children
      branch, so a caller's data-testid, id, handlers and styling
      vanished whenever children were passed.
- B15 CheckIndicator returned null before it looked at children, so a
      host passing a busy Spinner through an unchecked row rendered
      nothing at all -- the state a listbox row is usually in.
- B12 `defaultIndicators` was typed as a TOTAL map over the OPEN
      `IndicatorName` union, so the documented augmentation path
      compiled while `getIndicator` handed back undefined. Core's own
      names are now a closed `CoreIndicatorName`, and the resolvers are
      overloaded: a core name always resolves, an augmented one is
      `| undefined` and the caller has to say what to do about it.
- T33 The public `astryx-dropdown-menu-radio-dot` target was removed
      with a patch changeset and no codemod. Now a [breaking] changeset
      plus `rename-dropdown-menu-radio-dot-target`, staged in
      transforms/next.
- V3  No test covered CheckIndicator at all. Adds its three cases and a
      registry test file that augments IndicatorMap for real.
- X5a The docs told theme authors to spread `indicatorFocusRingProps()`,
      which exists nowhere; what shipped is useIndicatorFocusRing, and
      the owner paints the ring on the indicator with no cooperation.

Also: the radio circle and dot use `--radius-full` instead of a raw
`50%` (pixel-identical on a square box, which the size styles
guarantee), and two doc clauses that contradicted the shipped design --
"rendered instead of the mark" without saying "in every state", and a
DON'T against drawing nothing in a state -- now match T34.
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Aug 11, 2026
@vercel

vercel Bot commented Aug 11, 2026 •

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
astryx Ignored Ignored Aug 11, 2026 2:40pm

Request Review

…eckIndicator paths

Self-review: the children branch spread `...rest` last, so a caller could
override the indicator's own aria-hidden -- the opposite of the glyph path,
which spreads first and says so in a comment. Also makes the registry test's
core-name list a Record over the union, so adding a name to
CoreIndicatorName without shipping a default fails to compile in the test.
@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Aug 11, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

Self review

Things I'd want a reviewer to push back on, in the order I'd push back:

  1. --radius-full squaring the radio under y2k is the only behaviour change here that a user could see, and it's a design decision, not a bug fix. Flagged up top with the pixel evidence. Everything else in this PR is a defect closure.

  2. [breaking] / minor for the deleted target. This is the second judgment call. The rule (T33, and the changeset gate) is unambiguous, but the release-train cost is yours to weigh, and the codemod carries most of the safety on its own.

  3. CoreIndicatorName is hand-written, not derived — it has to be, since IndicatorMap is open by design and the closed set is precisely "what's in defaultIndicators". The test pins the two together with a Record<CoreIndicatorName, true>, so adding a name to the type without shipping a default fails to compile in the test rather than at some consumer's render. I couldn't find a derivation that stays correct under augmentation; if you know one, it'd be strictly better.

  4. The codemod widens scope and says so rather than pretending the rename is equivalent. A dropdown-menu-radio-dot rule becomes an all-radio-dots rule, because there is no menu-only dot element left. I considered emitting the old class as a legacyName on the indicator's dot instead — rejected: it would put astryx-dropdown-menu-radio-dot on every radio dot in the app, which is the same widening with none of the visibility.

  5. What I did not do: the other 7 core files using borderRadius: '50%'. 50% and --radius-full diverge the moment a box isn't square (measured: 60×24 differs by 23.5%), and I'd want each one checked rather than swept.

Fixed during self-review (1ddfd92cab): the children branch spread ...rest last, so a caller could override the indicator's own aria-hidden — the opposite of the glyph path two lines below, which spreads first and explains why.

@github-actions

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

🧪 Sandbox Preview

View Sandbox for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

Modified Components

Indicator (@astryxdesign/core)
Metric Before After Delta
Bundle Size (ESM) N/A N/A N/A
Lines of Code N/A 527 -
Complexity N/A High (24) -

Bundle Size Summary

Package Size (ESM) Size (CJS) Gzipped
@astryxdesign/core N/A 4.7KB 1.2KB

Accessibility Audit

Status: No accessibility violations detected.


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

github-actions Bot added a commit that referenced this pull request Aug 11, 2026

@kentonquatman kentonquatman 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.

This looks correct. Styling for radio buttons should driven by the theme tokens.

@cixzhang
cixzhang merged commit b4ec116 into main Aug 11, 2026
22 checks passed
cixzhang added a commit that referenced this pull request Aug 11, 2026
The busy idiom a host writes is `children={isBusy && <Spinner/>}`, which
passes `false` when it is not busy. `false` is not null and is not caught
by `??`, so every indicator took its children path, rendered nothing in
it, and dropped the checkmark, the checkbox tick and the radio dot on
every selected row.

Filed as #4893 against CheckIndicator, where #4890 moved the branch. It
was wider: measured before writing anything, ALL THREE indicators lost
their mark on `false` and on `''`. CheckIndicator additionally leaked an
empty span. #4890 widened its case from one state to every state -- the
unchecked early return had been masking it.

All three now guard with `isRenderable`, the util the repo already ships
for this. `0` still counts as content: it renders the character "0".

Also, both from the #4890 audit and contained to the same lines:
CheckIndicator's children slot now reserves the glyph's 1rem box and
carries its color, so swapping a Spinner in neither shifts the row nor
loses the disabled shade.

Adds apps/storybook/stories/Indicator.stories.tsx -- the indicators had
no story file (#4894), which is why the children path had no rendered
coverage and this shipped unseen.

Not fixed here: `ref` is dropped on the glyph path. Icon in string mode
routes through IconFromRegistry, which takes no ref, so that is a change
to Icon's ref behavior for every caller -- its own PR.
cixzhang added a commit that referenced this pull request Aug 11, 2026
#4913)

* fix(indicator): a falsy child no longer deletes the state mark

The busy idiom a host writes is `children={isBusy && <Spinner/>}`, which
passes `false` when it is not busy. `false` is not null and is not caught
by `??`, so every indicator took its children path, rendered nothing in
it, and dropped the checkmark, the checkbox tick and the radio dot on
every selected row.

Filed as #4893 against CheckIndicator, where #4890 moved the branch. It
was wider: measured before writing anything, ALL THREE indicators lost
their mark on `false` and on `''`. CheckIndicator additionally leaked an
empty span. #4890 widened its case from one state to every state -- the
unchecked early return had been masking it.

All three now guard with `isRenderable`, the util the repo already ships
for this. `0` still counts as content: it renders the character "0".

Also, both from the #4890 audit and contained to the same lines:
CheckIndicator's children slot now reserves the glyph's 1rem box and
carries its color, so swapping a Spinner in neither shifts the row nor
loses the disabled shade.

Adds apps/storybook/stories/Indicator.stories.tsx -- the indicators had
no story file (#4894), which is why the children path had no rendered
coverage and this shipped unseen.

Not fixed here: `ref` is dropped on the glyph path. Icon in string mode
routes through IconFromRegistry, which takes no ref, so that is a change
to Icon's ref behavior for every caller -- its own PR.

* fix(storybook): key the Indicator stories to the component, not to meta

CI caught what my local run could not: 'satisfies Meta' + StoryObj<typeof
meta> makes `args` required on every story, and `state` is required on an
indicator, so five render-only stories failed the storybook typecheck.

122 of the 123 story files use `const meta: Meta<typeof X>` with
`StoryObj<typeof X>`; mine was the one that did not. Now it matches.

Verified the way CI does, after a full `pnpm build`: storybook typecheck
clean, storybook build completes, core typecheck (incl. tests) clean, cli
typecheck:strict clean, docsite generate + 364 tests green.

* fix(docsite): carry deprecatedFor and replaces in the generated registry types

The docsite keeps its own copy of the authoring doc types, and `next build`
type-checks the emitted componentRegistry.ts against it. Two fields had
drifted out of that copy, so any full docsite build failed:

  deprecatedFor  added to ComponentThemingTarget by #4712 (Indicator's
                 renamed theme targets)
  replaces       on ComponentThemingDerivedVar, used by TextArea

Pre-existing on main, not introduced here -- verified by building the
docsite on a clean origin/main worktree, which fails with the same
`'deprecatedFor' does not exist in type 'ThemingTarget'`, and passes
(315/315 static pages) with only this one-file fix applied. It surfaced
on this PR because the change touches core .doc.mjs inputs, so Vercel's
ignored-build-step ran a docsite build for the first time since #4712.

Adds SYNC breadcrumbs on both authoring interfaces, since `check:sync`
is the mechanism the repo already uses to catch exactly this drift.

Diffed all six shared shapes; these two were the only gaps.
cixzhang added a commit that referenced this pull request Aug 12, 2026
…ets guard

MoreMenu hand-assembled its `astryx-more-menu` theme target with
`stableClassName()` and string concatenation. Route it through
`themeProps()`/`mergeProps()` instead, so the target sits on the same
reflection surface as every other one. The rendered DOM is unchanged.

themingTargets.test.ts grows the second direction of the guard —
documented targets must actually be rendered — and scans both
`@astryxdesign/core` and `@astryxdesign/lab` package-wide for the
`docs` block. `docsZh` stays a per-directory check.

Rebased onto main, which moved 69 commits under it:

- `themeProps()` gained a third `options.legacyNames` argument
  (#4712, #4890) for targets renamed behind a deprecation window. The
  extractor only read the first two arguments, so `astryx-checkbox`,
  `astryx-radio` and `astryx-radio-dot` — emitted through
  `legacyNames` and deliberately documented with `deprecatedFor` —
  looked unrendered. Teach it to read `legacyNames` string literals as
  rendered sites of their own, with the same prop keys (they land on the
  same element), and cover it with two extractor tests.
- ListInput (#4740) and TransferList (#4870) landed after this branch
  was cut and render five undocumented targets between them. Document
  them, the same way the other lab components here are documented.
- Stepper's targets were extended on main with the same
  `indicatorPosition` entry this branch added, plus
  `astryx-step-indicator` and the matching `docsZh` block; kept
  main's superset. Both sides' new MoreMenu tests are kept.
cixzhang added a commit that referenced this pull request Aug 12, 2026
…ets guard

MoreMenu hand-assembled its `astryx-more-menu` theme target with
`stableClassName()` and string concatenation. Route it through
`themeProps()`/`mergeProps()` instead, so the target sits on the same
reflection surface as every other one. The rendered DOM is unchanged.

themingTargets.test.ts grows the second direction of the guard —
documented targets must actually be rendered — and scans both
`@astryxdesign/core` and `@astryxdesign/lab` package-wide for the
`docs` block. `docsZh` stays a per-directory check.

Rebased onto main, which moved 69 commits under it:

- `themeProps()` gained a third `options.legacyNames` argument
  (#4712, #4890) for targets renamed behind a deprecation window. The
  extractor only read the first two arguments, so `astryx-checkbox`,
  `astryx-radio` and `astryx-radio-dot` — emitted through
  `legacyNames` and deliberately documented with `deprecatedFor` —
  looked unrendered. Teach it to read `legacyNames` string literals as
  rendered sites of their own, with the same prop keys (they land on the
  same element), and cover it with two extractor tests.
- ListInput (#4740) and TransferList (#4870) landed after this branch
  was cut and render five undocumented targets between them. Document
  them, the same way the other lab components here are documented.
- Stepper's targets were extended on main with the same
  `indicatorPosition` entry this branch added, plus
  `astryx-step-indicator` and the matching `docsZh` block; kept
  main's superset. Both sides' new MoreMenu tests are kept.
@github-actions
github-actions Bot deleted the indicator-audit-fixes branch August 13, 2026 06:36
cixzhang added a commit that referenced this pull request Aug 14, 2026
…ets guard

MoreMenu hand-assembled its `astryx-more-menu` theme target with
`stableClassName()` and string concatenation. Route it through
`themeProps()`/`mergeProps()` instead, so the target sits on the same
reflection surface as every other one. The rendered DOM is unchanged.

themingTargets.test.ts grows the second direction of the guard —
documented targets must actually be rendered — and scans both
`@astryxdesign/core` and `@astryxdesign/lab` package-wide for the
`docs` block. `docsZh` stays a per-directory check.

Rebased onto main, which moved 69 commits under it:

- `themeProps()` gained a third `options.legacyNames` argument
  (#4712, #4890) for targets renamed behind a deprecation window. The
  extractor only read the first two arguments, so `astryx-checkbox`,
  `astryx-radio` and `astryx-radio-dot` — emitted through
  `legacyNames` and deliberately documented with `deprecatedFor` —
  looked unrendered. Teach it to read `legacyNames` string literals as
  rendered sites of their own, with the same prop keys (they land on the
  same element), and cover it with two extractor tests.
- ListInput (#4740) and TransferList (#4870) landed after this branch
  was cut and render five undocumented targets between them. Document
  them, the same way the other lab components here are documented.
- Stepper's targets were extended on main with the same
  `indicatorPosition` entry this branch added, plus
  `astryx-step-indicator` and the matching `docsZh` block; kept
  main's superset. Both sides' new MoreMenu tests are kept.
cixzhang added a commit that referenced this pull request Aug 14, 2026
…ets guard

MoreMenu hand-assembled its `astryx-more-menu` theme target with
`stableClassName()` and string concatenation. Route it through
`themeProps()`/`mergeProps()` instead, so the target sits on the same
reflection surface as every other one. The rendered DOM is unchanged.

themingTargets.test.ts grows the second direction of the guard —
documented targets must actually be rendered — and scans both
`@astryxdesign/core` and `@astryxdesign/lab` package-wide for the
`docs` block. `docsZh` stays a per-directory check.

Rebased onto main, which moved 69 commits under it:

- `themeProps()` gained a third `options.legacyNames` argument
  (#4712, #4890) for targets renamed behind a deprecation window. The
  extractor only read the first two arguments, so `astryx-checkbox`,
  `astryx-radio` and `astryx-radio-dot` — emitted through
  `legacyNames` and deliberately documented with `deprecatedFor` —
  looked unrendered. Teach it to read `legacyNames` string literals as
  rendered sites of their own, with the same prop keys (they land on the
  same element), and cover it with two extractor tests.
- ListInput (#4740) and TransferList (#4870) landed after this branch
  was cut and render five undocumented targets between them. Document
  them, the same way the other lab components here are documented.
- Stepper's targets were extended on main with the same
  `indicatorPosition` entry this branch added, plus
  `astryx-step-indicator` and the matching `docsZh` block; kept
  main's superset. Both sides' new MoreMenu tests are kept.
cixzhang added a commit that referenced this pull request Aug 14, 2026
…ets guard

MoreMenu hand-assembled its `astryx-more-menu` theme target with
`stableClassName()` and string concatenation. Route it through
`themeProps()`/`mergeProps()` instead, so the target sits on the same
reflection surface as every other one. The rendered DOM is unchanged.

themingTargets.test.ts grows the second direction of the guard —
documented targets must actually be rendered — and scans both
`@astryxdesign/core` and `@astryxdesign/lab` package-wide for the
`docs` block. `docsZh` stays a per-directory check.

Rebased onto main, which moved 69 commits under it:

- `themeProps()` gained a third `options.legacyNames` argument
  (#4712, #4890) for targets renamed behind a deprecation window. The
  extractor only read the first two arguments, so `astryx-checkbox`,
  `astryx-radio` and `astryx-radio-dot` — emitted through
  `legacyNames` and deliberately documented with `deprecatedFor` —
  looked unrendered. Teach it to read `legacyNames` string literals as
  rendered sites of their own, with the same prop keys (they land on the
  same element), and cover it with two extractor tests.
- ListInput (#4740) and TransferList (#4870) landed after this branch
  was cut and render five undocumented targets between them. Document
  them, the same way the other lab components here are documented.
- Stepper's targets were extended on main with the same
  `indicatorPosition` entry this branch added, plus
  `astryx-step-indicator` and the matching `docsZh` block; kept
  main's superset. Both sides' new MoreMenu tests are kept.
cixzhang added a commit that referenced this pull request Aug 25, 2026
…ets guard

MoreMenu hand-assembled its `astryx-more-menu` theme target with
`stableClassName()` and string concatenation. Route it through
`themeProps()`/`mergeProps()` instead, so the target sits on the same
reflection surface as every other one. The rendered DOM is unchanged.

themingTargets.test.ts grows the second direction of the guard —
documented targets must actually be rendered — and scans both
`@astryxdesign/core` and `@astryxdesign/lab` package-wide for the
`docs` block. `docsZh` stays a per-directory check.

Rebased onto main, which moved 69 commits under it:

- `themeProps()` gained a third `options.legacyNames` argument
  (#4712, #4890) for targets renamed behind a deprecation window. The
  extractor only read the first two arguments, so `astryx-checkbox`,
  `astryx-radio` and `astryx-radio-dot` — emitted through
  `legacyNames` and deliberately documented with `deprecatedFor` —
  looked unrendered. Teach it to read `legacyNames` string literals as
  rendered sites of their own, with the same prop keys (they land on the
  same element), and cover it with two extractor tests.
- ListInput (#4740) and TransferList (#4870) landed after this branch
  was cut and render five undocumented targets between them. Document
  them, the same way the other lab components here are documented.
- Stepper's targets were extended on main with the same
  `indicatorPosition` entry this branch added, plus
  `astryx-step-indicator` and the matching `docsZh` block; kept
  main's superset. Both sides' new MoreMenu tests are kept.
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. needs:design-review Affects visuals — Design should review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants