Allow starterkit theme generator tool to clone Olivero

Created on 1 August 2022, over 2 years ago
Updated 13 February 2023, about 2 years ago

Drupal 10's new theme generator tool is intended to replace the need for creating subthemes from existing core themes. This will enable core themes to change markup without the need to take into account subthemes and backwards compatibility.

This issue is to allow the theme generator tool to clone Olivero.

Things that we'll need to do:

File names that will need to be renamed

File contents that will need to be renamed

To figure out

  • Tests. This all seems pretty brittle. If we change something, we need to make sure the theme generator works.
  • We need to ensure that the user-supplied theme name is valid. This needs to work in the JavaScript, preprocessing, templates, etc.

Testing Instructions

  • Checkout the MR branch to local/gitpod
  • cd into the webroot
  • php core/scripts/drupal generate-theme <theme_machine_name> --name "<Theme Name>" --starterkit olivero
  • Check new theme for any files that have "olivero" in their name or file contents
๐Ÿ“Œ Task
Status

Needs work

Version

10.1 โœจ

Component
Oliveroย  โ†’

Last updated 6 days ago

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States mherchel Gainesville, FL, US

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States scotwith1t Birmingham, AL

    That was so easy, thanks so much! I've been trying to stick with just core stuff for a simple site and ended up needing to customize just a little of the css and templates, so this was a huge win for my site. Thanks!

  • ๐Ÿ‡ฎ๐Ÿ‡นItaly itamair

    Thanks a lot on this! This is already pretty useful ...
    BUT I have faced some important issues trying to generate a custom theme of mine with this starterkit from Olivero, when using a machina name with underscores and a label/name with spaces inside it.

    For instance the following command:

    php core/scripts/drupal generate-theme my_custom_theme --name "My Custom Theme" --starterkit olivero

    generated weird duplications and mismatches in the names of the generated files and also a pre-render class name with spaces ...
    (nothing really usable)

    The only working solution with this has been (so far) to create/use a theme with both machine name and name without underscore or spaces, such the following:

    php core/scripts/drupal generate-theme mycustomtheme --name MyCustimTheme --starterkit olivero

    It works, but is indeed not ideal ...

  • First commit to issue fork.
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States andy-blum Ohio, USA

    @itamir can you point to any specific examples where you encountered problems? I copied your example command and got perfectly valid results. I was able to fully install and set the new theme as default and browse the site without issue.

  • ๐Ÿ‡ฎ๐Ÿ‡นItaly itamair

    Hi Andy โ€ฆ well ok โ€ฆ sorry!
    Donno what was it, how I experienced those weird behaviours, but I re-tested this few times more, and all LGTM now.
    I am on a new Macbook ARM M2 and recently made some updates in my composer etc etc ...
    Indeed now this looks neat and good to me.
    I was able to start / fork 3 themes from Olivero, very quickly and with no apparent issues.

    RTBC by me.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States andy-blum Ohio, USA

    Now that ๐Ÿ“Œ Automated A11y tests in Nightwatch Fixed has landed, I've added it into our new testPerTheme() function. ๐Ÿคž

  • Status changed to Needs review almost 2 years ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States andy-blum Ohio, USA
  • First commit to issue fork.
  • Themes are created and installed successfully, but if their name does not contain the word "olivero". For example, if the theme's name is "custom_olivero" then there are issues with namespaces. Maybe it make sense just notify users about this in some doc?

  • last update almost 2 years ago
    Build Successful
  • Status changed to Needs work almost 2 years ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States smustgrave

    Seems there are failures in the MR

  • last update almost 2 years ago
    Custom Commands Failed
  • Status changed to Postponed over 1 year ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States andy-blum Ohio, USA

    Moving this to postponed as the starterkit tool theme is currently undergoing a re-write in ๐Ÿ“Œ Making a theme compatible with core's theme generator is too difficult Needs work . When that's done all Olivero should need to do is update .info.yml and add a .starterkit.yml file

  • First commit to issue fork.
  • last update over 1 year ago
    Custom Commands Failed
  • ๐Ÿ‡ง๐Ÿ‡ชBelgium wim leers Ghent ๐Ÿ‡ง๐Ÿ‡ช๐Ÿ‡ช๐Ÿ‡บ

    How is this not ?! ๐Ÿคฏ

    Also, this is blocked on ๐Ÿ“Œ Making a theme compatible with core's theme generator is too difficult Needs work , which itself is blocked ๐Ÿ˜…

  • ๐Ÿ‡ง๐Ÿ‡ชBelgium wim leers Ghent ๐Ÿ‡ง๐Ÿ‡ช๐Ÿ‡ช๐Ÿ‡บ

    โ€ฆ it's blocked more than I thought ๐Ÿ˜…

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States andy-blum Ohio, USA

    Symfony's finder & filesystem components are now full runtime dependencies [ CR โ†’ ]

  • Status changed to Needs work 12 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States andy-blum Ohio, USA

    Now that ๐Ÿ“Œ Making a theme compatible with core's theme generator is too difficult Needs work is in, this is unblocked!

  • Pipeline finished with Failed
    12 months ago
    Total: 183s
    #131781
  • Pipeline finished with Failed
    12 months ago
    Total: 348s
    #134037
  • Pipeline finished with Failed
    12 months ago
    Total: 559s
    #134050
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States andy-blum Ohio, USA

    andy-blum โ†’ changed the visibility of the branch 10.1.x to hidden.

  • Pipeline finished with Failed
    12 months ago
    Total: 647s
    #134055
  • ๐Ÿ‡จ๐Ÿ‡ญSwitzerland 4aficiona2

    Is it already possible to use/clone Olivero as a starterkit theme? Maybe with a patch since it hasn't made it into Drupal 11 yet.

    For Drupal CMS there is the drupal_cms_olivero theme which itself uses Olivero as a base theme and which is not recommended like the module itself states in drupal_cms_olivero.info.yml.

    # This theme is marked as @internal. It is intended to evolve and change over minor releases.
    # Although we are sub-theming Olivero within Drupal CMS, sub-theming Olivero is
    # explicitly not supported by Drupal core. This is intended as a stop-gap
    # measure to provide great looking content types and components before a more
    # robust design system can be implemented.

    What is the proposed solution for Drupal CMS and Olivero and the build setup (CSS/JS/img optim) once Olivero got actually cloned? I would like to reuse the the 'menu' with it's a11y features.

    Thanks for guidance.

  • ๐Ÿ‡จ๐Ÿ‡ดColombia Freddy Rodriguez Bogotรก

    Same question here for D11.1 core.

    php core/scripts/drupal generate-theme mycustomtheme --name MyCustomTheme --starterkit olivero
    [ERROR] Theme source theme olivero is not a valid starter kit.

  • ๐Ÿ‡ฎ๐Ÿ‡ชIreland lostcarpark

    I'm eagerly awaiting this issue to be ready for testing. I managed to patch Olivero to create a subtheme back under D9, but the patch wouldn't work for me in D10.

    As a stop-gap, I've been using Jean Valverde's Olivero Subtheme Project. It links to this issue, and warns that it will soon be obsolete, but it doesn't seem to be quite yet!

    I fully expect to recreate my subtheme as a Starterkit theme when possible, but just now Jean's project seems to be the best option for Olivero derived themes.

Production build 0.71.5 2024