-
-
Notifications
You must be signed in to change notification settings - Fork 526
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
Fix Various Issues with Resource/Element Validation and Field Display #15146
Conversation
Now, first tab with an invalid field is activated when not currently visible. Also small fixes to validation regex rules as well as message display were made. Lastly, inconsistencies with field description labels are addressed.
Various small changes to resource and element panel widgets, including making the validation event change instead of blur. Major changes to error handling methods in the main MODx.FormPanel class to fix/enhance ux.
Removed stray console.log line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guys, please test this PR, it significantly improves the current behavior for validation in forms. |
It looks our current js build workflow fails when using |
@Mark-H what about the 3.x branch? The 3.x branch also contains these bugs. |
I'll try to cherry pick this (and the other things I merged the other day) into 3.x later. Couldn't get that to do what I wanted last sunday around midnight so figured that was a good one for another day. ;) |
Mark - If you want I can integrate the changes into a new PR for 3.x. Also, regarding your comment on the workflow you may want to take a look at Terser in place of Uglifyjs. I think ES6 has been out long enough and support is broad enough for us to be integrating its features into our coding. |
A continuation of the work initiated in draft PR modxcms#15164, ported to 3.x. Many of the validation UX features (and more) that were originally in the referenced draft (and have since been implemented into 2.x via PR modxcms#15146) have been removed from this commit and pending PR for clarity.
A continuation of the work initiated in draft PR modxcms#15164, ported to 3.x. Many of the validation UX features (and more) that were originally in the referenced draft (and have since been implemented into 2.x via PR modxcms#15146) have been removed from this commit and pending PR for clarity.
* Refactor of TV Configuration and Management A continuation of the work initiated in draft PR #15164, ported to 3.x. Many of the validation UX features (and more) that were originally in the referenced draft (and have since been implemented into 2.x via PR #15146) have been removed from this commit and pending PR for clarity. * GIT ignore Ignore this file, had to commit to reapply stashed changes. * Updates to Pass Linter Also a couple minor tweaks were made. * Requested changes from PR conversation, batch 1 * A couple more minor changes * Update resourcelist.tpl * Changes in Response to PR Feedback Addresses comments and requests to-date, with the exception of documentation. * PSR-12 Fixes * Revert gitignore changes * Changes in Response to PR Feedback, Batch 2 * Updates to Enable Multiple Overrides A few additions to allow non-native tvs to switch to the new loader method and add their own named validators and listeners. Note that I originally thought it would be possible for each custom TV to provide its own Ext.override(MODx.panel.TV,{}), and that overrides would build on top of one another. That's not the case however, as the last-loaded Ext.override takes precedence over all others. * grunt build Co-authored-by: Jason Coward <[email protected]>
This pull request has been mentioned on MODX Community. There might be relevant details there: https://community.modx.com/t/proposal-to-move-element-code-into-its-own-tab/4562/1 |
#Made several changes to gain expected validation behavior when editing resources, templates, tvs, snippets, chunks, and plugins. Now, the first tab with an invalid field is activated when not currently visible. Also small fixes to validation regex rules as well as message display were made. Lastly, some inconsistencies with field description labelling is addressed (i.e., when inline help is specified in system settings, all element editing fields now show their descriptions below instead of in tooltips). This labelling inconsistency should IMO be fixed in resource editing pages as well, but is not addressed here. (Please forgive all the minute space diffs; most of them are not intentional.)
What does it do?
Why is it needed?
To ensure better evaluation and display of, as well as dynamic navigation to, found field errors. At present, it can be confusing when encountering an error that is not in the currently active tab.
Related issue(s)/PR(s)
Addresses issues #14743 , #15116 , and #15088