xforms-spec icon indicating copy to clipboard operation
xforms-spec copied to clipboard

Only use group in repeat as repeat instance name if it's the repeat's only child

Open lognaturel opened this issue 3 months ago • 0 comments

In https://github.com/getodk/xforms-spec/issues/141, we decided to recommend that clients use the label of an inner group as a repeat instance label. We were not specific about what to do in case of other contents in the repeat.

https://github.com/getodk/xforms-spec/pull/309 makes a clarification of existing behavior in both Collect and Enketo: a group is only used this way if it's the repeat's first child.

In the original issue, we explicitly discussed the case where an inner group is followed by other items in the repeat but not in the group. We decided to still use the first group's label as the repeat instance label. This works ok in the Collect hierarchy view which is what this spec change was designed for.

It doesn't work as well in Enketo where multiple repeat instances are shown on a screen and can be individually collapsed.

Let's only use the inner group label this way if the inner group is the repeat's only child.

lognaturel avatar Mar 19 '24 23:03 lognaturel