Repository navigation
feat(core): deprecate BottomSheetSwitcher in favour of standalone sheets that replace - #7771
Closed
imdreamrunner wants to merge 1 commit into
Closed
imdreamrunner wants to merge 1 commit into
imdreamrunner wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
Contributor
Author
|
Folded into #7648, which now carries open-order stacking, the replace handoff, and the BottomSheetSwitcher deprecation as one change. |
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.
Primary intent
Deprecate
BottomSheetSwitcherand thesheetIdprop ofBottomSheet. #7712 lets standalone sheets run the switcher's replace handoff: closing the top sheet and opening one other sheet in the same update. A multi-step flow can therefore be one standaloneBottomSheetper step, driven by one state value that names the open step. The switcher keeps working exactly as released. Only its declarations and documentation change, and a future minor release removes it.User or maintainer impact
@deprecatedtags onBottomSheetSwitcher,BottomSheetSwitcherProps, andBottomSheet'ssheetId, each pointing to the replacement.stepstate value; each step is a standalone sheet withisOpen={step === 'id'}, and the same replace handoff runs between steps.hasScrim={false}) are the one case the switcher still covers alone. Non-modal sheets neither stack nor replace (feat(core): BottomSheet replace handoff on open-order stacking (prototype, stacked on #7648) #7712), so a non-modal step change there is a plain exit and entrance. The deprecation text says so.Problem and solution fit
@deprecatedJSDoc onBottomSheetSwitcher,BottomSheetSwitcherProps, andBottomSheet'ssheetIdspec:AST-017FR26: public lifecycle state is explicit on the declarationBottomSheetSwitcher.doc.mjs: descriptions lead with "Deprecated: …"; the replacement example comes first; the switcher example is labelled deprecated; best practices prefer standalone stepsastryx component BottomSheetSwitchersee the replacement before the deprecated APIBottomSheet.doc.mjs: thesheetIdprop doc is marked deprecated[feat]Changeset (patch) with a four-step migrationspec:AST-017FR28 / FR29d: a deprecation names its replacement and migration and ships with no behaviour changeThere is no runtime warning. The repository's whole-component deprecations warn through declarations only (the 0.6 deprecations, removed in #6118, followed the same pattern). Removable tagalongs: none.
Before / after, per flow:
Authority
spec:AST-017FR26, FR28, FR29d: lifecycle state, replacement, and migration for a deprecation; removal is a separate[breaking]change in a declared minor.component:BottomSheetclaim text that would own it, plus a decision recording this deprecation. That record is cut as a spec PR once the stacking direction is chosen.BottomSheetSwitchersupported and deprecated for now, and remove it only in a future minor release.Change and evidence
Five files, +68 / −12:
BottomSheetSwitcher.tsx,BottomSheet.tsx(JSDoc only),BottomSheetSwitcher.doc.mjs,BottomSheet.doc.mjs, and the Changeset. No source logic, styles, tests, or stories change.API audit against #7712's build. The
exportsmap is identical. The public.d.tsfiles differ only in the added@deprecatedtags and doc comments.Scope
Testing
Follow-up, not in this PR: the two CLI block templates that still use the switcher move to standalone steps in a separate change.