-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Fixed using the quick appearance in SelectOneFromMapWidget #5914
Conversation
…is a selected item
geo/src/test/java/org/odk/collect/geo/selection/SelectionMapFragmentTest.kt
Outdated
Show resolved
Hide resolved
collect_app/src/main/java/org/odk/collect/android/widgets/items/SelectOneFromMapWidget.kt
Outdated
Show resolved
Hide resolved
3821289
to
02f4e0c
Compare
02f4e0c
to
345da30
Compare
What is the expected result after changes in the PR? When I go Select one form map question with quick appearance, I open the map and tap a point/trace/shape the map is closed and I'm moved to the next question. It feels like the step in which the user confirms the choice by tapping "Select" in the bottom sheet (which is opened after tapping a point) is skipped. |
This is expected. Using the quick appearance should skip displaying the bottom sheet. It worked like that before, the only bug was that it was not possible to change the answer when one was already selected because the map was immediately closed. Plus navigating to the next question didn't work too as I remember. |
Tested with Success! Verified on device with Android 10 Verified cases:
|
Tested with Success! Verified on device with Android 13 |
Closes #5540
Why is this the best possible solution? Were any other approaches considered?
We have one method
onFeatureClicked
(renamed toonFeatureSelected
) to handle both cases - selecting items by a user and selecting items (automatically) after opening a map where there is already a selected item. Because of that, we weren't able to distinguish those two cases without introducing a new parameterselectedByUser
. Only if the action is performed by a user we should close the map (if thequick
appearance is used).When it comes to the second part of the issue - navigating automatically to the next question it works in a similar way to normal selects. There is a listener and when there is a new answer we call the listener.
How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?
The changes can only affect the SelectOneFromMap widget so we can focus on testing it. Please make sure the issue is fixed and there is everything fine with that widget.
Do we need any specific form for testing your changes? If so, please attach one.
No.
Does this change require updates to documentation? If so, please file an issue here and include the link below.
No.
Before submitting this PR, please make sure you have:
./gradlew connectedAndroidTest
(or./gradlew testLab
) and confirmed all checks still pass