-
Notifications
You must be signed in to change notification settings - Fork 43
Improvements while preparing patternslib-training #1077
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
Merged
Merged
Conversation
This file contains hidden or 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
/cc @cornae This fixes the following two issues: Fixes: #837 Fixes: quaive/ploneintranet.prototype#1289
Import the sortable styles when the global variable `__patternslib_import_styles` is set to `true` (the default is `false`). This allows to show the sortable marker without having to separately load all the styles.
…ent. The current situation requires the integrator to add the `sortable-item` class on all sortables manually. If that is not done there can be styling problems like a missing insert marker which makes it hard to use the pattern. As the pattern already defines what should be a sortable it we also let the pattern assign the class "sortable-item".
When new items were added to a sortable list e.g. via pat-clone or pat-inject, those items could not be sorted. We are now re-initializing the sortable pattern after a `pat-update` event and make new elements sortable.
…fter. If no error messages were provided for the not-before and not-after constraints on date fields no error messages were shown even when those inputs had form validation errors. Now we are always providing a fallback error message based on the label or input name.
Due to some event listers calling each other multiple times, the form was validated up to 5 times in one validation run. This commit fixes multiple validation runs when a form element was disabled, e.g. when the submit button was disabled after validation errors.
When form elements were added via user interaction - e.g. by using pat-clone or pat-inject - those elements were not validated. Now the form validation is re-initialized after a `pat-update` event and this problem is fixed.
When a date was selected with the date picker a `blur` and `changed` event was thrown. Now we only throw a `changed` event if da date was selected. If no date was selected we throw a `blur` event allow pat-validation do validate required date input fields when no value was given.
…t needs to be a.target.tagName.
…etter syntax highlight libraries.
highlight.js allows to dyamically load languages in a webpack environment (almost, see next commit). Prism.js is mainly a Node.js library and currently not suited to load languages dynamically.
highlight.js version 11 does not allow dynamic imports of languages and styles with webpack due to an exports field in package.json. See: highlightjs/highlight.js#3634
…omating code examples from working pattern demos.
TextNode cannot hold markup, so there is also no needto scan those elements for patterns.
We want clone-code to clone the markup before any other patterns are modifying it.
1f62fed to
9051717
Compare
9051717 to
7fcfdc4
Compare
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.
Lots of improvements while working on patternslib-training.
Needs some face 2 face discussion.