Releases: Patternslib/Patterns
Release 7.1.3
Release 7.1.2
Release 7.1.1
7.1.1 (2022-02-16)
Features
- core polyfills: Add polyfills module for modern browsers. (69402f6)
Currently this holds a polyfill for SubmitEvent.submitter, which isn't available in Safari < 15.4 and jsDOM.
Bug Fixes
- pat validation: Fix release 7.1.0. (3afb42b)
The event-submitter-polyfill package isn't universally built.
Let's use our new core/polyfills.js module instead and fix the previous release.
Release 7.1.0
7.1.0 (2022-02-16)
Features
-
core events: Standard JavaScript event factories - add "click" event. (8c7ce5f)
-
pat validation: Do not submit when a formnovalidate buttons was used. (35f4227)
-
pat validation: Set novalidation to pat-validation forms to prevent the browser's validation bubbles to appear. (a6a8188)
Bug Fixes
- pat toggle: Don't let pat-toggle steal the click event and prevent double clicks. (8b75b8e)
Do not let pat-toggle prevent the click event after it was catched.
This makes pat-toggle work together with other Patterns, like pat-checklist.
Also, when clicking on a label wrapping a checkbox, the checkbox also emits a click event which results in a unmodified toggle-state.
Prevent double-clicks by debouncing and canceling events.
Maintenance
Release 7.0.2
7.0.2 (2022-02-15)
Bug Fixes
- pat auto suggest: Fix issue with pat-auto-submit. (bbf5735)
Also dispatch a input event after a value has changed to let auto-submit do a form submit.
This fixes an issue introduced in Patternslib 7.0.0.
Note: this will be revisited when reworking auto-submit and input-change-events for standard JavaScript event compatibility.
Maintenance
-
core events tests: Add jQuery vs native JavaScript events tests. (bb3a8e8)
Add test showing that jQuery catches native events, but native listeners do not catch jQuery events.
In the mid-term we want to switch to native-only to get rid of this difference. -
Dependencies: Upgrade dependencies. (d5fd1ad)
-
pat auto submit: Cleanup code, improve tests. (8d289eb)
-
pat auto suggest: Improve and extend tests. (d4d2e99)
Release 7.0.1
7.0.1 (2022-02-08)
Bug Fixes
- Build: Use public_path script while also having publicPath set to auto. (b8dfdbd)
We still need to use thesrc/public_path.js
script as first import in our bundles to correctly resolve the loading path for chunks.
publicPath set to auto does not work in certain environments (e.g. the Plone resource registry).
Partially reverts 1b61431, "Use automatic publicPath determination instead of manually setting it."
Maintenance
-
build: Add and expose a "install" target alias to the Makefile as an alias to stamp-yarn. (e204037)
-
build: Remove unnecessary double-colon from targets. (070e4d9)
-
Cleanup: Remove reference to moment-timezone-with-data in .eslintrc - a file which was removed some time ago. (5de91cc)
-
Cleanup: Restructure package.json entries to move less relevant info down. (a25043b)
-
Docs: Update developer styleguide with simpler commit message scope naming guidelines. (1b391cb)
-
Change the bundle name whichis uploaded to the GitHub release page from patternslib-VERSION.zip to patternslib-bundle-VERSION.zip to better distinguish it from the automatically created Patterns-VERSION.zip source distribution. (c489a8c)
-
pat validation: Test and demo validation of datetime-local. (dc58887)
Release 7.0.0
7.0.0 (2022-01-28)
Features
-
core dom: Hide method: also set hidden attribute for better semantics. (379e4a9)
-
core events: Standard JavaScript event factories - add "scroll" event. (949b1dc)
-
core events: Standard JavaScript event factories. (951084f)
Provide a library with standard JavaScript event factories, beginning withchanged
andsubmit
events. -
pat scroll-box: Allow detection of scroll-stop. (b226aeb)
Addscrolling-up
andscrolling-down
classes which will be removed after the user has stopped scrolling.
This allows for detection of a scrolling situation vs non-scrolling situation. -
pat scroll-box: Optimize performance. (9caf2be)
Optimize performance by grouping together DOM manipulation calls.
The browser is now able to better optimize the code in regard to the reflow/repaint cycles.
Also see: https://areknawo.com/dom-performance-case-study/ -
pat validation: Allow to define a custom error template. (986a092)
Bug Fixes
-
pat auto suggest: Do not change input field to type "hidden". (ab12b36)
Don't change the date field to a hidden field which would prevent it from validation.
Instead just hide it.
Also, do this not in the transform method but on initialization. -
pat auto suggest: Instead of searching for a reset button, listen on the form's reset event for clearing the data. (cd69e92)
-
pat auto suggest: Invoke standard JS change event. (31da974)
Work around the situation that a jQuery "change" event, submitted by select2, isn't caught by pat-validation.
Select2 also triggers a click event, which we will use here to trigger a standard JS change event. -
pat date picker: Do not change input field to type "hidden". (66f4333)
Don't change the date field to a hidden field which would prevent it from validation.
Instead just hide it.
Also disable click on label as this would focus/click-forward to the invisible input field and invokes some weird behavior. -
pat scroll-box: Immediately and correctly set CSS classes. (7e7fd23)
Fix pat-scroll-box to immediately and correctly set the CSS classes by using requestAnimationFrame instead timeouts.
Breaking Changes
- core dom create_from_string: Change create_from_string to be able to create multiple siblings from a string. (062991c)
Returns now a DocumentFragment instead of a single DOM node.
This method wasn't used in Patternslib or any of the core addons.
If you used it and it breaks your code, let me know. - core events: Move add_event_listener and remove_event_listener to core.events. (661b74c)
Move add_event_listener and remove_event_listener from core.dom to core.events.
Provide backwards compatibility imports in core.dom.
Those imports will be removed in an upcoming version. - pat validation: Refactor pat-validation for full HTML5 compatibility. (9999c8f)
-
Use the Web API validation framework.
-
Define custom errors with the Web API method
setCustomValidity
(e.g. the custom error for the start date not being after the end date with the notnot-after
option). -
Make use and set the Web API
validityState
according to validity of the form inputs. -
Making use of the Web API validation framework allows to use the
:invalid
and:valid
CSS selevtors - including for those inpyts with custom validity messages. -
Validate the form on
input
,change
,blur
andsubmit
events but make sure only one is run at once. -
Remove default validation error messages from the configuration.
If no validation message is defined the browser will show a default validation message, already translated into the language of the browser. -
Remove configuration option
type
.
Use thetype
attribute of the input element instead. For a date field, usedate
.
Forinteger
just usenumber
.
If you want to support real, floating numbers, usestep="any"
or a real number as step size. -
Remove dependency on validate.js.
Maintenance
-
Remove unused core/scroll_detection.js. (19779d2)
-
core parser: Minimal code simplification. (3c28bb2)
-
dependencies: Remove now unused dependency on validate.js. (d698930)
-
dependencies: Update browserslist database / caniuse-lite. (60ac00f)
-
dependencies: Upgrade dependencies. (9f0d41f)
-
docs: Add improve JSDoc strings a bit. (5f0f6ec)
-
pat ajax: Modernize code. (3953112)
-
tests: Use global instead of window in node based tools like Jest for registering global variables. (634325c)
-
Use caching in GitHub actions. (504e342)
Release 6.4.0
6.4.0 (2022-01-24)
Features
- webpack: Add source maps for production and development builds. (5c720a4)
We are using a faster source map generation option with good results for
development builds. - webpack: Only minimize in production mode. (a6cf125)
Compile development and production bundles with the name bundle.min.js.
This allows to get rid to adapt the script name in production and development - both modes use the same name.
However, it's only minified in production mode.
We think the name .min.js also fits the development bundle as it is still babel-transpiled and webpack compiled.
Maintenance
Release 6.3.2
6.3.2 (2021-12-22)
Bug Fixes
- pat inject: autoload-visible only when in viewport. (49863b7)
Fix autload-visible trigger to only load the injection if the element is in the viewport.
As before, this check is done after 100ms.
This prevents loading items when we quickly scoll across them, like with href-section-jumps.
Maintenance
- dependencies: Upgrade dependencies. (bd1ba37)
Release 6.3.1
6.3.1 (2021-12-21)
Bug Fixes
-
pat gallery: Correctly re-use existing default templates. (5191041)
-
pat gallery: Do not reinitialize gallery image sizes too often. (1f1e4d4)
Maintenance
-
dependencies: Upgrade up to minor versions. (b0d2177)
-
pat gallery: Add demo/test case for extending the pat-gallery page with itself. (433a95a)
-
pat gallery: Factor out get_template so that it can be overwritten in subclasses. (5341141)
-
pat gallery: Remove redundant preventDefault. (8a341aa)
-
pat inject: Minor documentation fix. (3b091b8)