-
-
Notifications
You must be signed in to change notification settings - Fork 654
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
Navigation - 'Back' button should always bring you to 'Home' #3503
Comments
Why is this the intended behaviour? The user when pressing the back button expects to go back one navigation level, i.e. where they arrived on the current screen from. In iOS, swiping right from the left of the screen acts as the gesture for navigation, and it always takes you back one navigation level. Having a separate behaviour for android doesn't seem like a good option. Infact I thought there might have been a bug where clicking back from the |
Fixes zulip#3503 The popToTop action takes you back to the first screen in the stack: https://reactnavigation.org/docs/en/stack-actions.html#poptotop Instead of using the written by us `getSameRoutesCount` and the standard `StackActions.pop` use the new 'StackActions.popToTop'.
That is a good point. We used to have this behavior in the past. I actually thought this to be the default sensical behavior. Sometimes though you might go several levels deep but apparently people still want to go back to the Home/Root screen so they navigate elsewhere. Enough users complained about it. At least currently this is the intended behavior (likely to not change soon without a redesign of the UI, which itself is not a priority) I did file the issue because I already had the commit that fixes it. |
I basically agree with @ishammahajan -- to the extent that the code currently does successfully have this behavior, I usually find it annoying and not what I wanted. Good to have this issue to discuss it on! And thanks @ishammahajan for the links to previous discussions. I just went looking to see if we have an older issue thread on this subject; I didn't find one. |
Fixes zulip#3503 The popToTop action takes you back to the first screen in the stack: https://reactnavigation.org/docs/en/stack-actions.html#poptotop Instead of using the written by us `getSameRoutesCount` and the standard `StackActions.pop` use the new 'StackActions.popToTop'.
I haven't really thought this through, but if there are enough users on both sides of the argument we could have a setting which changes the behaviour dynamically. I've seen some apps that do this (albeit IIRC, they were Reddit apps). Just a thought. |
Death by a thousand app settings? |
The decision was made a long time ago but people used to complain and now they don't. @timabbott might have thoughts on this (or not, has been a while). |
Fixes zulip#3503 The popToTop action takes you back to the first screen in the stack: https://reactnavigation.org/docs/en/stack-actions.html#poptotop Instead of using the written by us `getSameRoutesCount` and the standard `StackActions.pop` use the new 'StackActions.popToTop'.
Fixes zulip#3503 The popToTop action takes you back to the first screen in the stack: https://reactnavigation.org/docs/en/stack-actions.html#poptotop Instead of using the written by us `getSameRoutesCount` and the standard `StackActions.pop` use the new 'StackActions.popToTop'.
Fixes zulip#3503 The popToTop action takes you back to the first screen in the stack: https://reactnavigation.org/docs/en/stack-actions.html#poptotop Instead of using the written by us `getSameRoutesCount` and the standard `StackActions.pop` use the new 'StackActions.popToTop'.
As an additional data point: the current behavior (and additional behavior suggested by this thread) seems to be in contradiction to Google's Android navigation guidelines. |
The intended behavior of the 'Back' button in the navbar intends to return the user always to the 'Home' screen (
MainScreenWithTabs
), even if the user have navigated from one narrow to another. We even use some custom logic for that.This mostly works, except in few cases that may confuse our current logic. One such case:
Expected behavior - you are in 'Home'. Current behavior - you are in the
TopicsScreen
.The text was updated successfully, but these errors were encountered: