Problem/Motivation

Settings Tray is moving to contrib.

#[Block(
  id: "page_title_block",
  admin_label: new TranslatableMarkup("Page title"),
  forms: [
    'settings_tray' => FALSE,
  ]
)]

The settings_tray metadata in the following files needs moving to Settings Tray module in an alter hook or similar:

core/lib/Drupal/Core/Block/Plugin/Block/PageTitleBlock.php
core/modules/help/src/Plugin/Block/HelpBlock.php
core/modules/system/src/Form/SystemBrandingOffCanvasForm.php
core/modules/system/src/Plugin/Block/SystemBrandingBlock.php
core/modules/system/src/Plugin/Block/SystemMainBlock.php
core/modules/system/src/Plugin/Block/SystemMenuBlock.php

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3582533

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

longwave created an issue. See original summary.

quietone made their first commit to this issue’s fork.

quietone’s picture

Status: Active » Needs review
longwave’s picture

Status: Needs review » Needs work

Looks good. I think hardcoding them like that is fine for this case, technically someone might want to alter them - but that seems fairly unlikely, that can always be solved a better way in contrib if needed.

However, it looks like SystemMenuOffCanvasForm is only used by this feature, so I think that should move to Settings Tray as well.

quietone’s picture

Status: Needs work » Needs review
longwave’s picture

Status: Needs review » Reviewed & tested by the community

Thanks, I think we are done here. And I realised the hardcoded block names can still be altered, just by running another block alter hook that runs after the Settings Tray one does, so no real change there anyway for anyone who might be doing something additional here.

  • godotislate committed 5ccc0bf6 on main
    refactor: #3582533 Move Settings Tray block metadata to Settings Tray...
godotislate’s picture

Status: Reviewed & tested by the community » Fixed

Committed 5ccc0bf and pushed to main. Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.