-
-
Notifications
You must be signed in to change notification settings - Fork 173
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
feat(inputs): detect constraint validation attribute changes #930
feat(inputs): detect constraint validation attribute changes #930
Conversation
We weren't using the return type even when we were actually returning a value.
✅ Deploy Preview for oruga-documentation-preview ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #930 +/- ##
============================================
- Coverage 56.71% 18.08% -38.64%
============================================
Files 30 292 +262
Lines 1511 7345 +5834
Branches 544 2135 +1591
============================================
+ Hits 857 1328 +471
- Misses 654 5067 +4413
- Partials 0 950 +950
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Without in-browser testing of some kind, it's hard to really automate testing of this change. Are there any plans to restore Cypress (or use another in-browser test framework) that require a full browser implementation of the DOM? |
@blm768 I really appreciate your clear and well written PRs and Issues. You have some very nice requests for improvements for Oruga! |
Thanks! Oruga has been providing significant value for me and the rest of the team I work with, so it's only fair that I contribute back, especially when it makes Oruga more suitable for my own use cases. |
At the moment there are no plans to restore Cypress until most of the components have been unit tested. I think we have enough open stuff to do with the current stack until we can look further into more testing techniques. |
This is how I became a maintainer for oruga :D |
That's fair enough; there's certainly plenty of room for expanding the current tests. |
When attributes related to HTML constraint validation change on an input, they may change or even remove the validation error on the input. Ideally, we'd reflect the change of validation error in the enclosing field.
Proposed Changes
Changes to the following attributes on an invalid form element should trigger a call to
checkHtml5Validity
:required
pattern
maxlength
minlength
max
min
step
Additionally, changes to the
disabled
attribute on the input or any ancestor<fieldset>
should trigger a call tocheckHtml5Validity
.Sample
Before
before.webm
After
after.webm