-
Notifications
You must be signed in to change notification settings - Fork 305
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
Support for displaying display items based on conditions. #1898
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
datacapture/src/main/java/com/google/android/fhir/datacapture/views/QuestionnaireViewItem.kt
Outdated
Show resolved
Hide resolved
datacapture/src/main/java/com/google/android/fhir/datacapture/QuestionnaireViewModel.kt
Outdated
Show resolved
Hide resolved
datacapture/src/main/java/com/google/android/fhir/datacapture/views/HeaderView.kt
Outdated
Show resolved
Hide resolved
.../main/java/com/google/android/fhir/datacapture/extensions/MoreQuestionnaireItemComponents.kt
Show resolved
Hide resolved
.../main/java/com/google/android/fhir/datacapture/extensions/MoreQuestionnaireItemComponents.kt
Show resolved
Hide resolved
.../main/java/com/google/android/fhir/datacapture/extensions/MoreQuestionnaireItemComponents.kt
Show resolved
Hide resolved
.../main/java/com/google/android/fhir/datacapture/extensions/MoreQuestionnaireItemComponents.kt
Show resolved
Hide resolved
datacapture/src/main/java/com/google/android/fhir/datacapture/views/HeaderView.kt
Show resolved
Hide resolved
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.
Could you add an espresso test that loads a quesitonnaire similar to the one posted in the issue, asserting the right text is shown?
datacapture/src/main/java/com/google/android/fhir/datacapture/views/GroupHeaderView.kt
Outdated
Show resolved
Hide resolved
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.
Great job! Just resolve these minor comments and then merge
datacapture/sampledata/questionnaire_with_enabled_display_items.json
Outdated
Show resolved
Hide resolved
...ture/src/androidTest/java/com/google/android/fhir/datacapture/QuestionnaireUiEspressoTest.kt
Outdated
Show resolved
Hide resolved
...ture/src/androidTest/java/com/google/android/fhir/datacapture/QuestionnaireUiEspressoTest.kt
Outdated
Show resolved
Hide resolved
@jingtang10 resolving your reviews as @MJ1998 completed them! |
IMPORTANT: All PRs must be linked to an issue (except for extremely trivial and straightforward changes).
Fixes #1835
Description
Support for items of display type given some conditions (defined by enableWhen, enableWhenExpression) by passing "enabledDisplayItems" information in QuestionnaireViewItem.
Type
Choose one: Bug fix
Checklist
./gradlew spotlessApply
and./gradlew spotlessCheck
to check my code follows the style guide of this project../gradlew check
and./gradlew connectedCheck
to test my changes locally.