Skip to content

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

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

Open
BlenderDefender opened this issue Sep 10, 2022 · 3 comments
Labels
topic/ui Change the appearance of the Gitea UI type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@BlenderDefender
Copy link
Contributor

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 BlenderDefender added type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first. labels Sep 10, 2022
@lafriks
Copy link
Member

lafriks commented Sep 10, 2022

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 lafriks added the topic/ui Change the appearance of the Gitea UI label Sep 10, 2022
@BlenderDefender
Copy link
Contributor Author

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.

@lunny lunny removed the type/feature Completely new functionality. Can only be merged if feature freeze is not active. label Sep 13, 2022
@BlenderDefender
Copy link
Contributor Author

Inspiration:
grafik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/ui Change the appearance of the Gitea UI type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

No branches or pull requests

3 participants