-
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
Improve Dropdown Behavior in Questionnaire Items #2393
base: master
Are you sure you want to change the base?
Improve Dropdown Behavior in Questionnaire Items #2393
Conversation
...c/main/java/com/google/android/fhir/datacapture/views/factories/DropDownViewHolderFactory.kt
Outdated
Show resolved
Hide resolved
...c/main/java/com/google/android/fhir/datacapture/views/factories/DropDownViewHolderFactory.kt
Outdated
Show resolved
Hide resolved
...c/main/java/com/google/android/fhir/datacapture/views/factories/DropDownViewHolderFactory.kt
Outdated
Show resolved
Hide resolved
@qaziabubakar-vd Any updates on this PR? Update the PR with the functionality to reset/clear the selected item. |
I was assigned to another project but I will pick this back soon and add the implementation for resetting/clearing the selected item. Will post an update here and on the ticket. |
...c/main/java/com/google/android/fhir/datacapture/views/factories/DropDownViewHolderFactory.kt
Outdated
Show resolved
Hide resolved
…views/factories/DropDownViewHolderFactory.kt Co-authored-by: santosh-pingle <[email protected]>
…' into issue-2228-dropdown-non-editable # Conflicts: # datacapture/src/main/java/com/google/android/fhir/datacapture/views/factories/DropDownViewHolderFactory.kt
… is selected or once user types in some text
…opdown-non-editable # Conflicts: # datacapture/src/main/java/com/google/android/fhir/datacapture/views/factories/DropDownViewHolderFactory.kt
...java/com/google/android/fhir/datacapture/test/views/DropDownViewHolderFactoryEspressoTest.kt
Show resolved
Hide resolved
...c/main/java/com/google/android/fhir/datacapture/views/factories/DropDownViewHolderFactory.kt
Outdated
Show resolved
Hide resolved
...c/main/java/com/google/android/fhir/datacapture/views/factories/DropDownViewHolderFactory.kt
Outdated
Show resolved
Hide resolved
...c/main/java/com/google/android/fhir/datacapture/views/factories/DropDownViewHolderFactory.kt
Outdated
Show resolved
Hide resolved
...c/main/java/com/google/android/fhir/datacapture/views/factories/DropDownViewHolderFactory.kt
Outdated
Show resolved
Hide resolved
Hey @qaziabubakar-vd any progress here? Thanks! |
…28-dropdown-non-editable
- Simpler logic - Use `questionnaireViewItem.answers` state to check if the AutoComplete is editable or not - Remove keyListener to make the AutoComplete not editable - Hide keyboard after typing an option then clicking the shown option - Add cool ripple effect on clicking the clear input icon
079ad81
to
a994dc3
Compare
...c/main/java/com/google/android/fhir/datacapture/views/factories/DropDownViewHolderFactory.kt
Outdated
Show resolved
Hide resolved
Remaining todo is test |
814b8ac
to
12fb10b
Compare
I couldn't add this new demo to the PR description (after refactor), since it's not my PR, but here you go. dropdown-behavior-demo-2.webm |
...java/com/google/android/fhir/datacapture/test/views/DropDownViewHolderFactoryEspressoTest.kt
Outdated
Show resolved
Hide resolved
...c/main/java/com/google/android/fhir/datacapture/views/factories/DropDownViewHolderFactory.kt
Outdated
Show resolved
Hide resolved
@jingtang10 @MJ1998 this is ready for review |
* Upgrade SDC Version Fixes bug with PR google/android-fhir#2645 * rename Kader Job Aids flavor * Fix typo in add-application-flavors.mdx * Update SDC with google/android-fhir#2393 Fix
* Upgrade SDC Version Fixes bug with PR google/android-fhir#2645 * rename Kader Job Aids flavor * Fix typo in add-application-flavors.mdx * Update SDC with google/android-fhir#2393 Fix
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.
LGTM
IMPORTANT: All PRs must be linked to an issue (except for extremely trivial and straightforward changes).
Fixes # #2228
Description
Improved the dropdown behaviour, disabled the search within the field once an option is selected.
Once the text is cleared, showed the list of options again in the dropdown
Alternative(s) considered
Have you considered any alternatives? And if so, why have you chosen the approach in this PR?
Type
Choose one: Bug fix
Screenshots (if applicable)
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.