-
Notifications
You must be signed in to change notification settings - Fork 852
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
When name is missing from "Add new server" dialog, only the name field should be highlighted and "Add" button shouldn't be disabled #438
Comments
Actually the current behavior was intentional - When you click the Add button without filling any fields there are actually 2 errors, these fields are marked red. I don't think that it's a good idea to validate the form only until an error has been found. |
@jnugh This seems to be inconsistent with Mattermost server error messages, hence making the experience less obvious (or familiar) to the end user. |
I can't reproduce this one in the latest master. I believe it may have been fixed at some point. |
Hey @kethinov, thanks for looking into this! It does seem to reproduce for me (The "Add" button is disabled and the "URL" field is also highlighted red) |
Ah my apologies, you're right. When I read the issue originally, I thought you meant that some time in the past both fields weren't being highlighted and that they should be, but I misread you. |
No problem! Are you interested looking into fixing it? |
Accidentally closed by pushing. The original problem still exists. |
The reason that #779 was marked as closing this is I argued in #779 that it is a better UX to continue to highlight them all as it currently does, but to clarify the error messages to remove the confusion instead of selectively highlighting. As I understand it, there is a school of thought in the UX community that once you submit a form, all fields that are not filled out correctly should be highlighted, even the ones you haven't tried to fill out yet. The idea is it draws your attention to everything that needs to be addressed before the form can be submitted. I'm sure there are good arguments to support both positions, but the react-bootstrap people appear to have taken the position that highlighting them all is the way to go, and have built their API accordingly. To selectively highlight instead, you would probably have to drop that dependency. |
I confirm (by marking "x" in the [ ] below):
Summary
When name is missing from "Add new server" dialog, only the name field should be highlighted and "Add" button shouldn't be disabled
Steps to reproduce
Expected behavior
"Name is required." error message with the name field highlighted
Observed behavior
"Name is required." error message with the name and URL fields highlighted, and the "Add" button disabled
The text was updated successfully, but these errors were encountered: