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

Simorgh - Storybook Upgrade #9207

Merged
merged 11 commits into from
Jul 7, 2021
Merged

Simorgh - Storybook Upgrade #9207

merged 11 commits into from
Jul 7, 2021

Conversation

ryanmccombe
Copy link
Contributor

@ryanmccombe ryanmccombe commented Jun 29, 2021

Part of #9198

Overall change:
Upgrade to latest version of Storybook.

Code changes:

  • Add the a11y plugin and viewport plugin to package.json - we seem to be trying to use these in the storybook config, but they were never installed, so this never worked. This PR now correctly shows the "A11y" tab in storybook.
  • Install addon-controls - the replacement for addon-knobs.
  • _Install addon-docs - we appear to be trying to use addon-notes in some stories to populate the docs tab with the contents of a markdown file - eg
    import notes from './README.md';
    , but the plugin is never installed or added to the config, so this never worked. add-on notes is now stale - addon-docs seems preferred

  • I have assigned myself to this PR and the corresponding issues
  • I have added the cross-team label to this PR if it requires visibility across World Service teams
  • I have assigned this PR to the Simorgh project
  • (BBC contributors only) This PR follows the repository use guidelines

Testing:

  • Automated (jest and/or cypress) tests added (for new features) or updated (for existing features)
  • If necessary, I have run the local E2E non-smoke tests relevant to my changes (CYPRESS_APP_ENV=local CYPRESS_SMOKE=false yarn test:e2e:interactive)
  • This PR requires manual testing

@ryanmccombe ryanmccombe marked this pull request as ready for review June 29, 2021 12:27
@ryanmccombe ryanmccombe self-assigned this Jun 29, 2021
@ryanmccombe ryanmccombe changed the title Storybook upgrade Storybook Upgrade Jun 29, 2021
@ryanmccombe ryanmccombe changed the title Storybook Upgrade Simorgh - Storybook Upgrade Jun 29, 2021
@ryanmccombe ryanmccombe mentioned this pull request Jun 29, 2021
6 tasks
Copy link
Contributor

@HarveyPeachey HarveyPeachey left a comment

Choose a reason for hiding this comment

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

Nice catch on the plugin fixes!

package.json Outdated
"@storybook/addon-knobs": "6.2.9",
"@storybook/addon-viewport": "6.3.1",
"@storybook/react": "6.2.9",
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this need to be changed to 6.3.1? When I checkout the branch and run yarn and then yarn run storybook, I get a notification in the terminal saying A new version (6.3.1) is available!

Copy link
Contributor

@HarryVerhoef HarryVerhoef left a comment

Choose a reason for hiding this comment

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

Nice one 🚀 I think they've just released 6.3.2 so may be worth bumping again, but I'm sure 6.3.1 is fine too

Copy link
Contributor

@andrewscfc andrewscfc left a comment

Choose a reason for hiding this comment

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

Thanks for doing this upgrade 👍

So to make sure I understand we updating to the latest stable version of Storybook 6 to solve security problems?

I thought we were going to upgrade to a Storybook 7 rc to get around the emotion support problems too? Looks like that isn't finished though judging by this issue: storybookjs/storybook#13491

"web-vitals": "1.1.1",
"ws": "7.4.6",
"trim-newlines": "3.0.1",
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess these are the various pinned dependencies we had to avoid security issues that are no longer needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep :)

@ryanmccombe
Copy link
Contributor Author

So to make sure I understand we updating to the latest stable version of Storybook 6 to solve security problems?

Storybook 6.3 was the RC version at the time we had that call - it is now stable. I don't think a 7.0 RC is available yet, unless I'm missing something - https://www.npmjs.com/package/@storybook/react

@ryanmccombe
Copy link
Contributor Author

This does seem to have caused 2 stories to stop working - the next PR is a rewrite of all stories, however, so will see if this is still an issue then. Confirmed the components still work, so the problem is restricted to storybook

@ryanmccombe ryanmccombe merged commit 541c1cd into latest Jul 7, 2021
@Louis-Matsika Louis-Matsika deleted the storybook-upgrade branch December 22, 2021 12:51
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.

4 participants