Prevent chat window corner radius getting stuck after back gesture is cancelled#14661
Open
ateeb-infocusp wants to merge 3 commits intosignalapp:mainfrom
Open
Prevent chat window corner radius getting stuck after back gesture is cancelled#14661ateeb-infocusp wants to merge 3 commits intosignalapp:mainfrom
ateeb-infocusp wants to merge 3 commits intosignalapp:mainfrom
Conversation
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.
First time contributor checklist
Contributor checklist
Fixes #14526(Chat window remains rounded after cancelling system back gesture #14526)Description
Enhanced the navigation state machine to explicitly handle cancelled gestures and refined the animation logic to ensure smooth transitions when a user starts, completes, or abandons a predictive back action. This prevents UI elements from getting "stuck" in intermediate states and ensures a good feel during navigation.
Main Changes
Introduced
NavigationState.CANCEL: Added a dedicated state to theAppScaffoldNavigatorto handle cases where a user starts a back gesture but moves their finger back to the edge to cancel it.Refined State Transitions:
AppScaffoldNavigatornow detects a0fseek fraction to trigger theCANCELstate.wasSeekInProgresstracking to ensurenavigateBackalways triggers the appropriateRELEASEanimation if a gesture was recently active.Animation Logic Updates:
AppScaffoldAnimationStateFactoryto provide specific animation states forCANCEL, ensuring panes slide back into their original positions correctly.defaultDetailReleaseAnimationStateby removing redundantrememberblocks and ensuring properties like corners reset to0.dpupon completion.Code Cleanup: Simplified animator implementations in
AppScaffoldAnimators.ktfor better maintainability and more predictable animation behavior.