Install
Works with Drupal: ^11 || ^12Using Composer to manage Drupal site dependencies
Alternative installation files
Download tar.gz
95.9 KB
MD5: 70dd8a1a6a2e4887bebada8315c74a9e
SHA-1: 3f4c288406ff5526a88bac6bc23260f07764b2d0
SHA-256: f79622744e3fa6c0064717a258c8ff57681376905ccddd29eafd374a8101428d
Download zip
188.47 KB
MD5: 271728eb2ab3103f7e3140be33eac912
SHA-1: 2742feaa1aa65fc363a6139930fef9ef39a0356d
SHA-256: 02995c4168c8a3330ee6f7906da46b8aaf2d0e7612e181794b64ffee6fd17091
Release notes
1.3.0 improves how registered libraries behave in Drupal Canvas: previews no longer flash unstyled elements while their library loads, and each library's components are kept in the Library folder for their group, including after a library is regenerated with new groups. Registry files don't change, so 1.2 libraries keep working.
New features
- A longer failsafe in Canvas previews (#3627763). Canvas renders each change to a page in a fresh document, which loads the whole element library again, next to the editor and its other preview frame, so elements there often took longer than the 3 seconds a live page waits before showing them unstyled.
web_component_runtime_canvasnow gives every preview document, the editor's and the Library hover preview's alike, a 10-second failsafe instead. Elements still show the moment they're defined, and a library that really fails is still shown and reported. Live pages keep 3 seconds. - A failsafe delay a page can set (#3627763). The
<head>script reads an optionaldrupalSettings.webComponentRuntime.failsafeDelay, in milliseconds, and keeps 3 seconds by default. - Components kept in their group's folder (#3627764). Canvas files a component into a Library folder named after its
grouponly when it first creates it, and files one without a group under "Other". After Canvas updates its components, on a cache rebuild or a module install,web_component_runtime_canvasmoves each registered library's component to the folder for its group: its owngroup, or for an ungrouped one, its tag's entry in the registry file'scategories, or else the library's label.
Upgrading
- Folders may move on the first cache rebuild. Only a component in a folder Canvas filed it into for its library is moved: "Other", the library's label, or
<label>: <category>. A component a site builder put in a folder of their own stays there. A library folder a move leaves empty is deleted, but never "Other". Folders are config, so export your site's configuration after updating. Nothing moves during a config import. - Regenerating a library with categories, such as with cem_sdc_generator 1.2.0, now spreads its components over one folder per category on sites that already have it, on the next cache rebuild.
- Libraries don't need changes.
Requirements
Drupal 11 or 12, with no new dependencies. The Canvas features need the web_component_runtime_canvas submodule, Drupal 11.3 or later and Canvas.
See the README's "Canvas" and "Undefined elements and color schemes" sections for details.