Skip to content

fix(core): add playground wrapper and defaults for LayoutHeader docsite preview - #5918

Merged
cixzhang merged 1 commit into
facebook:mainfrom
Geervan:fix/layout-header-doc-wrapper
Sep 3, 2026
Merged

fix(core): add playground wrapper and defaults for LayoutHeader docsite preview#5918
cixzhang merged 1 commit into
facebook:mainfrom
Geervan:fix/layout-header-doc-wrapper

Conversation

@Geervan

@Geervan Geervan commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #5896

Adds default children and a Layout playground wrapper to LayoutHeader.doc.mjs so the component renders a visible header preview on the docsite Properties tab.

Problem

Navigating to the Properties tab for LayoutHeader on the docsite displayed an empty preview stage because LayoutHeader had no default child text and no parent Layout scaffold declared in its .doc.mjs metadata.

Solution

  • Configured playground.defaults with children: 'Page Title' and hasDivider: true in packages/core/src/Layout/LayoutHeader.doc.mjs.
  • Configured playground.wrapper with { component: 'Layout' }.
  • Added unit test assertion in apps/docsite/src/__tests__/data-extraction.test.ts.
  • Included patch changeset file .changeset/layout-header-playground-wrapper.md.

Acceptance Criteria Verification

  • Add representative header content and a minimal Layout playground wrapper.
  • The preview renders a visible header on first load.
  • A relevant header control such as divider or height produces an observable update.
  • Add focused preview/data-extraction coverage.

@vercel

vercel Bot commented Sep 2, 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 Sep 2, 2026 1:35pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Sep 2, 2026
@github-actions github-actions Bot added community Authored by a community contributor (not on the eng/design team) needs:code-review High-risk change (new package/component/API) — needs human code review before merge labels Sep 2, 2026
github-actions Bot added a commit that referenced this pull request Sep 2, 2026
@github-actions

github-actions Bot commented Sep 2, 2026

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

Layout (@astryxdesign/core) · View in Storybook
Metric Before After Delta
Bundle Size (ESM) N/A N/A N/A
Lines of Code N/A 1481 -
Complexity N/A Very High (84) -

Bundle Size Summary

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

Accessibility Audit

Status: No accessibility violations detected.


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

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

Thanks, this fixes the empty Properties preview. I verified the exact head renders “Page Title” inside Layout and the divider control updates visibly.

[Reviewed by Robohands]

@github-actions github-actions Bot removed the needs:code-review High-risk change (new package/component/API) — needs human code review before merge label Sep 2, 2026
@cixzhang
cixzhang merged commit 58d4b80 into facebook:main Sep 3, 2026
26 of 27 checks passed
@github-actions
github-actions Bot deleted the fix/layout-header-doc-wrapper branch September 3, 2026 10:59
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. community Authored by a community contributor (not on the eng/design team)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] LayoutHeader Properties preview renders no working component

2 participants