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
feat: use modals for navigating to editing screens #2797
feat: use modals for navigating to editing screens #2797
Conversation
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.
Hi @simonbengtsson!
Your code looks good, but I'm afraid there are some inconsistencies in EditProductPage
: some items open a "full dialog", other items open a page (with a back button).
I guess we would be better off if all items opened the same thing, namely a "full dialog".
Regarding your remark about Navigator.push
I would probably agree with you but the navigation system that was chosen was with this bottom bar "on top". Definitely not my personal choice, but that's the way it is, so let's put your remark on the shelf and use it if/when needed.
Codecov Report
@@ Coverage Diff @@
## develop #2797 +/- ##
==========================================
- Coverage 8.86% 6.99% -1.87%
==========================================
Files 161 218 +57
Lines 6623 10722 +4099
==========================================
+ Hits 587 750 +163
- Misses 6036 9972 +3936
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Good point! Fixed so that all product edit related screens now opens in fullscreen in the latest commit. |
Is that purely a technical change on how we display, or are there any visible changes ? |
On Android there is no visible change, but on iOS there are two. One is that the screen animates in from the bottom instead of from the left (modal style) and the other is that the back arrow icon is changed to a cancel cross. See a screen recording of the screen presentation style here: #2796 (comment) |
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.
Thank you @simonbengtsson!
I'm curious to see how this works with edit screens that call other edit screens themselves, so this needs to be double-checked while using the app.
426b0e9
to
420e3a7
Compare
Sounds good. Rebased against develop now. |
Thank you @simonbengtsson! |
What
Fixes issues
Potential future improvements
Modals in iOS are always presented on top of bottom tab bars. I found a way to do this fairly easily by using the root navigator instead of the top navigator. The problem was that it started generating this warning about duplicate hero tags:
There are multiple heroes that share the same tag within a subtree
. I couldn't figure out why this was the case and haven't worked with Hero's or nested navigators much so left it as is.For future reference, this change enabled modals to cover the entire screen (including bottom tab bar):
Replace
with