Repository navigation
docs(spec): evolve BottomSheetSwitcher with an ordered sheet path - #6042
imdreamrunner wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
There was a problem hiding this comment.
Approval is waiting on a maintainer decision for this proposal.
This pull request proposes a new BottomSheetStack contract — a controlled ordered sheet-id path for multi-level drill-in flows, with independent modality, scrim, and final-focus policy, one-level dismissal, and longest-valid-prefix recovery — but that contract is still a draft proposal with its main decisions explicitly open. Approval needs a maintainer to ratify this record as the governing spec, or identify a different governing spec, settling at least:
- the ordered-id API and lack of imperative navigation;
- independent
modality,hasScrim, andfinalFocusRefpolicy; - one-level implicit dismissal rather than Close all, and invalid-path recovery without a normalization callback;
- before release, recede geometry and any public theme seam, and whether live modality changes are supported or latched.
One separate fix is also needed regardless of that decision: as written, omitting hasScrim derives scrim paint from modality, so changing modality alone would also change page dimming — contradicting the proposal's own claim that the two inputs are independent. Please give hasScrim a fixed modality-independent default, or explicitly model an auto policy and revise the independence wording to match.
No runtime or consumer behaviour changes in this pull request today.
[Automated review]
There was a problem hiding this comment.
Approval is waiting on a maintainer decision for this proposal.
This pull request revises the draft spec to evolve BottomSheetSwitcher in place — a canonical controlled activeSheets ordered path for multi-level drill-in flows, with the released activeSheet props kept as a length ≤ 1 alias, independent modality, scrim, and final-focus policy, one-level dismissal, and longest-valid-prefix recovery — but that contract is still a draft proposal with its main decisions explicitly open. Approval needs a maintainer to ratify this record as the governing spec, or identify a different governing spec, settling at least:
- the dual-prop ordered-path API and lack of imperative navigation or a new component;
- independent
modality,hasScrim, andfinalFocusRefpolicy; - one-level implicit dismissal rather than Close all, and invalid-path recovery without a normalization callback;
- before release, recede geometry and any public theme seam, and whether live modality changes are supported or latched.
Two separate fixes are also needed regardless of that decision:
- As written, omitting
hasScrimderives scrim paint frommodality, so changing modality alone would also change page dimming — contradicting the proposal's own claim that the two inputs are independent. Please givehasScrima fixed modality-independent default, or explicitly model an auto policy and revise the independence wording to match. - The promised compatibility for existing callers is not delivered by the operative rules: today
hasScrim={false}selects a non-modal host, but under the draft's unconditionalmodalitydefault and paint-onlyhasScrim, that caller would instead get a modal host without a scrim. Please either preserve the released meaning whenmodalityis not supplied, or treat the reinterpretation as an explicit compatibility change with a migration and update the "identical behavior" wording.
The record also needs renumbering on rebase, as its spec id is now taken by a different record on main — as the pull request description already notes.
No runtime or consumer behaviour changes in this pull request today.
[Automated review]
|
Updated in 15a9fd6 per the automated review's two findings: the proposed
|
…path Supersedes the AST-026 draft in this PR: main has since assigned AST-026 to the shadcn Registry spec, causing the merge conflict. Same content, renumbered to the next free id AST-044 (schema_version 4), in docs/specs/AST-044-bottom-sheet-switcher-path/. Proposal: canonical activeSheets list on BottomSheetSwitcher with the released activeSheet as a length<=1 alias, retained hasScrim presentation (no modality prop), one-level dismissal, longest-valid- prefix recovery.
15a9fd6 to
e119c75
Compare
PR Analysis Report
The exact-head preview is not available yet. Generated by PR Enrichment workflow | View current CI run |
There was a problem hiding this comment.
Approval is waiting on a maintainer decision for this proposal.
This pull request proposes evolving BottomSheetSwitcher in place — a canonical controlled activeSheets ordered path for multi-level drill-in flows, with the released activeSheet props kept as a length ≤ 1 alias, released hasScrim presentation retained with no modality prop, a new finalFocusRef policy, one-level dismissal, and longest-valid-prefix recovery — but that contract is still a draft proposal with its main decisions explicitly open. Approval needs a maintainer to ratify this record as the governing spec, or identify a different governing spec, settling at least:
- the dual-prop ordered-path API and lack of imperative navigation or a new component;
- retaining released
hasScrimpresentation with nomodalityprop, adding onlyfinalFocusRef; - one-level implicit dismissal rather than Close all, and invalid-path recovery without a normalization callback;
- before release, recede geometry and any public theme seam.
One separate fix is also needed regardless of that decision: the draft still contains wording from the earlier split paint/modality model that contradicts the presentation model it now adopts. IR4 says hasScrim must not be used as the source of truth for presentation, while FR8, FR11, and FR38 make hasScrim own presentation and modal semantics. Please rewrite IR4 to match that retained coupling, and align the related contract-gate sentence, the FR33–FR39 verification expectation, and the need-gate count (it says four cases but lists three).
No runtime or consumer behaviour changes in this pull request today.
[Automated review]
…crim IR4 now makes hasScrim the source of truth for presentation, the contract-gate sentence and FR33-FR39 verification match FR8/FR11/FR38, and the need gate correctly counts three cases.
There was a problem hiding this comment.
This draft specification is ready to approve.
It proposes evolving BottomSheetSwitcher in place — no new component — with a canonical controlled activeSheets ordered path for multi-level drill-in flows, the released activeSheet props kept as a length ≤ 1 alias, released hasScrim presentation retained at every path length with no modality prop, a new finalFocusRef policy, one-level dismissal, and longest-valid-prefix recovery. The maintainer approval recorded on this pull request ratifies those decisions, so the direction that was previously waiting on a maintainer is now settled for this draft record.
The wording problem from the previous revision is also fixed: the implementation rule now consistently treats hasScrim as the source of truth for presentation, matching the presentation, contract-gate, and verification sections, and the need-gate count matches the cases it lists.
One item remains open by design, and it does not block this draft: exact recede geometry and whether any theme seam is public must be settled before release, along with the implementation and real-browser evidence the record requires before shipping.
No runtime or consumer behaviour changes in this pull request today.
[Automated review]
Why
BottomSheetcan present one panel andBottomSheetSwitchercan replace one active step with another, but neither represents a visible multi-level drill-in path. The motivating case is a sheet opened by the switcher that itself needs to open a stacked sheet: a separate stack coordinator cannot express that, because the base sheet would belong to neither path and Back, Close-all, focus, and lifetime would split across two state machines.This PR proposes that contract before the prototype becomes a released API.
What
Revises draft system spec
spec:AST-044to evolveBottomSheetSwitcherin place — no newBottomSheetStackcomponent:activeSheetsvalue ordered bottom-to-top, with stable childsheetIdvalues within a controller-local scope;activeSheet/onActiveSheetChangeprops remain as a deprecated length ≤ 1 projection of the same list (null⇔[]), so existing consumers work unchanged; supplying both forms warns in development and the list form wins;[]for Close all — a switcher-opened sheet stacks by appending to its own host's list;onActiveSheetsChange(next, {reason, dismissedSheetId})for component-owned dismissal; the legacy callback receivesnext.at(-1) ?? null;hasScrimpresentation retained at every path length (no newmodalityprop), plus a newfinalFocusRefroot policy;purpose;Silk (
@silk-hq/components) was evaluated and rejected as the model: it has no coordinator or declared order — each sheet owns an independentpresentedboolean, front/covered is derived from presentation chronology (simultaneous presentation is unspecified), andSheetStackonly groups sheets for cumulative-progress stacking animation.Candidate API
The path and final destination are caller-owned intent; presentation reuses the released
hasScrimcontract unchanged. Exact recede geometry and any public theme seam remain a design/theming decision rather than entering the API as arbitrary animation callbacks.Proposed decisions
hasScrimpresentation (nomodalityprop) and addfinalFocusRefas the only new root policy.All remain proposed: the record is
authority: draft/phase: proposed.Open questions
activeSheetscanonical,activeSheetlegacy alias) and lack of imperative navigation.hasScrimpresentation with nomodalityprop, adding onlyfinalFocusRef.Relationship to the prototype
PR #5813 remains implementation evidence only. It demonstrates the ordered path and shared-host mechanics, but still couples scrim and modality and does not settle the hardened invalid-id, shared-dismissal, focus, SSR, or rapid-update contract in this spec (renumbered
AST-044afterAST-026was taken onmainby the shadcn Registry spec, which caused the merge conflict — now resolved by rebase). Under the revised proposal its host is re-based asBottomSheetSwitcher, not a new component.Risk
Knowledge only. No Core runtime, public package, generated artifact, visual output, or consumer behavior changes. The spec does not authorize implementation while it remains draft. No Changeset.
Validation
pnpm check:knowledge -- --base origin/mainpnpm lint:strict— 0 errors; 90 existing repository warningsgit diff --check, contiguous contract-id check, and public-content scanarchitecture:public-component-api,architecture:layer-runtime,family:overlay-dismissal, and current BottomSheet/BottomSheetSwitcher sourcemodalityprop:check:knowledgeerror count identical before/after (42 pre-existing environment errors, none for this spec)