Repository navigation
fix(compact): layer screens so swipe back reveals the screen underneath - #573
Merged
Merged
Conversation
The phone shell rendered one screen at a time, so an edge swipe dragged the entry screen over a blank ground and the list only mounted once the pop landed. Compact/Stack now keeps the screen a push came from mounted and inert under the pushed one — the tab root (with its bar) under the entry, the settings root under a pane, the pane under its sub-page — and drives its recede and dim through one CSS number (--pop) that the push transitions and the swipe writes per frame, the way iOS's interactive pop moves both views. Pushed screens now slide in across the whole width with an edge shadow; the form only dims the root under it.
Contributor
|
With the list staying mounted under a pushed entry, ⌘F pressed there asked an inert input for focus, which it refused, and nothing retried on Back — before, mounting the list on Back was what applied the request. The field now holds a request until it has applied it, checking after every render rather than only when the tick moves, so the uncover's render is the one it lands on.
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
Swiping back on a pushed screen in the phone shell dragged it over an empty white ground: the shell rendered one screen at a time, so the list root did not exist until the pop landed. This layers the screens the way a native navigation stack does.
Compact/Stack(new): the screen a push came from stays mounted andinertunder the pushed one — the tab root with its bar under the entry or form, the settings root under a section pane, the pane under its sub-page. It keeps its scroll and is there to come back to.--pop(.stack-underintheme.css) recedes it a third of the width and dims it, as iOS does. A push transitions it; an edge swipe writes it per frame, so the screen underneath slides back in step with the finger. Cancel springs both back; commit finishes the slide at a pace scaled to the distance left.animate-push) with an edge shadow (shadow-push), instead of the 24px nudge-and-fade. The slide-up form only dims the root under it (motion="rise").docs/compact-shell.md; compact tests adjusted for the layered DOM and a new case covers the lower layer's motion and cleanup.Not done here: a tapped Back is still a cut (no exit animation), since the store drops the screen's content before one could run. The
--popglide relies on CSS@property(iOS 16.4+); older WebKit lands correctly without interpolation.Verification
bun run typecheck,bun run lint(0 warnings),bun run build: cleanbun run test: 1073 passedDecisions