Problem/Motivation

We are working on a new admin theme here: #3066007: Roadmap to stabilize Claro. After the new admin theme has been made default experience on new installations, we should start the process to deprecate Seven. Seven might be used by existing sites which has to be taken into account.

This issue is to do the actual deprecation of Seven. See that parent for all the tasks that need to be done to deprecate Seven.

Proposed resolution

Deprecate Seven theme to be removed in the following major release.

Remaining tasks

Work on the patch is postponed on #3278124: Convert various tests that use bartik/seven to olivero/claro but there is other work that can be done.

  1. Create a section on Deprecated and obsolete themes and themes to provide recommendations for sites using theme Seven. The recommendation are to include instructions for sites using Seven and for contributed themes that depend on Seven.
  2. Set lifecycle to deprecated.
  3. Set lifecylcle_link to the section added above, https://www.drupal.org/node//3223395#s-Seven.
  4. The change record for this issue includes a link to the doc page.

User interface changes

API changes

Data model changes

Release notes snippet

Comments

lauriii created an issue. See original summary.

lauriii’s picture

Issue summary: View changes

Blocked on Claro becoming default admin theme on new installation. Progress can be followed here: #3066007: Roadmap to stabilize Claro.

Version: 9.x-dev » 9.0.x-dev

The 9.0.x branch will open for development soon, and the placeholder 9.x branch should no longer be used. Only issues that require a new major version should be filed against 9.0.x (for example, removing deprecated code or updating dependency major versions). New developments and disruptive changes that are allowed in a minor version should be filed against 8.9.x, and significant new features will be moved to 9.1.x at committer discretion. For more information see the Allowed changes during the Drupal 8 and 9 release cycles and the Drupal 9.0.0 release plan.

xjm’s picture

Version: 9.0.x-dev » 9.1.x-dev

This would be a minor-only change (and, obviously, is blocked on Claro being stable). Since 8.9.x and 9.0.x are now in beta, I'm moving this to 9.1.x. Thanks!

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

saschaeggi’s picture

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

lauriii’s picture

Status: Postponed » Active

Claro is stable meaning we can start working on this!

catch’s picture

Priority: Normal » Critical
catch’s picture

This probably needs product manager sign-off, I think that's been done implicitly, but maybe not explicitly in a 'deprecate Seven' issue.

Decide whether we should automatically upgrade sites using Seven to use Claro in the following major release

I don't think we should do this personally. If we move Seven to contrib, then it's viable for sites to keep using it if they had a specific reason to, and an update would actively prevent that. It would also probably have to be done in 9.x - if you get to the Drupal 10 update with seven installed and it not in core, you're in trouble before the update can even run. And switching theme on people in a minor release seems unnecessary.

Sites can manually switch to using Claro now. Marking Seven as lifecycle: deprecated will inform them what's going to happen.

catch’s picture

Status: Active » Needs review
StatusFileSize
new615 bytes

Let's see what happens.

Status: Needs review » Needs work

The last submitted patch, 12: 3084814.patch, failed testing. View results

catch’s picture

Title: Deprecate Seven theme » [PP-1] Deprecate Seven theme
Related issues: +#3278124: Convert various tests that use bartik/seven to olivero/claro
quietone’s picture

Title: [PP-1] Deprecate Seven theme » Deprecate Seven theme
Issue summary: View changes
Issue tags: +Needs change record
Parent issue: #3167121: Make Claro the default admin theme » #3278212: [Meta] Tasks to deprecate Seven

Updating the issue and parent according to the developing policy on deprecating modules and themes.

Removing the postponed because the task "a section on Deprecated and obsolete themes and themes" can be worked on as well as adding a change record.

gábor hojtsy’s picture

I am definitely fine with deprecating Seven. I also don't think we should automatically update people to Claro in 9.x but we either need very solid docs or maybe some automation only in 10.x to cover the special case of Seven theme not existing to switch to Claro then? That way people can add the Seven theme to their build and keep using it or ignore the docs and magically get Claro? I think that would be a 10.x only feature though and I would not hold up deprecating Seven on it for sure. (Also I don't think that is a requirement but since we expect most sites to go that route, some kind of automation on 10.x only would be useful).

gábor hojtsy’s picture

saschaeggi’s picture

+1 to what Gabor proposes

catch’s picture

but we either need very solid docs or maybe some automation only in 10.x to cover the special case of Seven theme not existing to switch to Claro then? That way people can add the Seven theme to their build and keep using it or ignore the docs and magically get Claro?

This is going to be very difficult for a couple of reasons:

1. Themes have to be present in the filesystem in order to be uninstalled. We can't allow a theme to be 'missing'.

2. block_theme_initialize(), which maps enabled blocks between regions when a new theme is marked default, generally does not do a good job and requires manual intervention. So if we switch a site to Claro, it could end up with blocks in funny places, and short of a hard-coded mapping of common block and region combinations, not sure what we could do. This is coming up in #2635166: block_theme_initialize() falls back to putting blocks in the first region it finds, provide a better default for test coverage.

A solution to #1 would be to provide a stub seven.info.yml with lifecycle:obsolete. We would have to check that Seven is installed, but that it is the obsolete version, and only switch to Claro if both are the case. And this might have to happen in a pre-update step (i.e. when you load update.php) since updates are carried out in the admin theme.

But while that potentially might help with #1, it doesn't do anything for #2.

For documentation, we could definitely customize an error message and prevent updates altogether if the admin theme is missing, pointing people to documentation.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

longwave’s picture

Triggered some retests to see what's left to do here.

jeroent’s picture

Status: Needs work » Needs review
StatusFileSize
new3.99 KB

Let's see if this fixes the tests.

jeroent’s picture

StatusFileSize
new3.52 KB
jeroent’s picture

StatusFileSize
new3.74 KB
new1.41 KB

The last submitted patch, 23: 3084814-23.patch, failed testing. View results

catch’s picture

Issue tags: -Needs change record

Added a change record.

dww’s picture

Status: Needs review » Reviewed & tested by the community
  1. Reviewed the patch. All looks good and clear to me. Passing on 9.5.x.
  2. Reviewed the CR. Needed a very tiny edit. Otherwise simple and great.
  3. Reviewed https://www.drupal.org/node/3223395#s-seven (the lifecycle link). All looks good.

Nothing else to complain about. No pending signoffs or blockers. RTBC! Thanks

lauriii’s picture

StatusFileSize
new1.06 KB

A "reroll" now that #3302800: Core tests need to filter out deprecated themes when looping over all themes has landed. Keeping RTBC since the "reroll" consists of only removing things from the patch that are no longer needed.

dww’s picture

StatusFileSize
new2.02 KB

Agreed on re-RTBC. Here's the interdiff to confirm #28. Thanks!

  • catch committed 8deba72 on 10.0.x
    Issue #3084814 by JeroenT, catch, lauriii, dww, Gábor Hojtsy, xjm,...
  • catch committed 81593d8 on 10.1.x
    Issue #3084814 by JeroenT, catch, lauriii, dww, Gábor Hojtsy, xjm,...
  • catch committed 0124401 on 9.5.x
    Issue #3084814 by JeroenT, catch, lauriii, dww, Gábor Hojtsy, xjm,...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Technically I worked on the patch here, but there's no logic change so I think I'm still OK to commit this given the multiple +1s.

Committed/pushed to 10.1.x, cherry-picked to 10.0.x and 9.5.x, thanks!

Status: Fixed » Closed (fixed)

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