Add an automatic inline block title feature that hides the title field when the "Display title" option is unchecked

Created on 15 August 2024, 3 months ago
Updated 9 September 2024, 3 months ago

Problem/Motivation

In the Drupal Layout Builder, block content entities encounter a minor UI issue related to titles. Every block content entity requires a value in the info field, which is titled as Block description within the reusable block library. This field is displayed in the administrative UI as the entity's title when browsing through the block library, impacting the usability of block management.

Steps to reproduce

Background:
Given that a user with permission to edit the layout of a page with Layout Builder
And trying to add an inline block in a section

When Creating a new inline block
And the Display title check box is checked

When the Display title check box is unchecked

When saving with no title
Then the an inline error will show up
And blocks the editor from adding/saving the block

Proposed resolution

  • Borrow the Inline Block UX class from the no longer supported Layout Builder UX module. ( used in Varbase ~9) but not used in Varbase ~10
  • Hide the label field when the label display is unchecked.
  • Uncheck the label display checkbox for new blocks.
  • Prefill the label field for new blocks.

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.1 , varbase_layout_builder-10.1.2

Varbase update type

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

User interface changes

When the "Display title" check box is unchecked

When the "Display title" check box is checked

When not adding a Title for the block
And the Display title was unchecked
Then the inline block will be saved
And the title will be auto pre-filled

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • Issue #3468403 : Added an automatic inline block title feature that hides the title field when the "Display title" option is unchecked
Feature request
Status

Fixed

Version

10.1

Component

Code

Created by

🇯🇴Jordan Rajab Natshah Jordan

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