Skip to content

Conversation

@thet
Copy link
Member

@thet thet commented Oct 10, 2022

Lots of improvements while working on patternslib-training.

Needs some face 2 face discussion.

@thet thet requested a review from pilz October 10, 2022 16:37
thet added 23 commits October 11, 2022 05:48
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.
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.
@thet thet force-pushed the modernize-markdown branch from 1f62fed to 9051717 Compare October 11, 2022 05:12
@thet thet force-pushed the modernize-markdown branch from 9051717 to 7fcfdc4 Compare October 11, 2022 05:13
@thet thet merged commit a5c4e3d into master Oct 11, 2022
@thet thet deleted the modernize-markdown branch October 11, 2022 05:15
@thet thet changed the title Modernize markdown Improvements while preparing patternslib-training Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants