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
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:
- 3206226-make-updating-changes
changes, plain diff MR !2176
Comments
Comment #2
lauriiiComment #3
gábor hojtsyTagging for DrupalCon North America 2021 contribution.
Comment #4
mherchelFrom my point of view, if I generate a brand new theme and its working, I won't be actively looking for upgrades.
That being said, it would be nice to have a changelog, so we could potentially bring in relevant issues.
Comment #7
mglamanFix typo in title.
Comment #8
lauriiiI 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:
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?
Comment #9
gábor hojtsyI 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).
Comment #10
mglamanSo should we provide a
generatedkey which has something likeSOURCE_THEME_NAME:VERSION. Which requires aversionkey to exist and converting the pseudo-constantVERSIONto\Drupal::VERSIONComment #11
lauriii+1, something like that is what I was thinking. We should also make sure a static value from contrib projects is supported.
Comment #13
mglamanComment #15
wim leersI think after addressing the reviews from @lauriii and @alexpott, this is now probably getting pretty close :)
Comment #16
lauriiiI think this is ready for committer review. Thanks for the epic work @Wim Leers and @mglaman!
Comment #17
mglamanWow, 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.
Comment #18
alexpottCommitted 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.
Comment #22
wim leersMy thoughts exactly :)
Comment #23
wim leersIMHO this belongs in the
9.4.0-beta1release 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?Comment #24
lauriii#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.
Comment #25
wim leers👍 I missed that — because
starterkit_theme.info.ymldoes not mention its experimental nature, but I missed thehidden: true🙈Thanks for clarifying!