fix: interaction during screen transitions [WPB-6533] 🍒 #3180
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.
This PR was automatically cherry-picked based on the following PR:
Original PR description:
PR Submission Checklist for internal contributors
The PR Title
SQPIT-764
The PR Description
What's new in this PR?
Issues
The user can click on a screen during the transition, for instance when the screen is being closed, it's still clickable so if user clicks during closing, it can still open something from the previous screen and end up on a different screen than user wanted.
Causes (Optional)
The screen during transition is still clickable and can interact until it's fully hidden.
Solutions
Create a wrapper
WaitUntilTransitionEndsWrapper
for the destination composables so that it covers the entire screen and intercepts any click. This cover is added to the screen only when the transition is ongoing, at the moment the transition ends, this cover is removed from the screen so that it's fully clickable.Created new annotation
@WireDestination
which replaces@Destination
and contains this wrapper by default.Testing
How to Test
Navigate in the app and try to quickly click on the screen that's being open or closed.
Attachments (Optional)
Transition animations were slowed down to 2s in videos below.
before.mp4
after.mp4
PR Post Submission Checklist for internal contributors (Optional)
PR Post Merge Checklist for internal contributors
References
feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764
.