Repository navigation
Rebuild the session page stack with standard Compose - #141
Merged
Merged
Conversation
The stack of subagent and browser pages pushed over a session was a port of iOS's: its own full-width back pan with rules for yielding to horizontal scrollers, a motion controller with frame loops and a hand-solved spring, and a stuck-touch watchdog. Now one animated value moves the top page and system back is the only way back. - Push and pop keep Material's shared axis X on PageTransitions' timing, and a cross-fade under Reduce Motion. - Predictive back keeps the back preview (scale, lean, rounded corners, the session beneath) through PredictiveBackHandler and springs back on cancel. - Covered pages stay composed through the SaveableStateHolder with their back handlers parked, so a web page and a subagent transcript keep their state. - The browser's back still steps through web history first. - No full-width swipe-back from mid-page: a horizontal swipe on a pushed page goes to the page alone (the drawer stays shut there, as before). Removed: the back pan and its scroller rules, SessionPageStackMotion, the page stack's TouchRecovery owner (Owner.Browser), yieldsBackSwipe and the ported DrawerTouchStateTests case for the pan (noted in docs/parity). SessionPageStack.kt goes from 820 to 357 lines. Checked on the emulator against dev with session-lab: subagent push and back, slow predictive drag then release and then cancel, browser push, web history back and close, the code block's sideways scroll and a mid-page swipe, background and rotation keeping the covered page and its scroll, animator scale 5 and Reduce Motion. scripts/check.sh passes.
Closed
This branch was previously 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.
Subagent and browser pages slide in and out of a session as before, and system back previews leaving them. The stack underneath is now ordinary Compose code.
Now one animated value moves the top page, and
PredictiveBackHandlerdrives back. The old stack was a port of iOS: its own full-width back pan with rules for yielding to horizontal scrollers, a motion controller with frame loops and a hand-solved spring, and a stuck-touch watchdog.SessionPageStack.ktgoes from 820 to 357 lines.NavDisplay.NavDisplaydrops covered pages from composition, so going back would reload the web page and lose the transcript's scroll. Covered pages still stay composed, hidden from TalkBack, with their back handlers parked.PageTransitionstiming, and a cross-fade under Reduce Motion. The back preview keeps its scale, lean and rounded corners, and springs back on cancel.SessionPageStackMotion,TouchRecovery.Owner.Browser,yieldsBackSwipe, and the ported test for the pan (noted in docs/parity).Differences from dev:
page-stack-before-after.mp4
Checked on the emulator against dev with session-lab:
scripts/check.shpasses. The lab has only one subagent level, so I didn't test a second level.