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

[FC] Debounce clicks on buttons and clickable surfaces #6836

Conversation

carlosmuvi-stripe
Copy link
Collaborator

@carlosmuvi-stripe carlosmuvi-stripe commented Jun 7, 2023

Summary

  • Adds debouncer on all clickable surfaces at UI level.
  • Also prevents double navigation on the Navigation layer.

Motivation

https://jira.corp.stripe.com/browse/BANKCON-7096

Testing

  • Added tests
  • Modified tests
  • Manually verified

maestro test -e APP_ID=com.stripe.android.financialconnections.example maestro/financial-connections/

@carlosmuvi-stripe carlosmuvi-stripe marked this pull request as ready for review June 8, 2023 21:18
@carlosmuvi-stripe carlosmuvi-stripe requested review from a team as code owners June 8, 2023 21:18
@carlosmuvi-stripe carlosmuvi-stripe force-pushed the carlosmuvi/BANKCON-7096/fc-debounce-clicks-on-buttons-and-clickable-surfac branch from 3247737 to d0b32b3 Compare June 8, 2023 21:21
@carlosmuvi-stripe carlosmuvi-stripe enabled auto-merge (squash) June 8, 2023 22:06
internal interface MultipleEventsCutter {
fun processEvent(event: () -> Unit)

companion object
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very interesting syntax!

* A wrapper around [clickable] that prevents multiple clicks from being registered within a
* short time frame.
*/
internal interface MultipleEventsCutter {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we call this MultipleEventsDebouncer? I haven't heard of the term Cutter before.

@carlosmuvi-stripe carlosmuvi-stripe merged commit 6f77af5 into master Jun 9, 2023
7 checks passed
@carlosmuvi-stripe carlosmuvi-stripe deleted the carlosmuvi/BANKCON-7096/fc-debounce-clicks-on-buttons-and-clickable-surfac branch June 9, 2023 05:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants