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

Limit repeated action clicking #3205

Merged
merged 15 commits into from
Oct 31, 2023
Merged

Limit repeated action clicking #3205

merged 15 commits into from
Oct 31, 2023

Conversation

aatkin
Copy link
Collaborator

@aatkin aatkin commented Oct 23, 2023

implements #3204

rems.atoms/rate-limited-button wraps click handler and allows only 1 click every 2 seconds. perform-action-button wraps this and additionally subscribes to rems.spa/any-pending-request? to wait until any put/post requests are done. This should prevent repeated clicking which creates duplicate requests to API

rems.actions.* [accept-licenses add-licenses add-member approve-reject assign-external-id change-applicant change-resources close decide delete invite-decider-reviewer invite-member redact-attachments remove-member request-decision request-review return-action review revoke vote]
rems.administration.blacklist
rems.application.* [save-draft submit copy-as-new]

Checklist for author

Remove items that aren't applicable, check items that are done.

Reviewability

  • Link to issue

Documentation

  • Update changelog if necessary
  • Components are added to guide page

Follow-up

  • New tasks are created for pending or remaining tasks

@aatkin aatkin marked this pull request as ready for review October 23, 2023 21:01
@aatkin aatkin requested a review from Macroz October 25, 2023 13:04
Copy link
Collaborator

@Macroz Macroz left a comment

Choose a reason for hiding this comment

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

I think this is good enough to merge (and perhaps click around in dev).

src/cljs/rems/application.cljs Outdated Show resolved Hide resolved
@aatkin aatkin merged commit bbadb16 into master Oct 31, 2023
7 checks passed
@aatkin aatkin deleted the 3204/no-spam branch October 31, 2023 09:02
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

2 participants