-
Notifications
You must be signed in to change notification settings - Fork 434
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
Improve feedback in forms #7471
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ana06
added
Frontend
Things related to the OBS RoR app
Bootstrap 🚀
Bootstrap migration
labels
Apr 25, 2019
Enable automatic client-side validation using HTML5 based on the models validations. This makes much easier to keep views and backend code consistent and provide early feedback to users.
Remove from our views code SOME of the html validations that are now provided by HTML5Validators, by using our models validations.
`email_field` generates a `text_field` of type `email`, providing feedback to users when introducing a wrong email without sending the form.
Spider tests fails otherwise and we plan to throw away this code anyway (old UI).
And once again, the spider test uncovers crucial tests missing:
|
I don't think I'll have time to finish this in the close feature. I still think it is a nice gem that could help us keeping OBS consistent. It may require a bit of work on the gem though. If someone would like to finish, feel free 😉 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add html5_validators gem, which provides automatic client-side validation using HTML5 based on the models validations. This makes much easier to keep views and backend code consistent and
provide early feedback to users. This is also changing many forms in the whole application. It should be though a save change as it is consistent with our model validations and the errors would have just been shown later.
I have removed from our views code SOME of the html validations that are now provided by HTML5Validators, by using our models validations. There may still be some repetition and differences but I had to stop somewhere. In the future when realizing of the discrepancies, it should be as easy as remove the view code. Some more PR for more validation improvements are coming.
I have also change some emails fields to use
email_field
Rails helper, which generates atext_field
of typeemail
, providing feedback to users when introducing a wrong email without sending the form.It helps addressing #7011.