Allow starterkit theme generator tool to clone Olivero

Created on 1 August 2022, over 2 years ago
Updated 13 February 2023, almost 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 27 minutes 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?

  • Open in Jenkins → Open on Drupal.org →
    Environment: PHP 8.1 & MySQL 5.7
    last update over 1 year ago
    Build Successful
  • Status changed to Needs work over 1 year ago
  • 🇺🇸United States smustgrave

    Seems there are failures in the MR

  • Open in Jenkins → Open on Drupal.org →
    Environment: PHP 8.1 & MySQL 5.7
    last update over 1 year 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.
  • Open in Jenkins → Open on Drupal.org →
    Environment: PHP 8.1 & MySQL 5.7
    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 10 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
    10 months ago
    Total: 183s
    #131781
  • Pipeline finished with Failed
    10 months ago
    Total: 348s
    #134037
  • Pipeline finished with Failed
    10 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
    10 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.

Production build 0.71.5 2024