Problem/Motivation

Keeping storybook updated has been one of the major challenges in CivicTheme.
It relies heavily upon a variety of webpack plugins and has been extremely difficult in keeping these packages updated in a timely basis and understanding how to make updates to the build system.

Equally the build process has been too slow to build the SASS and storybook and to see the changes developers causing an inefficiency in the development process

We have decided to:

- Remove the existing gulp and storybok system
- Implement a new front-end build system with node using as few packages as possible
- Rebuild the storybook system to 8.5x using vite and the twig plugin (https://github.com/larowlan/vite-plugin-twig-drupal) with an eye to keeping storybook updated regularly

The process in building storybook and building CSS remains the same with `npm run storybook`, `npm run build`, `npm run dist` still being the commands
you will rely on.

The major difference you will notice is building CSS and storybook will be much, much less than before down from 20+ to under 10seconds (2seconds to rebuild CSS!).

The PR to be merged can be viewed at:
Theme
https://github.com/civictheme/monorepo-drupal/pull/1313
UI Kit
https://github.com/civictheme/uikit/pull/433

Upgrade process
Storybook has been updated from using the deprecated knobs plugin to utilising controls.
CivicTheme's stories have all been updated to use the new system.

Sub-theme's will need to carry out an update to implement these changes:
- Overridden and custom component stories will need to be updated use the new controls API (if you do not need these stories anymore, then you can even remove the file to build storybook)
- the new build system will need to be copied in from the CivicTheme system

Comments

richardgaunt created an issue. See original summary.

richardgaunt’s picture

Issue summary: View changes
richardgaunt’s picture

Assigned: Unassigned » alan.cole
richardgaunt’s picture

Issue summary: View changes
fionamorrison23’s picture

richardgaunt’s picture

Issue summary: View changes

richardgaunt’s picture

richardgaunt’s picture

richardgaunt’s picture

Status: Active » Needs review

  • fd0dba0d committed on 1.x
    Issue #3505934 by alan.cole, alex.skrypnyk, richardgaunt: Update...

fionamorrison23’s picture

danielgry’s picture

Assigned: alan.cole » richardgaunt
Status: Needs review » Reviewed & tested by the community

  • 4d2aea4b committed on 1.x
     Issue #3505934 by richardgaunt, fionamorrison23, danielgry, alan.cole,...
fionamorrison23’s picture

richardgaunt’s picture

Version: 1.9.0 » 1.10.0
Status: Reviewed & tested by the community » Fixed
fionamorrison23’s picture

Version: 1.10.0 » 1.9.0
fionamorrison23’s picture

Version: 1.9.0 » 1.10.0

Status: Fixed » Closed (fixed)

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