-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Convert hierarchy to Fragment #6516
base: master
Are you sure you want to change the base?
Conversation
c0b1039
to
a44178c
Compare
@getodk/testers marking this ready for testing before review as it'd be good to get a first pass before I clean things up in case there are some fundamental problems here I've missed. |
a01cd5a
to
a2fa91f
Compare
I think this was the intention of #6303, but please correct me if I'm wrong @alyblenkin. |
This is a good catch! The goal was just to update the east arrow icon, not the up icon as well. I think the up arrow is still a helpful visual indicator that you're going back up to the table of contents. |
That makes sense. Just to be sure though before I unwind anything, the Figma link shows the hierarchy with the list icon in the top right: I'm guessing that's a mistake? |
Sorry I think the group folder icon in the first mockup is a mistake. However, now I'm second guessing myself because we discussed this a while back. @lognaturel correct me if I'm wrong here, but our goal was just update the east arrow, not the up arrow icon as well. |
To clarify, I think the list icon would work on it's own if we didn't already have the up arrow, but I think it's a pretty ingrained pattern now. I think the list icon would suggest you go back to the top level given the current pattern where there is more of this concept of moving up or down, but you could also imagine tapping to keep going to the main table of contents. I don't think this is a stronger design choice, rather it could be another option. Not worth considering given we haven't had folks bring up any issues. |
Feels right to me to leave the up arrow as it is. I think navigating up a level feels relatively clear. I don't think the table of contents icon works well there because it would suggest you go all the way back to the top level. |
@seadowg - sorry that you have to unwind things there! I've update the design. |
No worries! I just wanted to double check. |
@getodk/testers that should be good to go again! |
Tested with success! Verified on devices with Android 10, 14 Verified cases:
|
Work towards #5420
Closes #6303
Why is this the best possible solution? Were any other approaches considered?
I've tried to keep changes to a minimal here with the main goal just being to get the majority of the hierarchy code into a
Fragment
. There's only two structural changes to highlight really:MenuProvider
API. I felt like this made more sense than rewriting it to use the deprecatedFragment
methods.FormHierarchyViewModel
to manage state. This will most likely get merged intoFormEntryViewModel
, but I think that'll make more sense once form entry has also been moved to a Fragment.I also added some new tests for code that I found had none.
How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?
This shouldn't change any behaviour and the big risk here is that it either does or introduces bugs to flows using the form hierarchy. A general test of using the hierarchy (during form entry and viewing) would be good here.
This also changes the jump/summary icon to the new one!
Before submitting this PR, please make sure you have:
./gradlew connectedAndroidTest
(or./gradlew testLab
) and confirmed all checks still passDateFormatsTest