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

Avoiding the multiple clicks on Application Submission. #286

Merged
merged 2 commits into from
Oct 23, 2024

Conversation

jinnashravan
Copy link
Contributor

  1. checking if the application already exists and returning a bool.
  2. If multiple clicks detected, throw a HttpResponseNotFound.

1. checking if the application already exists and returning a bool.
2. If multiple clicks detected, throw a HttpResponseNotFound.
@jinnashravan jinnashravan requested review from maxf and dhvander October 22, 2024 09:14
@Fei-Wei
Copy link

Fei-Wei commented Oct 22, 2024

I feel returning a "HttpResponseNotFound" can be confusing for the end user. Instead of showing a technical error or a message that something wasn't found, it's better to provide a user-friendly message that clearly explains the situation.

A more polished approach would be to inform the user that their action has already been completed successfully, and there's no need to click again. For example, you could display a message like: "Your action has been successfully processed. Please note, you don't need to repeat the request."

This way, the user understands that their action was fulfilled, without encountering an error or feeling like something went wrong. It improves the overall user experience and reduces confusion.

request_a_govuk_domain/request/views.py Outdated Show resolved Hide resolved
request_a_govuk_domain/request/views.py Outdated Show resolved Hide resolved
tests/test_application_submission.py Outdated Show resolved Hide resolved
tests/test_application_submission.py Outdated Show resolved Hide resolved
When multiple clicks are detected, we return success page same as single click.
Not using status flag, but which can be used in future.
Copy link
Contributor

@maxf maxf left a comment

Choose a reason for hiding this comment

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

Very frustrating that we can't simulate this using cypress.

@jinnashravan jinnashravan merged commit 9901ecd into main Oct 23, 2024
1 check passed
@jinnashravan jinnashravan deleted the multiple_clicks_issue_on_application_submission branch October 23, 2024 09:46
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.

3 participants