gitea
gitea copied to clipboard
Disable "Create" Button until all required fields are filled in. + Do more checks on the front-end.
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:

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
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.
Inspiration:
