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

Fixed using the quick appearance in SelectOneFromMapWidget #5914

Merged
merged 8 commits into from
Jan 26, 2024

Conversation

grzesiek2010
Copy link
Member

@grzesiek2010 grzesiek2010 commented Jan 13, 2024

Closes #5540

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

We have one method onFeatureClicked (renamed to onFeatureSelected) 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 parameter selectedByUser. Only if the action is performed by a user we should close the map (if the quick 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:

  • added or modified tests for any new or changed behavior
  • run ./gradlew connectedAndroidTest (or ./gradlew testLab) and confirmed all checks still pass
  • added a comment above any new strings describing it for translators
  • verified that any code or assets from external sources are properly credited in comments and/or in the about file.
  • verified that any new UI elements use theme colors. UI Components Style guidelines

@grzesiek2010 grzesiek2010 marked this pull request as ready for review January 15, 2024 08:29
@grzesiek2010 grzesiek2010 merged commit 324be5d into getodk:master Jan 26, 2024
6 checks passed
@dbemke
Copy link

dbemke commented Jan 29, 2024

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.

@grzesiek2010
Copy link
Member Author

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.

@dbemke
Copy link

dbemke commented Jan 30, 2024

Tested with Success!

Verified on device with Android 10

Verified cases:

@srujner
Copy link

srujner commented Jan 30, 2024

Tested with Success!

Verified on device with Android 13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to reopen a map in select one from map with appearance quick
4 participants