Problem/Motivation

While this project is in active development, users will want to perform updates to their sub-theme. The process of comparing the base theme sub-theme kit against a project sub-theme can be tricky. Adding an automated solution may not be doable, as there are any number of customizations a project may make after sub-theme is created.

Proposed resolution

I presented what I think is a simple solution in the Radix issue queue. I suggest we include this as part of documentation.

Remaining tasks

Add the following steps to documentation:

  1. Update the contrib theme.
    composer update drupal/bootstrap_storybook
    
  2. Make sure bootstrap_storybook is enabled so we can use the sub-theme create command.
    drush en bootstrap_storybook
    
  3. Set default theme to something else so we can temporarily uninstall it and move it
    drush config-set system.theme default bartik
    drush theme:uninstall my_bootstrap_storybook
    mv web/themes/custom/my_bootstrap_storybook ../my_bootstrap_storybook.bak
    drush --include="web/themes/contrib/bootstrap_storybook" bootstrap_storybook:create "My Bootstrap Storybook Theme"
    
  4. Have a look at the differences, and make adjustments as necessary.
    git diff -- . ':(exclude)web/themes/custom/my_bootstrap_storybook/package-lock.json'
    
  5. Make sure things run smoothly.
    npm install
    npm run dev
    npm run watch
    drush theme:enable my_bootstrap_storybook
    drush config-set system.theme default my_bootstrap_storybook
    
  6. If all is well, commit your changes.

Comments

jcandan created an issue. See original summary.

jcandan’s picture

Issue summary: View changes

  • doxigo committed d8e3ee7 on 8.x-2.x authored by jcandan
    Issue #3121502 by jcandan: Document how to upgrade subtheme
    
doxigo’s picture

Sounds like a good approach, even though I think updating the subtheme, in general, is not necessary and mostly results in things getting broken, but considering all the new changes getting introduced in bootstrap_storybook, it seems like necessary for those who need it, so I updated the theme and subtheme README file and pushed to dev

Thanks 👍

doxigo’s picture

Status: Active » Fixed
doxigo’s picture

Also added you as the commit author, cheers

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.