Problem/Motivation

When using base theme, theme maintainers could rely on upstream bug fixes on templates, CSS and JavaScript not overridden by theme.
Changes will start happening more frequently with the new starterkit theme because it addresses the BC concerns by moving some of the maintenance responsibility from the base theme to the theme maintainer. This raises a question; are there theme maintainers that would like to apply at least some of the changes from the starterkit theme to their generated themes?

Proposed resolution

Make it easier to follow changes in the starterkit themes adding a generator key to the info.yml that stores the name and version of the starterkit theme. This will allow providing tooling to make updating changes easier in future if that's desired.

Remaining tasks

  • Validate if theme maintainers are interested in following core changes and applying them in generated themes

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3206226

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

lauriii created an issue. See original summary.

lauriii’s picture

Issue summary: View changes
gábor hojtsy’s picture

Issue tags: +Drupal 10, +NorthAmerica2021

Tagging for DrupalCon North America 2021 contribution.

mherchel’s picture

From my point of view, if I generate a brand new theme and its working, I won't be actively looking for upgrades.

If it ain't broke, don't fix it

That being said, it would be nice to have a changelog, so we could potentially bring in relevant issues.

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.

mglaman’s picture

Title: Make updating changes from startekit themes to generated themes easier » Make updating changes from starterkit themes to generated themes easier

Fix typo in title.

lauriii’s picture

I tend to agree to #4. When I've maintained sites, I don't remember I would have ever looked for markup updates unless something was broken.

Since this seems like a bit of an edge I'm wondering if we could simply prepare for this by adding a new key to info.yml on the theme creation which stores the version of the starterkit theme used for generating the theme. The documented steps for checking changes that has happened since the theme was created could be:

  1. Generate a new theme using the same version of the starterkit theme as the theme originally used
  2. Commit the theme to a temporary branch in git
  3. Update to the latest version of Drupal
  4. Generate the same theme again and compare changes

I think the key part here is that we store the version of the original theme so that if we want to provide better tooling for this in future, we would already have that information available. Thoughts?

gábor hojtsy’s picture

I think as long as there is a way to track which version was used to generate the theme, people could evolve tooling later on as well.

I would personally not say people will not look for markup updates, after all we are replacing a system where they ALWAYS got the markup updates in the base theme, so there was no reason to look for them, they got them. There was also no way to avoid them unless you avoided updating the base theme somehow (eg. contrib base themes).

mglaman’s picture

So should we provide a generated key which has something like SOURCE_THEME_NAME:VERSION. Which requires a version key to exist and converting the pseudo-constant VERSION to \Drupal::VERSION

lauriii’s picture

+1, something like that is what I was thinking. We should also make sure a static value from contrib projects is supported.

mglaman’s picture

Status: Active » Needs review

Wim Leers made their first commit to this issue’s fork.

wim leers’s picture

I think after addressing the reviews from @lauriii and @alexpott, this is now probably getting pretty close :)

lauriii’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

I think this is ready for committer review. Thanks for the epic work @Wim Leers and @mglaman!

mglaman’s picture

Wow, improvements look great. +1 to RTBC. It'll be interesting to get agency feedback on the strictness for a theme version. I think it's a good push, though, for best practices.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed 8d3c6fd35f to 10.0.x and b4011fbfd6 to 9.5.x and 9243da8ab2 to 9.4.x. Thanks!

Credited myself for MR code review.

  • alexpott committed 8d3c6fd on 10.0.x
    Issue #3206226 by Wim Leers, mglaman, lauriii, alexpott: Make updating...

  • alexpott committed b4011fb on 9.5.x
    Issue #3206226 by Wim Leers, mglaman, lauriii, alexpott: Make updating...

  • alexpott committed 9243da8 on 9.4.x
    Issue #3206226 by Wim Leers, mglaman, lauriii, alexpott: Make updating...
wim leers’s picture

I think it's a good push, though, for best practices.

My thoughts exactly :)

wim leers’s picture

Issue tags: +9.4.0 release notes

IMHO this belongs in the 9.4.0-beta1 release notes … but I see that #3206219: Allow configuring which theme is used as a starterkit theme was also not mentioned yet in https://www.drupal.org/project/drupal/releases/9.4.0-alpha1 — is that an oversight or intentional? 😅🤓 I think we might want to do both?

lauriii’s picture

#3206219: Allow configuring which theme is used as a starterkit theme was not mentioned because the starterkit theme is still alpha, and shouldn't be included in tagged releases. I think what we need is one draft release note which introduces the starterkit theme on a high level and mentions these key extension points.

wim leers’s picture

Issue tags: -9.4.0 release notes

👍 I missed that — because starterkit_theme.info.yml does not mention its experimental nature, but I missed the hidden: true 🙈

Thanks for clarifying!

Status: Fixed » Closed (fixed)

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