A patternkit library definition's css and jss assets are not attached when rendering pattern

Created on 15 September 2023, about 1 year ago

Problem/Motivation

A patternkit library definition's css and jss assets are not attached when rendering pattern. As a result, a patternkit pattern's twig template needs to use Drupal's attach_library() twig function to attach a specific patternkti pattern's assets.

Steps to reproduce

  • Disable CSS and JS aggregation for convenient inspection of assets
  • Install the patternkit_examlpe module
  • Add a patternkit example pattern to a layout
  • Render page with pattern
  • Use browser dev tools, e.g. network tab to filter/search for declared patternkit_example library assets, e.g. patternkit.css
  • Observe assets not included
  • Expected patternkit.css included in page request

As a work-around, add block--patternkit.html.twig template in active theme and use {{ attach_library('patternkit_example/patternkit') }}.

Proposed resolution

TBD

Remaining tasks

TBD

User interface changes

TBD

API changes

TBD

Data model changes

TBD

πŸ› Bug report
Status

Active

Version

9.1

Component

Module Core

Created by

πŸ‡ΊπŸ‡ΈUnited States jasonawant New Orleans, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024