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

Prevent Duplicate Showcase Submissions #1550

Open
dipamsen opened this issue Apr 1, 2024 · 8 comments
Open

Prevent Duplicate Showcase Submissions #1550

dipamsen opened this issue Apr 1, 2024 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@dipamsen
Copy link
Member

dipamsen commented Apr 1, 2024

Maybe we could add something like "will be reviewed within [timeframe]" or "Please do not submit twice" to prevent duplicate submissions.

Another idea could be to link to /pulls so that the user can be convinced that the pr has been created

@fturmel fturmel added the bug Something isn't working label May 3, 2024
@fturmel
Copy link
Collaborator

fturmel commented May 3, 2024

@dipamsen There has been a lot of dupes lately.

I agree the messaging could be improved (it's currently "Thank you for submitting to the Passenger Showcase! Please refresh the page in order to upload another submission."), but I think it could be an implementation issue on our end.

Look at #1588 and #1589 for example, the submittedOn server timestamps are about 1 second apart. That's too short for a user to fill the form again and re-submit.

At a glance, one possible reason would be because there's an onClick handle on the submit button AND an onSubmit on the form. The submit button should be of type "submit" and not have a click handler. Maybe in some cases both the click and form submit fire at the same time.

<form onSubmit={onSubmit} className={css.form}>

<Button
className={css.submitBtn}
onClick={onSubmit}
variant="purple"
disabled={submitted}
rainbow>
Submit
</Button>

@fturmel
Copy link
Collaborator

fturmel commented May 3, 2024

The submitted state is also only updated once the response comes back from the API call. We might need a waiting interim state to disable the form/button and some visual indicator that the request is being processed. The dupes could simply be caused by double-clicks.

@shiffman
Copy link
Member

shiffman commented May 3, 2024

Also, it might be nice to add something more unique (beyond just a reference to the video) to the pull request subject, this will make it easier for me to recognize dupes?

@fturmel
Copy link
Collaborator

fturmel commented May 4, 2024

Cool, I can take a stab at this. I have some additional ideas on how to improve the form experience as well. We can fine-tune and discuss the specifics in the pull request.

@kfahn22
Copy link
Collaborator

kfahn22 commented May 8, 2024

I am also wondering if there is an issue with pull requests disappearing. I didn't notice until just now, but I submitted two for marbling and there is no record of the second one.

@fturmel
Copy link
Collaborator

fturmel commented May 9, 2024

I am also wondering if there is an issue with pull requests disappearing. I didn't notice until just now, but I submitted two for marbling and there is no record of the second one.

Can you share more details? Was it through the Coding Train web form? Were they submitted the same day? Does it go through if you try again with the same image/info?

I checked the Netlify functions log history and I could see the one from May 2nd that got merged but not the other. The logs only go back a week though.

It's not impossible for a web form submission to fail silently. Part of the process is handled by a background function that runs after we send the confirmation back to the user. It's a bit of a black hole if anything ends up going wrong during that step.

Are we aware of other users reporting similar problems?

@kfahn22
Copy link
Collaborator

kfahn22 commented May 9, 2024

I submitted two at the same time through the web form. My memory is that I got a confirmation that the second had been submitted, but I suppose it is possible (or perhaps probable since there is no record of it?) that I am mistaken. (I didn't check to see whether the pull requests had been created. I didn't realize the second was missing until I looked at the Passenger Showcase to decide the next round of featured showcases.)

The duplicate pull requests are puzzling. @shiffman How would you feel about sending out a notice to everyone in the Discord server asking if they have had any difficulties submitting a showcase, and if so, the nature of the problem?

@dipamsen dipamsen changed the title Update showcase submission confirmation Prevent Duplicate Showcase Submissions May 19, 2024
@shiffman
Copy link
Member

shiffman commented Dec 2, 2024

I haven't been noticing duplicate submissions recently, can this be closed?

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
None yet
Development

No branches or pull requests

4 participants