Skip to content

Releases: Patternslib/Patterns

Release 7.0.1

08 Feb 16:53
Compare
Choose a tag to compare

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 the src/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

28 Jan 14:03
Compare
Choose a tag to compare

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 with changed and submit events.

  • pat scroll-box: Allow detection of scroll-stop. (b226aeb)
    Add scrolling-up and scrolling-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 not not-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 and submit 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 the type attribute of the input element instead. For a date field, use date.
    For integer just use number.
    If you want to support real, floating numbers, use step="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

24 Jan 22:34
Compare
Choose a tag to compare

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

  • docs: Improve documentation on how to use the polyfills loader. (11339af)

  • webpack: Use automatic publicPath determination instead of manually setting it. (1b61431)

Release 6.3.2

22 Dec 15:51
Compare
Choose a tag to compare

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

21 Dec 00:07
Compare
Choose a tag to compare

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)

Release 6.3.0

16 Dec 11:53
Compare
Choose a tag to compare

6.3.0 (2021-12-16)

Features

  • core utils: removeWildcardClass: Add support for pure DOM nodes instead of needing jQuery objects. (6be62e8)

  • core utils: Support NodeList in ensureArray and add option enforce_array if an array-like object should converted to a real array. (23336b9)

  • pat calendar: Change time-format option to configure 24h or 12h time format. (03437e9)

  • pat gallery: Reinitialize the triggers when new elements are loadded into the gallery area. (276f3f2)

Bug Fixes

  • pat gallery: Unhide/hide the gallery template when opening/closing it. Fixes some layout issues when gallery isn't closed properly. (5abca91)

Maintenance

  • dependencies: Upgrade dependencies. (9a35e71)

  • pat gallery: Modernize and improve code. (30227e6)

  • pat gallery: Narrow the search path for the Photoswipe template element. It is just within the template. (6dd5893)

  • pat navigation: Reduce timeout from 300ms to 1ms to wait for MutationObserver. Also partly simplify test code. (edf4f14)

  • pat switch: Modernize code. (78e4756)

  • pat validation: Modernize code. (77d3410)

  • tests: Add jest-raw-loader to be able to load templates in tests. (c36fb49)

Release 6.2.0

03 Dec 22:20
Compare
Choose a tag to compare

6.2.0 (2021-12-03)

Features

  • core utils: Add escape_html and unescape_html function to replace/unreplace html entity characters. (dead69c)

Maintenance

  • pat calendar: Document preference of setting the language as lang attribute. (bbf7a6c)

  • pat display time: Document preference of setting the language as lang attribute. (71391db)

Release 6.1.0

30 Nov 11:40
Compare
Choose a tag to compare

6.1.0 (2021-11-30)

Features

  • core dom: Add acquire_attribute to get the value of the first occurence of a defined attribute up the DOM tree. (d3a2db3)

  • core dom: Add parameter to acquire_attribute to return a list of all found attributes up the DOM tree. (732ef34)

  • pat calendar: Acquire language from the DOM tree instead only the HTML node if the language is not configured. (d659e09)

  • pat display time: Acquire language from the DOM tree instead only the HTML node if the language is not configured. (7c65d5c)

Bug Fixes

  • pat autofocus: Scoped autofocus. (f820445)
    Do not operate on whole DOM tree but only on the scoped element while still working with multiple pat-autofocus instances.

This fixes a problem where autofocus was set on the wrong element after injection.

Maintenance

  • Cleanup: Remove unused icon.svg. Icons are in /style/pattern-icons.svg. (8ca2acf)

  • dependencies: Upgrade dev dependencies up to minor versions. (405674d)

Release 6.0.2

25 Nov 00:15
Compare
Choose a tag to compare

6.0.2 (2021-11-25)

Bug Fixes

  • pat modal: Fix close-panel with multiple inject forms. (251675b)
    Support close-panel with multiple forms.pat-inject in a modal, for example together with pat-stacks.
    Previously only the first form used to attach the event handler which listens for the injection success event for closing the modal.
    In these cases the modal wasn't closed properly.

Maintenance

  • build: Run the GitHub release task unattendet and checkout the modified CHANGES.md afterwards. (5945e60)

  • dependencies: Upgrade dev dependencies up to minor versions. (3f4d0c0)

Release 6.0.1

17 Nov 22:22
Compare
Choose a tag to compare

6.0.1 (2021-11-17)

Maintenance

  • build: Cleanup package.json a bit. (81f3bde)

  • build: Read release-it changelog template from absolute path. This allows for extending this config in external packages. (6fb6854)

  • dependencies: Upgrade copy-webpack-plugin and specify minimum Node.js version to 12.20.0. (4804e84)

  • dependencies: Upgrade dev dependencies up to minor versions. (5138216)

  • docs: Release notes about GitHub access tokens for GitHub releases. (4167497)