Skip to content
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 permission screen back behavior #7496

Merged
merged 2 commits into from
Jan 16, 2024
Merged

Conversation

wmontwe
Copy link
Member

@wmontwe wmontwe commented Jan 11, 2024

Prevent back navigation on permission screen to not create accounts twice or get stuck on the account created screen.

@wmontwe wmontwe requested a review from cketti as a code owner January 11, 2024 12:03
@cketti
Copy link
Member

cketti commented Jan 11, 2024

When account setup is complete, all screens should probably also be popped off the back stack.

@wmontwe wmontwe force-pushed the fix-permission-screen-back-behavior branch from 95b596f to 7635044 Compare January 11, 2024 16:35
@wmontwe
Copy link
Member Author

wmontwe commented Jan 11, 2024

I changed it to pop the back stack, but the behavior is now: press back -> leave app -> enter app again -> permission screen is gone and you land in the inbox.

VS old: press back -> nothing happens -> skip or grant notification permission and continue with the onboarding

So the question is what is the intended behavior?

@cketti
Copy link
Member

cketti commented Jan 12, 2024

My suggestion would be:
a) When permissions have already been granted, go to the message list.
b) When permissions haven't been granted yet, display a dialog asking if the user wants to skip granting permissions. If yes, go to the message list. If no, stay on screen.

@wmontwe
Copy link
Member Author

wmontwe commented Jan 15, 2024

My suggestion would be: a) When permissions have already been granted, go to the message list. b) When permissions haven't been granted yet, display a dialog asking if the user wants to skip granting permissions. If yes, go to the message list. If no, stay on screen.

a) this screen is only shown on first use of the app
b) at the moment we don't have Compose Dialogs available in the design system

@cketti
Copy link
Member

cketti commented Jan 15, 2024

a) this screen is only shown on first use of the app

I meant when a user used the permission screen to grant the permissions, then instead of using the "Next" button they (maybe accidentally) use the back button.

b) at the moment we don't have Compose Dialogs available in the design system

I am aware. We could add one. It's an edge case users should rarely run into. Anyway, this could be a "proper" fix for later.

For now we could just do what you initially had (ignore the back button). My suggestion was to pop the back stack in addition to that. Both to free resources and so we can't accidentally leave another way open to navigate back to the account setup screens.

@wmontwe wmontwe force-pushed the fix-permission-screen-back-behavior branch from 7635044 to 8259a8d Compare January 15, 2024 13:57
@wmontwe wmontwe merged commit 307c6c7 into main Jan 16, 2024
2 checks passed
@wmontwe wmontwe deleted the fix-permission-screen-back-behavior branch January 16, 2024 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants