fix(core): add playground wrapper and defaults for LayoutPanel docsite preview - #5919
fix(core): add playground wrapper and defaults for LayoutPanel docsite preview#5919Geervan wants to merge 5 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR Modified ComponentsLayout (@astryxdesign/core) · View in Storybook
Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
cixzhang
left a comment
There was a problem hiding this comment.
Thanks for restoring the visible preview. It still misrepresents hasDivider: this wrapper passes the panel as Layout’s children, so it receives content-slot context rather than start or end. On the exact preview, toggling hasDivider leaves both borders at 0px and produces identical pixels. Please place the previewed panel in a real panel slot and cover that behavior.
[Reviewed by Robohands]
d5d1eea to
7ba3fbb
Compare
7ba3fbb to
63ee5ce
Compare
cixzhang
left a comment
There was a problem hiding this comment.
Thanks for fixing the divider context. This head dropped LayoutPanel's playground defaults, wrapper config, and generated-entry regression from the prior head. The generated registry therefore gives LayoutPanel only Layout's inherited header/content/footer defaults and no wrapper, so the new slotProp path never runs; its Properties preview remains empty and hasDivider cannot be inspected. Can you restore the LayoutPanel playground config and regression assertion, now with slotProp: 'start' and representative content? If you'd rather talk it through with someone, we're in Discord.
[Reviewed by Robohands]
|
cant figure why deployment is failing, but the ci passes, so leaving this as is without any further changes, until requested |
cixzhang
left a comment
There was a problem hiding this comment.
Thanks — the wrapper/defaults now behave correctly in the live preview. Production still fails because PlaygroundConfig.wrapper is hand-written again in generate-data.mjs; that second schema copy omitted slotProp, so the generated registry does not typecheck. Please make the generated registry reuse or derive the authoring type and add a focused render/build regression for slotProp; the current extraction assertion passes while this failure remains. If you'd rather talk it through with someone, we're in Discord.
[Reviewed by Robohands]
|
Fixed the generated registry schema drift by deriving PlaygroundConfig and element descriptors from the CLI authoring types. Added regression coverage that requires generated playground configs to accept slotProp: 'start', so the generated registry/typecheck will fail if it is omitted again. Data extraction, core docs typecheck, and docsite TypeScript checks pass. |
cixzhang
left a comment
There was a problem hiding this comment.
Thanks — LayoutPanel's Properties preview now stays visible and its divider works, while the generated registry shares the authoring type. Looks good.
[Reviewed by Robohands]
Fixes #5897
Summary
Updates
InteractivePreview.tsxto supportwrapper.slotPropand configuresLayoutPanel.doc.mjswithslotProp: 'start'soLayoutPanelis rendered insideLayout'sstartsidebar slot with a neighborLayoutContentsection.Problem / Review Feedback
Previously,
wrapper: { component: 'Layout' }passedLayoutPanelas genericchildrento<Layout>, which placed it in<Layout>'scontentslot. BecauseLayoutPanelusesLayoutAreaContextto determine border position (area === 'start'), togglinghasDividerleft both borders at 0px without a visible visual change.Solution
InteractivePreview.tsxto pass the previewed subcomponent directly intowrapper.slotPropwhen specified.LayoutPanel.doc.mjswithslotProp: 'start'and a neighborLayoutContentincontent.data-extraction.test.tsto assertslotProp: 'start'..changeset/layout-panel-playground-wrapper.md.Verification
hasDividerON in the live docsite preview draws the 1px right border between the panel and main content area.hasDividerOFF removes the border line.