Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(storybook): upgrade to 8.4.5 #1247

Merged
merged 2 commits into from
Nov 26, 2024

Conversation

florian-sanders-cc
Copy link
Contributor

@florian-sanders-cc florian-sanders-cc commented Nov 20, 2024

What does this PR do?

  • Upgrades Storybook to 8.4.5
  • Adapts to the Storybook bug introduced recently:
    • we used to rely on staticDirs to copy CSS files from node_modules to a public styles directory,
    • this was necessary because docs pages needed CSS from some npm packages (github-markdown for the converted markdown global styling & highlight for <pre> & <code> content),
    • the staticDirs was actually not supposed to work for this usecase because it was supposed to only handle directories and not files (see #29576),
    • it turns out you only need to import your css files in .storybook/preview.js and the builder will:
      • process / optimize the CSS file,
      • generate the proper <link rel="stylesheet"> tag in the Story iframe HTML.

How to review?

  • Check random storybook pages from the preview (try to check at least 1 doc, 1 component story, etc.),
  • Do the same running storybook locally,
  • 1 reviewer should be enough.

@florian-sanders-cc florian-sanders-cc self-assigned this Nov 20, 2024
Copy link
Contributor

🔎 A preview has been automatically published : https://clever-components-preview.cellar-c2.services.clever-cloud.com/storybook/upgrade-to-8.4.4/index.html.

This preview will be deleted once this PR is closed.

Copy link
Contributor

@pdesoyres-cc pdesoyres-cc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked the code and have nothing to say about it apart from the fact that I like the removal of the hack around CSS.

I tested several docs and stories and I didn't see anything broken

I just noticed a little mistake: the commit is talking about an upgrade to version 8.4.4 instead of 8.4.5.

Apart from that, LGTM. Well done Florian

@florian-sanders-cc florian-sanders-cc merged commit f942944 into master Nov 26, 2024
4 checks passed
@florian-sanders-cc florian-sanders-cc deleted the storybook/upgrade-to-8.4.4 branch November 26, 2024 16:33
Copy link
Contributor

🔎 The preview has been automatically deleted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants