-
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
Prevent double taps on multi select actions #6186
Conversation
@@ -19,7 +19,7 @@ | |||
android:layout_weight="1" | |||
android:text="@string/select_all" /> | |||
|
|||
<com.google.android.material.button.MaterialButton | |||
<org.odk.collect.androidshared.ui.multiclicksafe.MultiClickSafeMaterialButton |
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.
Ahh I'm not a fan of this solution. Not a long time ago we converted this button from MultiClickSafeMaterialButton
to MaterialButton
#6098 and now we convert it back to MultiClickSafeMaterialButton
. I won't be surprised if in a month or two we find something else in the same area that will force us to change this part of the code again.
Maybe a good solution would be to have two types of MultiClickSafeMaterialButton
... one that would work exactly like the existing one and another one that would only block multiple clicks on exactly the same button but not other instances of it.
I'm ok with merging this temporarily if you want to fix it for v2024.2 but please file a separate issue to rework it later.
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.
Ah, great point! I'd forgotten that it was one of the ones we had switched over. I'll have another go.
Tested with Success! Verified cases:
|
Tested with Success! |
Closes #6159
Why is this the best possible solution? Were any other approaches considered?
I've just used our standard
MultiClickGuard
approach to blocking double taps here. I didn't add it to the Select All/Clear all button as it felt like that should be toggle-able, and I couldn't find a problem with it.Do we need any specific form for testing your changes? If so, please attach one.
Does this change require updates to documentation? If so, please file an issue here and include the link below.
Before submitting this PR, please make sure you have:
./gradlew connectedAndroidTest
(or./gradlew testLab
) and confirmed all checks still passDateFormatsTest