Skip to content

Commit 93fa289

Browse files
committed
Release new version.
1 parent 19779d2 commit 93fa289

File tree

2 files changed

+94
-1
lines changed

2 files changed

+94
-1
lines changed

CHANGES.md

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,96 @@
1+
## [7.0.0](https://github.com/Patternslib/patterns/compare/6.4.0...7.0.0) (2022-01-28)
2+
3+
4+
### Features
5+
6+
* **core dom:** Hide method: also set hidden attribute for better semantics. ([379e4a9](https://github.com/Patternslib/patterns/commit/379e4a92992919ddc20d07df59f3af09625c716f))
7+
8+
* **core events:** Standard JavaScript event factories - add "scroll" event. ([949b1dc](https://github.com/Patternslib/patterns/commit/949b1dcb05145f1b00e261606aeea794ca65f90d))
9+
10+
* **core events:** Standard JavaScript event factories. ([951084f](https://github.com/Patternslib/patterns/commit/951084ffa2eab7a3e96b0f99eaa3f19a778dae8e))
11+
Provide a library with standard JavaScript event factories, beginning with ``changed`` and ``submit`` events.
12+
* **pat scroll-box:** Allow detection of scroll-stop. ([b226aeb](https://github.com/Patternslib/patterns/commit/b226aebddc3e67ba9e6cf4f8334b0b0c1be5af78))
13+
Add ``scrolling-up`` and ``scrolling-down`` classes which will be removed after the user has stopped scrolling.
14+
This allows for detection of a scrolling situation vs non-scrolling situation.
15+
* **pat scroll-box:** Optimize performance. ([9caf2be](https://github.com/Patternslib/patterns/commit/9caf2bea348839856c286ae35aedd87ae829cbcd))
16+
Optimize performance by grouping together DOM manipulation calls.
17+
The browser is now able to better optimize the code in regard to the reflow/repaint cycles.
18+
Also see: https://areknawo.com/dom-performance-case-study/
19+
* **pat validation:** Allow to define a custom error template. ([986a092](https://github.com/Patternslib/patterns/commit/986a092f892582585a97b5e2f7c1af5780bb6b32))
20+
21+
22+
23+
### Bug Fixes
24+
25+
* **pat auto suggest:** Do not change input field to type "hidden". ([ab12b36](https://github.com/Patternslib/patterns/commit/ab12b363db484257f2f8368ffb7dad061fa5ccbc))
26+
Don't change the date field to a hidden field which would prevent it from validation.
27+
Instead just hide it.
28+
Also, do this not in the transform method but on initialization.
29+
* **pat auto suggest:** Instead of searching for a reset button, listen on the form's reset event for clearing the data. ([cd69e92](https://github.com/Patternslib/patterns/commit/cd69e92cb62b43406d54a0178b392141613d2798))
30+
31+
* **pat auto suggest:** Invoke standard JS change event. ([31da974](https://github.com/Patternslib/patterns/commit/31da9748a9288652685ce069f538ea87e6893eea))
32+
Work around the situation that a jQuery "change" event, submitted by select2, isn't caught by pat-validation.
33+
Select2 also triggers a click event, which we will use here to trigger a standard JS change event.
34+
* **pat date picker:** Do not change input field to type "hidden". ([66f4333](https://github.com/Patternslib/patterns/commit/66f4333bd1f16ed0661a1da0d0cc30256751fe1d))
35+
Don't change the date field to a hidden field which would prevent it from validation.
36+
Instead just hide it.
37+
Also disable click on label as this would focus/click-forward to the invisible input field and invokes some weird behavior.
38+
* **pat scroll-box:** Immediately and correctly set CSS classes. ([7e7fd23](https://github.com/Patternslib/patterns/commit/7e7fd233480f9eeb9da3b5d01c3f4d283560c179))
39+
Fix pat-scroll-box to immediately and correctly set the CSS classes by using requestAnimationFrame instead timeouts.
40+
41+
42+
### Breaking Changes
43+
44+
* **core dom create_from_string:** Change create_from_string to be able to create multiple siblings from a string. ([062991c](https://github.com/Patternslib/patterns/commit/062991c45bf5604f36dd38f3da3c7d8661b8a150))
45+
Returns now a DocumentFragment instead of a single DOM node.
46+
This method wasn't used in Patternslib or any of the core addons.
47+
If you used it and it breaks your code, let me know.
48+
* **core events:** Move add_event_listener and remove_event_listener to core.events. ([661b74c](https://github.com/Patternslib/patterns/commit/661b74c137f5a10ac5144216742386d6f756632c))
49+
Move add_event_listener and remove_event_listener from core.dom to core.events.
50+
Provide backwards compatibility imports in core.dom.
51+
Those imports will be removed in an upcoming version.
52+
* **pat validation:** Refactor pat-validation for full HTML5 compatibility. ([9999c8f](https://github.com/Patternslib/patterns/commit/9999c8f484ddefd2d043a9dd728451cbb6b173b9))
53+
- Use the Web API validation framework.
54+
55+
- 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 not ``not-after`` option).
56+
57+
- Make use and set the Web API ``validityState`` according to validity of the form inputs.
58+
59+
- 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.
60+
61+
- Validate the form on ``input``, ``change``, ``blur`` and ``submit`` events but make sure only one is run at once.
62+
63+
- Remove default validation error messages from the configuration.
64+
If no validation message is defined the browser will show a default validation message, already translated into the language of the browser.
65+
66+
- Remove configuration option ``type``.
67+
Use the ``type`` attribute of the input element instead. For a date field, use ``date``.
68+
For ``integer`` just use ``number``.
69+
If you want to support real, floating numbers, use ``step="any"`` or a real number as step size.
70+
71+
- Remove dependency on validate.js.
72+
73+
74+
### Maintenance
75+
76+
* Remove unused core/scroll_detection.js. ([19779d2](https://github.com/Patternslib/patterns/commit/19779d227d9a5f79e4438d283fbfe131552bccd6))
77+
78+
* **core parser:** Minimal code simplification. ([3c28bb2](https://github.com/Patternslib/patterns/commit/3c28bb241b4c6e508e0627e16e0629cafdc5dc30))
79+
80+
* **dependencies:** Remove now unused dependency on validate.js. ([d698930](https://github.com/Patternslib/patterns/commit/d698930e040cb8fca2ae74108d8a587d3ef0d6c3))
81+
82+
* **dependencies:** Update browserslist database / caniuse-lite. ([60ac00f](https://github.com/Patternslib/patterns/commit/60ac00fa40beda67f4173839692819b656b7bb9e))
83+
84+
* **dependencies:** Upgrade dependencies. ([9f0d41f](https://github.com/Patternslib/patterns/commit/9f0d41fba2448db6f0b33d8b141f35a6b01b7616))
85+
86+
* **docs:** Add improve JSDoc strings a bit. ([5f0f6ec](https://github.com/Patternslib/patterns/commit/5f0f6ec08b4b7b7800034d86cce5cff22e044de3))
87+
88+
* **pat ajax:** Modernize code. ([3953112](https://github.com/Patternslib/patterns/commit/3953112122a2b05ecfde8e6e2fce18d53af1a54f))
89+
90+
* **tests:** Use global instead of window in node based tools like Jest for registering global variables. ([634325c](https://github.com/Patternslib/patterns/commit/634325c7f7c6c2c3dc928a20207c95fdab4e2f9d))
91+
92+
* Use caching in GitHub actions. ([504e342](https://github.com/Patternslib/patterns/commit/504e342f58115c66fb563f6eedca8a33e7062beb))
93+
194
## [6.4.0](https://github.com/Patternslib/patterns/compare/6.3.2...6.4.0) (2022-01-24)
295

396

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@patternslib/patternslib",
3-
"version": "6.4.0",
3+
"version": "7.0.0",
44
"title": "Markup patterns to drive behaviour.",
55
"description": "Patternslib is a JavaScript library that enables designers to build rich interactive prototypes without the need for writing any Javascript. All events are triggered by classes and other attributes in the HTML, without abusing the HTML as a programming language. Accessibility, SEO and well structured HTML are core values of Patterns.",
66
"author": {

0 commit comments

Comments
 (0)