Fix admin theme library not attached for entity types other than node

Created on 16 May 2024, 6 months ago
Updated 15 July 2024, 4 months ago

Problem/Motivation

The admin theme library, varbase_layout_builder/claro10 in our case, is not attached to layout builder route of entity types other than node (commerce_product in our case).

The library will be attached to layout_builder_add_block, layout_builder_update_block, media_image_edit_form forms, but this will mess up the CSS rules specificity. This is because when the library is not already attached to layout builder route, the files in varbase_layout_builder/claro10 will be loaded after varbase_layout_builder/enhancements taking higher precedence and therefore breaking some styling.

Example

Before fix:

After fix:

Steps to reproduce

With Varbase: 9.1.2 and Drupal: 10.2.6
Enable layout builder for any entity type other than node.
Visit the layout builder route and observe the inconsistency between node's layout builder styling and the other entity type's layout builder styling.

Proposed resolution

Instead of matching layout_builder.overrides.node.view route to attach the library, use regex to match all entity types.

Remaining tasks

  • ✅ File an issue about this project
  • ✅ Addition/Change/Update/Fix to this project
  • ✅ Testing to ensure no regression
  • ➖ Automated unit/functional testing coverage
  • ➖ Developer Documentation support on feature change/addition
  • ➖ User Guide Documentation support on feature change/addition
  • ➖ UX/UI designer responsibilities
  • ➖ Accessibility and Readability
  • ✅ Code review from 1 Varbase core team member
  • ✅ Full testing and approval
  • ✅ Credit contributors
  • ✅ Review with the product owner
  • ✅ Update Release Notes and Update Helper on new feature change/addition
  • ✅ Release varbase-10.0.0 , varbase_layout_builder-10.1.0, varbase-9.1.4 , varbase_layout_builder-10.0.54

Varbase update type

  • ✅ No Update
  • ➖ Optional Update
  • ➖ Forced Update
  • ➖ Forced Update if Unchanged

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

🐛 Bug report
Status

Fixed

Version

10.0

Component

Code

Created by

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024