Filter by block name doesn't work with default off-canvas

Created on 14 May 2024, 6 months ago

Problem/Motivation

When using the modal browser, the "Filter by block name" works as expected, but it fails to filter if you use the default off-canvas. This occurs because the links are not wrapped in an off-canvas link list, causing Drupal Core's filter mechanism to fail. Below is an example demonstrating this issue. Entering "rich" should filter the rich text block, but everything is hidden.

Steps to reproduce

  1. Enable the module.
  2. Create at least one block category and assign at least one block to this category.
  3. Navigate to the module settings (/admin/config/content/layout-builder-browser/settings) and ensure the "Show layout builder browser in modal" option is unchecked.
  4. Go to a layout builder page and bring up the add block form.
  5. Attempt to filter by the block name. Observe that the filter does not function as expected.

Proposed resolution

Wrap the links in an off-canvas link list, similar to Drupal Core. Also, remove the CSS list style for backward compatibility with the modal since links are not currently wrapped in an ul element. With this change, the filtered search works for both the off-canvas and modal displays.

πŸ› Bug report
Status

Closed: duplicate

Version

1.6

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States millerrs

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

Comments & Activities

Production build 0.71.5 2024