Skip to content

Fix SideNavCollapseButton properties preview with collapsible fixture - #5913

Merged
cixzhang merged 2 commits into
facebook:mainfrom
Alif416:fix/sidenavcollapse-button-preview-fixture
Sep 3, 2026
Merged

Fix SideNavCollapseButton properties preview with collapsible fixture#5913
cixzhang merged 2 commits into
facebook:mainfrom
Alif416:fix/sidenavcollapse-button-preview-fixture

Conversation

@Alif416

@Alif416 Alif416 commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Add a playground fixture to SideNavCollapseButton's documentation to enable the component to render visibly in the Properties preview tab.

Problem

The SideNavCollapseButton Properties preview was rendering empty because the component requires either:

  • A collapsible prop (controlled collapse state), OR
  • A SideNav context (which reads collapse state automatically)

Without either of these, the component correctly returns null, making the preview invisible.

Solution

Added a playground object with default collapsible state to SideNavCollapseButton.doc.mjs. This provides a minimal fixture that:

  • Supplies a controlled collapsible prop with isCollapsed: false
  • Allows the component to render and be interactive in the preview
  • Demonstrates toggle behavior when users interact with the button

Acceptance Criteria

  • ✅ Button is visible on first load
  • ✅ Activating it toggles the collapse state
  • ✅ No changes to component API or behavior
  • ✅ Focused to the doc preview coverage only

Fixes #5901

…view (facebook#5901)

Provide a minimal controlled collapsible fixture so the component renders
visibly in the properties preview tab without requiring a SideNav context.
The fixture demonstrates the toggle behavior with default expanded state.
@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 3, 2026 8:38am UTC

Request Review

@meta-cla

meta-cla Bot commented Sep 2, 2026

Copy link
Copy Markdown

Hi @Alif416!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@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
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Sep 2, 2026
@meta-cla

meta-cla Bot commented Sep 2, 2026

Copy link
Copy Markdown

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@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 looks good!

@cixzhang
cixzhang enabled auto-merge (squash) September 2, 2026 22:32
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

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

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

auto-merge was automatically disabled September 3, 2026 08:23

Head branch was pushed to by a user without write access

@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 3, 2026
@Alif416
Alif416 force-pushed the fix/sidenavcollapse-button-preview-fixture branch from 8e1efa2 to 116f514 Compare September 3, 2026 08:27
github-actions Bot added a commit that referenced this pull request Sep 3, 2026
@cixzhang
cixzhang merged commit d72fc12 into facebook:main Sep 3, 2026
24 of 25 checks passed
@github-actions
github-actions Bot deleted the fix/sidenavcollapse-button-preview-fixture branch September 4, 2026 11:04
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] SideNavCollapseButton Properties preview renders no working component

2 participants