-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: interaction during screen transitions [WPB-6533] #3178
fix: interaction during screen transitions [WPB-6533] #3178
Conversation
Test Results857 tests 857 ✅ 13m 34s ⏱️ Results for commit 02d742a. ♻️ This comment has been updated with latest results. |
APKs built during tests are available here. Scroll down to Artifacts! |
…into fix/clicks-during-screen-transition
APKs built during tests are available here. Scroll down to Artifacts! |
|
APKs built during tests are available here. Scroll down to Artifacts! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
Just making sure: this only applies to screen transitions right? not for components in transition (like compose input additional options), right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool solution 😎
Yes, it only applies to screen transitions (composables that are marked with |
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
.