Problem/Motivation

Steps to reproduce

We made Olivero and Claro the default themes in the default profile (Yay!).

By doing so, we moved a lot of theming blocks around. I _think_ we made some mistakes there:

1. For Olivero we made different blocks (not) move (See https://git.drupalcode.org/project/drupal/-/commit/c94142 and https://git.drupalcode.org/project/drupal/-/commit/0bd4c9f.

I _think_ this is because of git not handling those moves particularly well. I had to create the attached patches with the -c diff.renames=false option to also _not_ make blocks disappear.
2. Since the commits for (at least) Olivero we have a drastic increase of (not so) random fails in \Drupal\Tests\quickedit\FunctionalJavascript\SettingsTrayIntegrationTest.

When running this test locally and actually looking at the robo-controlled Chrome browser you can see the themes look mangled, blocks are not there/not in the correct region.

3. Try installing a new site with the new default profile, so with Claro and Olivero and then switching back to Seven and Bartik: You run into: blocks are not there/not in the correct region from #2.

Proposed resolution

The attached patches (as said created with -c diff.renames=false) move all the block.block.[theme]_[whatever].yml files into the config/optional directory of the theme.

I've tested this manually:

- Installed a clean new site with this code, switched Claro for Seven and back, also Olivero for Bartik and back, and saw no out-of-place blocks
- Ran \Drupal\Tests\quickedit\FunctionalJavascript\SettingsTrayIntegrationTest manually and watched the Robo-Chrome and saw no more mangled themes whizz by than I've seen when running the same test on the code before both themes changed.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#2 3278342_d10.patch20.25 KBspokje
#2 3278342_d94_d95.patch43.08 KBspokje

Comments

Spokje created an issue. See original summary.

spokje’s picture

StatusFileSize
new43.08 KB
new20.25 KB
alexpott’s picture

@Spokje I don't think we should be adding block configuration to seven or bartik at this point. Doing so would prevent block_theme_initialize() from working when such a theme is installed on an existing site. So this is quite a big behaviour change.

spokje’s picture

Assigned: spokje » Unassigned
Status: Active » Closed (works as designed)