docs: seed playground previews for LayoutFooter and DropdownMenuRadioGroup (#5895, #5888) - #5975
docs: seed playground previews for LayoutFooter and DropdownMenuRadioGroup (#5895, #5888)#5975Rijul202 wants to merge 1 commit into
Conversation
…Group (facebook#5895, facebook#5888) Both sub-components render an empty properties-tab stage because their docs provide no example content. Seed playground fixtures so each preview renders a working component on first load: - LayoutFooter: wrap in a Layout parent and seed representative footer content plus hasDivider, mirroring the sibling LayoutHeader fixture. - DropdownMenuRadioGroup: seed the required label, an initial selected value, and three radio-item children so the group shows selectable choices and the value control visibly moves the selection. Add focused preview-state, data-extraction, and element-resolution coverage for both. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B8JP8cTVc9c8r6FqemWnVW
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
🟢 Approval recommended
The added playground fixtures match existing established patterns and the accompanying tests cover the intended non-empty preview behavior paths.
Pull request overview
🟢 No review blockers found — doc-only seeding of playground fixtures plus focused docsite test coverage.
Triage: docs/preview fix · non-breaking · low blast radius → fast path · checks: verified wrapper/defaults shape vs existing fixtures (LayoutHeader/DropdownMenuItem) and verified docsite preview runtime behavior paths (resolveValue/buildInitialState/wrapper rendering)
Two previously-empty sub-component “Properties” previews now render meaningful initial content by adding playground fixtures to their .doc.mjs entries, with accompanying docsite tests to prevent regressions.
Changes:
- Add
playground.defaults+playground.wrappertoLayoutFooterso it renders visibly on first load inside aLayout. - Add
playground.defaultstoDropdownMenuRadioGroup(label/value +DropdownMenuRadioItemchildren) so it renders selectable options on first load. - Add targeted docsite tests covering extraction, initial preview state seeding, and ElementDescriptor resolution for the new radio-item children.
File summaries
| File | Description |
|---|---|
| packages/core/src/Layout/LayoutFooter.doc.mjs | Adds playground defaults and a Layout wrapper so the footer preview isn’t empty. |
| packages/core/src/DropdownMenu/DropdownMenuRadioGroup.doc.mjs | Seeds label/value and radio-item children so the radio group preview renders usable content. |
| apps/docsite/src/tests/data-extraction.test.ts | Asserts the new playground defaults/wrapper are present in extracted registry data. |
| apps/docsite/src/tests/component-preview-state.test.ts | Verifies buildInitialState seeds the expected preview state for both components. |
| apps/docsite/src/tests/component-detail-resolve-elements.test.ts | Ensures DropdownMenuRadioItem child descriptors resolve into React elements. |
| .changeset/layoutfooter-radiogroup-properties-preview.md | Adds a patch changeset documenting the doc-metadata update in @astryxdesign/core. |
Review details
- Files reviewed: 6/6 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
cixzhang
left a comment
There was a problem hiding this comment.
Thanks, LayoutFooter is good. The radio-group half overlaps #5976; this version renders menuitemradio rows outside DropdownMenu, so keyboard navigation is absent and every item has tabindex=-1. Could we keep this PR to LayoutFooter and let the scaffolded radio fix converge in #5976?
[Reviewed by Robohands]
Summary
Two sub-component docs render an empty properties-tab preview because they ship no example content. This seeds
playgroundfixtures so each preview renders a working component on first load — the same approach used for the already-fixedLayoutHeader,DropdownMenuItem, and Grid/Stack family.LayoutFooter(closes #5895)Layoutparent (playground.wrapper) and seeds representative footer content +hasDivider, mirroring the siblingLayoutHeaderfixture.hasDivider/heightcontrols produce an observable update.DropdownMenuRadioGroup(closes #5888)label, an initial selectedvalue, and threeDropdownMenuRadioItemchildren.valuecontrol visibly moves the selection. Renders standalone, matching theDropdownMenuItemfixture pattern (no menu scaffold required).Tests
Added focused coverage mirroring the existing suites:
component-preview-state.test.ts—buildInitialStateseeds children/value andgetMissingRequiredPropsis satisfied for both.data-extraction.test.ts— both docs declare the expectedplayground.defaults/wrapper.component-detail-resolve-elements.test.ts— the radio-item child descriptors resolve to real elements.Both slices are atomic, independently closable pieces of #2008. Additive only — no public API or design change.