Skip to content

Conversation

@jkuester
Copy link

Closes #785

This might be premature as I see #785 is still labeled with "needs discussion". 😅 However, as the code was already fresh in my mind, I figured I would raise a PR to provide some additional impetus to the discussion as well as a concrete proposal to discuss.

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

The rational for this change is covered in detail on the forum thread, but the TLDR is:

  • There are valid use-cases for groups without labels
  • These use cases are supported by the spec
  • Pyxform currently allows for transforming groups without a label/hint (but a warning is printed)
  • Currently, the warning can be avoided on a group with not label/hint by including the field-list appearance (but that appearance cannot be combined with any other appearance or the warning will re-appear). However, semantically it is meaningless to nest field-list groups. So, this workaround is not appropriate for all cases.

What are the regression risks?

The main "risk" I see here would be that users could unintentionally add groups with no label/hint (because they did not see any warning about it). Technically I guess this would not be a "regression" in terms of form functionality, though.

Does this change require updates to documentation? If so, please file an issue here and include the link below.

The ODK docs already note:

Groups without labels can be helpful for organizing questions in a way that's invisible to the user. This technique can be helpful for internal organization of the form. These groups can also be a convenient way to conditionally show certain questions.

I do not think these changes require any specific modifications to the xlsform docs.

Before submitting this PR, please make sure you have:

  • included test cases for core behavior and edge cases in tests
  • run python -m unittest and verified all tests pass
  • run ruff format pyxform tests and ruff check pyxform tests to lint code
  • verified that any code or assets from external sources are properly credited in comments

@lognaturel
Copy link
Contributor

Thanks, @jkuester! This still feels like the right move to me. @lindsay-stevens could you please take a look when you get a chance?

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.

Remove warning for group without label

2 participants