Skip to content
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

Repeat titles #1648

Merged
merged 2 commits into from
Dec 5, 2017
Merged

Repeat titles #1648

merged 2 commits into from
Dec 5, 2017

Conversation

grzesiek2010
Copy link
Member

@grzesiek2010 grzesiek2010 commented Nov 17, 2017

Closes #183

What has been done to verify that this works as intended?

I've tested attached forms.
Navigation between questions.

Why is this the best possible solution? Were any other approaches considered?

The solution has been proposed here getodk/xforms-spec#141

Are there any risks to merging this code? If so, what are they?

Yes. I think we should test also some strange scenarios like 3 or 4 nested groups etc.

Do we need any specific form for testing your changes? If so, please attach one.

repeatGroupNew.xml.txt
repeatGroupNewAOOP.xml.txt
repeatGroupOriginal.xml.txt
repeatGroupOriginalAOOP.xml.txt

@grzesiek2010
Copy link
Member Author

grzesiek2010 commented Nov 17, 2017

Since we can build an appropriate form using xls (here is an example:
repeatTest.xlsx)
I think it's ready for testing. Do you agree @lognaturel ?

@lognaturel
Copy link
Member

👍👍👍 Looks great to me. I agree that looking at complex nested group/repeat structures is a good idea.

@hooverlunch collect-debug-v1.11.0-34-g64bcd9156.apk.zip is a debug build for you to confirm that this is what you had in mind.

@mmarciniak90
Copy link
Contributor

Tested with success.
Android 4.1, 4.4, 6.0, 7.0, 8.0
I verified forms attached by Grzegorz.
I created form with 2 groups, where image and date are represented as a title.

@mmarciniak90
Copy link
Contributor

@opendatakit-bot unlabel "needs testing"

@lognaturel
Copy link
Member

I played around with this and a form with nested repeats:
nested-repeats.xml.txt

One unfortunate thing to note is that to get the repeat position you now have to use position(../..) to get out of the group and to the repeat which may not be so intuitive. I don't know how common it is that people want to do position-based calculations.

The breadcrumb ends up looking something like Friends (2) > Shobhit > Pets (1) > Fido. I wasn't so sure about it but it has grown on me. It's nice to see both the meaning of the thing ("friends" or "pets"), its position in parentheses and its value.

@hooverlunch last chance for comments?

@smoyte
Copy link

smoyte commented Nov 29, 2017

Looking very nice! So exciting!

A couple questions...

Arrow Thingys

image

I thought we were going to get rid of these and have tapping a repeat group name take you to a subscreen? Maybe I forgot. But they are super non-material-like and weird.

Breadcrumb Bug

Currently on the data entry screen I get:

image

whilst on the jump screen I get

image

Note the extra (0). I'm assuming that can be easily fixed?

Breadcrumb Style

I think I can live with Friends (2) > Shobhit > Pets (1) > Fido.

It seems to me that Friends > Shobhit (2) > Pets > Fido (1) would be more natural since the (2) is logically connected to Shobhit, not Friends. Shobhit is the second friend, not the only friend in the second group of Friends.

Especially if you look at two of them side by side:

Friends (1) > Louise > Pets (1) > Flappy
Friends (2) > Shobhit > Pets (1) > Fido

vs.

Friends > Louise (1) > Pets > Flappy (1)
Friends > Shobhit (2) > Pets > Fido (1)

It seems more natural for the Friends breadcrumb to stay unchanged since there is only one Friends group.

Separately, it also it would be nice if the number were optional. Having the label available removes the need for it in some cases.

But these are both things that could go into a separate issue if they're not easy to do right now, or if y'all disagree with me!

Thank you all so much for your work on this!

@lognaturel
Copy link
Member

lognaturel commented Nov 29, 2017

Thanks, @hooverlunch! The visual upgrade of this view is a separate initiative. @shobhitagarwal1612 still has a PR open at #1271. That one is more risky and has been on the back burner. Will try to block off some time for it soon but I'd like to get more Android-savvy eyes on it too.

We can also file issues for some of the other things you have brought up.

For this, I noticed one other issue. Let's say a form developer has included groups within repeats to give their form some structure as in nested-repeats-bad.xml.txt. Now on the jump screen instead of

Friends (1)
Friends (2)
Friends (3)
...

I'll get

Friend details
Friend details
Friend details

Form developers are most likely to include groups like this when the form is long so I think the number of the repeat is important to include. That would give us

Friend details (1)
Friend details (2)
Friend details (3)

or with the previous form:

Louise (1)
Shobhit (2)
...

Does that work for you @grzesiek2010 and @hooverlunch?

@lognaturel
Copy link
Member

I've filed #1670 since it's an issue even without this change. I'll file the breadcrumb style issues after this is merged since they depend on this change.

@smoyte
Copy link

smoyte commented Nov 30, 2017

Yes I think it's fine with me @lognaturel. We can also see how users react. I don't think any of these things constitute brokenness (except for the (0) thing), just style.

@grzesiek2010
Copy link
Member Author

grzesiek2010 commented Nov 30, 2017

Does that work for you @grzesiek2010 and @hooverlunch?

@lognaturel do you want those numbers in brackets like in your example? I'm asking because in v1.11.1 we display those numbers without brackets so should we always use brackets?

@grzesiek2010
Copy link
Member Author

grzesiek2010 commented Nov 30, 2017

@lognaturel @hooverlunch
I agree that numbers might be helpful but which approach do you like better:

screenshot_2017-11-30-18-01-45
screenshot_2017-11-30-18-09-03

@lognaturel
Copy link
Member

I'd tend to do the parentheses so it's consistent with the breadcrumb for now but I don't feel strongly about it. @hooverlunch?

@smoyte
Copy link

smoyte commented Dec 1, 2017

I agree, parens at end seems more consistent.

@grzesiek2010
Copy link
Member Author

@lognaturel @hooverlunch ok thanks, I'll implement it.

@grzesiek2010
Copy link
Member Author

@lognaturel it's ready.

@lognaturel lognaturel merged commit db9fb55 into getodk:master Dec 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants