Closed (fixed)
Project:
Drupal core
Version:
9.4.x-dev
Component:
Starterkit theme
Priority:
Normal
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
29 Mar 2021 at 14:16 UTC
Updated:
13 May 2022 at 19:24 UTC
Jump to comment: Most recent
Comments
Comment #3
andypostComment #5
mglamanIn #3206219: Allow configuring which theme is used as a starterkit theme, we found areas of starterkit themes that may not be covered. This was done by allowing Olivero to be used as a starterkit in manual testing.
Specifically this comment: #3206219-11: Allow configuring which theme is used as a starterkit theme
Some of these may be gaps in the default centralized process and some may need to be handled by the themes themselves.
Comment #6
mherchelComment #7
mherchelahh! Posted summary change in the wrong issue.
Comment #8
lauriiiGood call on leaving out the Olivero specific problems found on #3206219-11: Allow configuring which theme is used as a starterkit theme. I think what's needed here is to come up with an API that would allow Olivero to extend the generic starterkit theme generator to correctly change the things mentioned there. I'm wondering if all that's needed is providing a "hook" for the starterkit themes to allow them to add additional code that should be executed towards the end of
\Drupal\Core\Command\GenerateTheme::execute?Comment #9
mglamanI imagine a file that can be autoloaded/discovered like a module's ServiceProvider class. This has to implement an interface which contains various integration hooks. Maybe just one big one. It doesn't get copied over, though, to the new theme.
This is the escape hatch for weird bugs until they get fixed in Drupal core.
This is the code I'm referring to
Comment #10
mglamanGoing to take a stab at this!
I don't remember our exact notes from our Slack discussions/calls. But I think the idea was:
* Themes provide a specific class to be invoked, which doesn't get copied over
* The class is invokable (__invoke) so we don't have to mess with methods names and bikeshedding, open-ended API
* The class __invoke should receive the destination path so it can make changes
Comment #11
mglamanTossing up initial proof of concept. Words will need to be tossed around and decided upon.
Comment #13
mglamanChanging the component to "Starterkit theme"
Comment #14
alexpottThis looks great.
Comment #17
lauriiiCommitted de48162 and pushed to 10.0.x. Also cherry-picked to 9.4.x. Thanks!