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

Creating duplicate questions by clicking repeatedly will generate multiple questions with the same title. #569

Closed
binfooo opened this issue Oct 14, 2023 · 4 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@binfooo
Copy link

binfooo commented Oct 14, 2023

Creating duplicate questions by clicking repeatedly will generate multiple questions with the same title.

@binfooo binfooo added the bug Something isn't working label Oct 14, 2023
@LinkinStars LinkinStars self-assigned this Oct 16, 2023
@LinkinStars
Copy link
Member

@binfooo Thanks for the feedback, we'll fix this as soon as possible.

@binfooo
Copy link
Author

binfooo commented Oct 16, 2023

I added a unique index to the database table for the "title" to address this issue.

@fenbox fenbox added this to the v1.2.0 milestone Oct 17, 2023
@jihuayu
Copy link
Member

jihuayu commented Oct 22, 2023

Adding a unique index to the title is not a good practice for the following two reasons:

  1. There is no requirement for the title to be unique in product design. Adding a unique index solely to prevent duplicate submissions is not a good practice.
  2. Add index to long text is not a good practice as it can potentially impact insertion performance and increase database size.

I think we need to do the following:

  1. Add a loading state to the submit button to prevent duplicate clicks during the HTTP request, which can also improve the interaction experience in weak network conditions.
  2. Add a UUID to POST requests to filter out duplicate requests on the backend.

@fenbox fenbox moved this to Done in Answer Roadmap Nov 3, 2023
@fenbox
Copy link
Member

fenbox commented Nov 28, 2023

Fixed in v1.2.0

@fenbox fenbox closed this as completed Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

4 participants