-
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
Hierarchy view styling #5885
Hierarchy view styling #5885
Conversation
c30c014
to
4508dd6
Compare
@grzesiek2010 - thanks for fixing the build so I could review it! The hierarchy screen and form entry are feeling much more unified. Notes:
![]() |
The asterisk is a part of a question text. We don't have a separate view to display the asterisk we just display it in one TextView. Since it's one TextView if it consists of multiple lines they are not aligned vertically with the first line but with the asterisk that in fact is the beginning of the first line not a separate element as I said above. Do you think it would be better to have it in a separate element? Some time ago I wanted to refactor the way we display asterisks in form entry (they are displayed in the same way by adding them to question labels) but it turned out to be too complex. If you want I can check if it is possible to rework it in the hierarchy view at least.
Do you mean that the Group text is indented too or maybe something else as well? I agree it shouldn't and maybe a good solution would be to display it above the question as you said https://www.figma.com/file/KFi9hIQdrRgo0rLqIC7Sg8/ODK-user-flows?type=design&node-id=3684-73031&mode=design&t=z5x1vMKVcsaifguG-0 to make it clear it's not the same as answers in other list elements
Something like this would be better?
|
That's helpful context. I think we can address this as a separate issue. I think it wasn't bad before, but more noticeable with the answer indented. I'll write up a story, and we can determine where it fits in the priority later :)
I haven't noticed it anywhere else, so just the group text for now.
I think that's looking a lot better. The old spacing isn't so bad in this screenshot because the text is really short. The spacing becomes difficult when you have lengthy questions, making it harder to distinguish the separation between things. Do you have an example of when you drill down into the questions with the new spacing? |
Thank you! The spacing works a lot better for longer questions as well. Is it possible to reduce the vertical padding just a little bit, so it isn't as drastic when you have shorter text?
I agree, we need to make the top margin consistent so it doesn't jump around. |
on master it was 8dp now it's 16dp so if you want something between we can try 12dp? |
Yes, something between 10dp or 12dp will work well. Let's try 12dp first. Let me know if it's easier to hop on a call to tweak it either today or Monday. |
a62bd2d
to
1a42f5d
Compare
I've used 12dp and also updated the text appearance used for displaying answers:
the last thing is that I've reworked the way list items for groups are displayed (moving the group label above the title) according to https://www.figma.com/file/KFi9hIQdrRgo0rLqIC7Sg8/ODK-user-flows?type=design&mode=design&t=kITBl6XtaOjSEUri-0 Please review.
Do you still want to add more spacing? |
b7a9881
to
e0aa102
Compare
Thanks for making those changes! For the spacing, 12dp works well. It's a small change, but it looks much better than the older version, and we are not impacting the experience too much for smaller devices. I like the blue text because it makes the answer stand out. I did question if anyone would mistake it for a link, but I doubt that would happen because it's not underlined. Let's quickly review these design updates on the team call tomorrow before we make the final decision.
Ah okay, I noted in my first comment that this is something we didn't want to prioritize right now, which is why I didn't include it in the 'dev ready' page that you linked, but I do think it works a lot better! We can discuss this tomorrow as well.
I think this might be okay now that we've spaced out the rest. |
@grzesiek2010 - I also just noticed that the form entry text field is really pushed down now - I don't think that was happening last week. |
e0aa102
to
ebde485
Compare
collect_app/src/main/java/org/odk/collect/android/formhierarchy/HierarchyListItemView.kt
Outdated
Show resolved
Hide resolved
Hey @grzesiek2010, so based on everyone's feedback we want to:
|
I was talking about the styling for the question. The answer text is currently bigger when filling out the form than in the hierarchy screen and I think that’s ok. |
This makes more sense and maybe that's why I was confused because I think the question styling is the same right now, but maybe I'm wrong! |
ebde485
to
405ace3
Compare
Fixed.
Fixed. |
Nice! It looks like the "Go To Start" and "Go To End" buttons are now touching. I'm not sure if that was happening before? |
ae68763
to
58138a5
Compare
Ah yeah my mistake, it should be fixed now. |
f3963f2
to
398ff29
Compare
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.
If there are multiple questions in one group when you open the hierarchy view the list should be scrolled to display the question you were on at the top of the list if it's possible so:
It has been like that, it's not a new behavior. |
@alyblenkin Could you have a look if the indentation in groups/repeats, questions and answers are ok? It seems as expected to me but it would be great if you could confirm and then we would also have a verified example that we could add to our tests :) |
@grzesiek2010 @seadowg feel free to jump in if I'm wrong, but this looks like the expected behaviour.
@dbemke, you have such a great eye for this kind of detail 😍 I agree with you that the spacing should be the same. However, I don't think this is a show-stopper! If it is an easy fix, I think we should match the spacing between the question and answer (this might be a bit tight, but it's hard to say until we see it). |
Please file separate issues for spacing and the margin between the group name and the list. Everything else seems to be fine. |
Tested with Success! Verified on devices with Android: 8.1, 10 Verified cases:
|
Tested with Success! Verified on devices with Android: 13 |
Closes #5837
Why is this the best possible solution? Were any other approaches considered?
As discussed in the issue, the hierarchy view and margins used there should be consistent with what we have in form filling. To achieve that I used the same values defined in the
dimen
file.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?
The pr is focused on UI improvements that shouldn't be risky for the functionality, therefore I think we can focus on the UI and not perform a lot of regression tests here. It contains some refactoring so it would be good to perform some of them though.
Do we need any specific form for testing your changes? If so, please attach one.
No.
Does this change require updates to documentation? If so, please file an issue here and include the link below.
No.
Before submitting this PR, please make sure you have:
./gradlew connectedAndroidTest
(or./gradlew testLab
) and confirmed all checks still pass