Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 295585

Allow starterkit theme generator tool to clone Olivero

$
0
0

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:

  • Bring build step into Olivero - this is the ability to compile PostCSS
  • Rename Olivero filenames.
  • Rename functions etc

File names that will need to be renamed

  • All of the config items within core/themes/olivero/config
  • core/themes/olivero/olivero.breakpoints.yml
  • core/themes/olivero/olivero.info.yml
  • core/themes/olivero/olivero.libraries.yml
  • core/themes/olivero/olivero.theme
  • core/themes/olivero/src/OliveroPreRender.php

File contents that will need to be renamed

  • Various config within /config
  • Lots of comments within the JavaScript
  • The JavaScript config that gets loaded at Drupal.olivero
  • Color settings that get loaded under drupalSettings.olivero
  • Various once names (these may be able to have the namespace removed)
  • Various CSS selectors (.olivero-details)
  • Various CSS Animation names (eg olivero-throbber)
  • References to Olivero in /templates (eg {% include '@olivero/includes/preload.twig' with { olivero_path: olivero_path } only %})
  • Comments within /templates
  • Libraries attachments ({{ attach_library('olivero/layout-views-grid') }})
  • Everything olivero related in olivero.theme and theme-settings.php

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

Viewing all articles
Browse latest Browse all 295585

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>