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

Repeated Group Headers #1994

Merged
merged 16 commits into from
Jun 10, 2024
Merged

Conversation

kevinmost
Copy link
Contributor

@kevinmost kevinmost commented May 3, 2023

IMPORTANT: All PRs must be linked to an issue (except for extremely trivial and straightforward changes).

Fixes #726

Description
Add headers to repeated groups.

The header shows the index of the repeated group instance, plus a delete button that removes that entire instance.

Type
Choose one: Feature

Screenshots (if applicable)

Screenshot

Checklist

  • I have read and acknowledged the Code of conduct.
  • I have read the Contributing page.
  • I have signed the Google Individual CLA, or I am covered by my company's Corporate CLA.
  • I have discussed my proposed solution with code owners in the linked issue(s) and we have agreed upon the general approach.
  • I have run ./gradlew spotlessApply and ./gradlew spotlessCheck to check my code follows the style guide of this project.
  • I have run ./gradlew check and ./gradlew connectedCheck to test my changes locally.
  • I have built and run the demo app(s) to verify my change fixes the issue and/or does not break the demo app(s).

@jingtang10
Copy link
Collaborator

@shelaghm please take a look at the screenshot!

we didn't really know what to do with the heading so used cardinal numbers 1,2,...

@kevinmost and i did wonder if there's a group header extension from the FHIR spec we can use... or maybe we can use a placeholder like Group 1, Group 2,...

Copy link
Collaborator

@jingtang10 jingtang10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great pr! love this ❤️. thanks @kevinmost

@shelaghm
Copy link

Looks amazing! @kevinmost
A few suggestions to make it even better:

  1. Add 'Group' in front of 1, 2. So it reads Group 1, Group 2, etc.
  2. Move the sample date question text so that it is the placeholder text inside the text field and dropdown.
  3. Use the EntryFormat / hint text field for the date format.

(See screenshot for details)
Repeat Group 12

@kevinmost kevinmost requested a review from a team as a code owner May 31, 2023 12:22
@kevinmost
Copy link
Contributor Author

Updated

Copy link
Collaborator

@jingtang10 jingtang10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for this @kevinmost!

happy to approve once all comments have been addressed - don't think i have any more comments.

@santosh-pingle
Copy link
Collaborator

santosh-pingle commented Jun 4, 2024

https://github.com/google/android-fhir/pull/1994/files#diff-1f4ba456c28c5400e29ae89383faf8d1a8d9109c80299bc0efb1ed3cf11818b2R834

This change has side effects:

  1. Nested items of repeated group items are not shown.
  2. Answers that are captured in questionnaireResponse.json and passed as an argument to QuestionnaireFragment do not show nested items of repeated group items.

If the following fix is added, then the above-mentioned issues are not seen:
add(questionnaireResponseItem.item)

@jingtang10

@jingtang10 jingtang10 enabled auto-merge (squash) June 10, 2024 13:57
@jingtang10 jingtang10 merged commit 1016558 into google:master Jun 10, 2024
4 checks passed
@allan-on allan-on mentioned this pull request Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

Handle repeated groups
5 participants