google / site-kit-wp

Site Kit is a one-stop solution for WordPress users to use everything Google has to offer to make them successful on the web.
https://sitekit.withgoogle.com
Apache License 2.0
1.25k stars 292 forks source link

Upgrade to Storybook v7 #8538

Open nfmohit opened 7 months ago

nfmohit commented 7 months ago

Feature Description

We have a high severity dependabot alert that requires us to upgrade to Webpack 5. As a step towards that upgrade, we need to upgrade to Storybook v7 at least.


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

Implementation Brief

Test Coverage

QA Brief

Changelog entry

mxbclang commented 7 months ago

@nfmohit Can you please add priority and type labels here, please? Thanks!

nfmohit commented 7 months ago

@nfmohit Can you please add priority and type labels here, please? Thanks!

Oops, sorry! Added, thanks @bethanylang!

benbowler commented 1 day ago

As part of my hackathon I took a look into Storybook 7 and attempted a migration to see what issues might come up. I ran the guided migration script and read and worked through the migration guide. However, going through this process there are some key core dependency blockers including the following:

  1. The migration from the storybook binaries to the storybook package, requires React 17.
  2. Core packages and the storybook package require node.js 16/18.
  3. The new @storybook/react-webpack5 package requirement (as the name suggests) requires Webpack 5

I briefly explored splitting the Storybook requirements into it's own package, however to render components Storybook is more deeply coupled than E2E tests for example, instead we should revisit this when #5634 #6026 and #6357 have progressed. I've marked each of these tickets as blockers to this ticket.