Repository navigation
feat(lab): explore shared-dialog BottomSheetSwitcher API - #5023
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR Modified ComponentsBottomSheet (@astryxdesign/lab) · View in Storybook
Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
rubyycheung
approved these changes
Aug 14, 2026
imdreamrunner
force-pushed
the
codex/bottom-sheet-orchestrator
branch
from
August 14, 2026 17:27
b835c16 to
a1e79b1
Compare
imdreamrunner
marked this pull request as draft
August 15, 2026 01:11
imdreamrunner
force-pushed
the
codex/bottom-sheet-orchestrator
branch
from
August 15, 2026 05:36
ea2c3a0 to
06511e9
Compare
…chestrator # Conflicts: # packages/lab/src/BottomSheet/BottomSheet.doc.mjs # packages/lab/src/BottomSheet/BottomSheet.test.tsx # packages/lab/src/BottomSheet/BottomSheet.tsx
imdreamrunner
enabled auto-merge (squash)
August 15, 2026 06:57
3 tasks done
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR explores
BottomSheetSwitcher, a controlled API for moving between a mutually exclusive set ofBottomSheetchildren. OneactiveSheetID selects the interactive sheet, while the switcher coordinates the shared modal boundary, scrim, focus behavior, and visual handoff.The public state model stays intentionally small: one
activeSheetvalue and one stablesheetIdper child. This is a switcher rather than a navigation stack—it owns no history, depth,push, orpopbehavior.Interactive previews
Proposed API
BottomSheetSwitcherexposes the standard dialog DOM surface throughBaseProps<HTMLDialogElement>and forwards its ref to the shared native<dialog>. EachBottomSheetconsistently exposes its visual panel<div>through its DOM props and ref.Behavior and architecture
<dialog>for the complete flow; child sheets render as panel layers inside it.hasScrim={true}, the switcher usesshowModal()to provide one top-layer boundary and one native::backdropacross every handoff.hasScrim={false}, it usesshow(), leaving the page interactive and scrollable. Consumers must avoid transformed, contained, or overflow-clipping ancestors in this mode.Notification Setup example
The three-step example keeps state local to the sheet that owns it:
Moving Back preserves the mounted frequency and channel selections.
Feedback wanted
BottomSheetSwitcherthe right name for a controlled single-selection API?activeSheetplus childsheetIdthe right public state model?Validation
BottomSheet,BottomSheetPanel,BottomSheetSwitcher, anduseFocusTrappnpm check:repopnpm sync:exports:checkThis exploration builds on the standalone BottomSheet exit lifecycle from #5020 and targets
maindirectly.