Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293895

Change \Drupal\Core\Block\BlockPluginInterface::BLOCK_LABEL_HIDDEN value for consistency

$
0
0

Follow-up to #2614950: Add option for visually-hidden block titles

Problem/Motivation

During #2614950: Add option for visually-hidden block titles we are introducing new label_display options to manage the blocks' title display. For backward compatibility, we have to keep the existing value of the title being hidden to "0" what's not consistent with the other options ("visible" and "visually_hidden").
In Drupal 9, we should change the value of the \Drupal\Core\Block\BlockPluginInterface::BLOCK_LABEL_HIDDEN constant to "hidden" for consistency. And adjust all related stuff like preprocesses or templates that relies on that value.

Proposed resolution

  • change \Drupal\Core\Block\BlockPluginInterface::BLOCK_LABEL_HIDDEN value to "hidden"
  • adapt core/themes/stable/templates/block/block--system-menu-block.html.twig
  • adapt core/themes/classy/templates/block/block--system-menu-block.html.twig
  • adapt core/modules/system/templates/block--system-menu-block.html.twig
  • adapt template_preprocess_block
  • update hook for existing sites, to change stored 0 values to hidden
  • updates to default installation config (profiles)

Remaining tasks

Wait till D9

User interface changes

None

API changes

None

Data model changes

block.block.*:settings.label_display value is now "hidden" when the title is disabled


Viewing all articles
Browse latest Browse all 293895

Trending Articles