gitea icon indicating copy to clipboard operation
gitea copied to clipboard

Disable "Create" Button until all required fields are filled in. + Do more checks on the front-end.

Open BlenderDefender opened this issue 3 years ago • 2 comments

Feature Description

I'm always a little frustrated when I'm filling in a form and clicking submit, just to wait for an error response from the server. The solution for this problem is pretty straightforward though: Front-end checks. Required fields aren't filled in yet? Disable the submit button. Fields aren't filled in properly? Prevent submitting the form and show an error message instantly. This would save people two seconds of waiting everytime they make a mistake (or even more depending on the internet speed) - which is a surprisingly long time when youre "just quickly creating a repository"

Screenshots

Disable the Create Repo button when some fields aren't filled in correctly, mockup: grafik

BlenderDefender avatar Sep 10 '22 09:09 BlenderDefender

That is not good practice from UX side. If you do not see any error you are pretty much stuck as you can find why you can't click on that button. Good UX would be to validate form on frontend when clicking on button and focus on missing or invalid form elements and have clear error on why they are invalid

lafriks avatar Sep 10 '22 10:09 lafriks

Oh, then I think I have expressed myself unclearly. The button will only be disabled as long as required inputs are missing. Clicking submit with invalid input values will then prevent submitting the form (=sending the data to the server) and trigger front-end validation.

BlenderDefender avatar Sep 10 '22 10:09 BlenderDefender

Inspiration: grafik

BlenderDefender avatar Feb 28 '23 17:02 BlenderDefender