getodk / collect

ODK Collect is an Android app for filling out forms. It's been used to collect billions of data points in challenging environments around the world. Contribute and make the world a better place! ✨📋✨
https://docs.getodk.org/collect-intro
Other
700 stars 1.35k forks source link

Fixed buttons that are blocked too long #6098

Closed grzesiek2010 closed 1 month ago

grzesiek2010 commented 1 month ago

Closes #6061

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

As discussed in the issue there are two approaches we can use depending on our needs:

  1. We can stop using the MultiClickSafeMaterialButton if we have multiple buttons on one screen and we don't want to block them. Here a good example is the navigation buttons or the control buttons that we use to select/unselect/delete forms.
  2. If we still want to block multi-clicking inside a particular screen but not if a user navigates from another screen then we need to make such buttons screen-aware: https://github.com/getodk/collect/pull/6098/commits/a4e84e4cf0953c76e2f05b30914e3a055e9bb273

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?

This should fix the problem with the navigation buttons and the buttons that control lists of forms (select/unselect/delete). Nothing else should be affected. It's possible that other places in the app might need similar changes but we can identify them later and file separate issues.

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:

srujner commented 3 weeks ago

Tested with Success!

Verified on device with Android 12,13

Verified cases:

dbemke commented 3 weeks ago

Tested with Success!

Verified on device with Android 10

WKobus commented 3 weeks ago

Tested with Success!

Verified on device with Android 11