-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
Generalize goBack feature for CollectionCreate #117
base: master
Are you sure you want to change the base?
Conversation
This feels more hacky to me. I'd rather avoid complexity as much as possible. What does this PR actually solve that's worth the added complexity? |
To me it's a UX improvement. There are two ways you can create a Collection:
|
Maybe I'm misunderstanding, but:
OK, so after a create there, just redirect.
After a create there, just redirect to the right place.
Same. Maybe I'm just misunderstanding the patch, but I don't understand why the behaviour needs to be centralised. Just do whatever you need to do in whatever view you are. Or are your examples about changing the history stack because you want the back button to behave a certain way? I still don't understand what you are trying to achieve. |
This patch is to avoid to hardcode the screens in If you're fine with hardcoding the screens, this PR should be closed. |
Definitely not fine with hardcoding. I just don't understand what this patch really does it seems. Could you maybe describe the purpose of this patch in plain words again? As I still don't get it. |
Okay then maybe you're seeing a solution that I don't. I'll try to explain in detail: Use case 1, the user creates a Notebook from the drawer:
Use case 2, the user creates a Note, and realizes it should be in a new Notebook:
|
OK, I think this is where the confusion stemmed from. I didn't remember that the menu button is always visible on the web... And sorry for maybe asking the same question twice but why not always go back? Because sometimes it's from a screen that you don't want to go to, and in that case you want to just go to a certain page? Anyhow, I'm fine with this change if this is the case, just make sure to fix the conflicts and let me know. |
Previously it's because you could open "Create Notebook" from any page on web (i.e. the Settings if you opened directly |
Let's always go back then, I think that's better. :) |
58625b3
to
183b309
Compare
Changed and ready for review Edit: I just realized this won't work with split view because you'll be able to create a new notebook on every screen, since the list is always present on the left. So I'd say just use |
183b309
to
b92b298
Compare
Potential conflicts warningThis pull request has changes that are conflicting with the changes in 2 open PRs. #163 Rename RootStackParamList.tsx to NavigationConfig.tsx by @zecakeh (updated 5 minutes ago)
#164 Move linking config to NavigationConfig by @zecakeh (updated Just now)
|
So I made the modifications I suggested. We now lose the feature that selects the newly created Notebook in the New Note form. To do that I do believe I need to reintroduce a route param. |
Instead of relying on the name of the previous screen to send the newly created
colUid
back, we use a route param. This will allow to have the same behavior on other screens.Fixes #156
Tested on web Firefox Linux
Tested on native Android