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

docs: upgrade storybook to v7 #995

Merged
merged 2 commits into from
Nov 29, 2023

Conversation

petermakowski
Copy link
Contributor

@petermakowski petermakowski commented Nov 9, 2023

Done

QA

Storybook

To see rendered examples of all react-components, run:

yarn start

QA in your project

from react-components run:

yarn build
npm pack

Install the resulting tarball in your project with:

yarn add <path-to-tarball>

QA steps

  • Run yarn docs locally and verify docs are displayed correctly

Fixes

Fixes: # .

Screenshots

Google Chrome screenshot 001089@2x

@webteam-app
Copy link

Demo starting at https://react-components-995.demos.haus

@petermakowski petermakowski changed the title docs: upgrade storybook to v7 docs: upgrade storybook to v7 WIP Nov 9, 2023
@petermakowski petermakowski force-pushed the upgrade-storybook branch 3 times, most recently from 5be9897 to f32006b Compare November 10, 2023 08:10
package.json Show resolved Hide resolved
@petermakowski petermakowski force-pushed the upgrade-storybook branch 5 times, most recently from ce52a2a to 08befd9 Compare November 10, 2023 09:14
@petermakowski
Copy link
Contributor Author

All issues have been resolved and this is ready for review now @bartaz

@petermakowski petermakowski changed the title docs: upgrade storybook to v7 WIP docs: upgrade storybook to v7 Nov 10, 2023
@bartaz
Copy link
Member

bartaz commented Nov 10, 2023

There seem to be some breaking changes in the styling that percy surfaces:
https://percy.io/bb49709b/react-components/builds/31116305/

Looks like paragraphs are rendered inside some components from Storybook? Is this some weird way of applying markdown?

image

@bartaz
Copy link
Member

bartaz commented Nov 10, 2023

Seems like this may be caused by this bug: storybookjs/storybook#18921
There are some workarounds mentioned in the comments.

@petermakowski
Copy link
Contributor Author

Seems like this may be caused by this bug: storybookjs/storybook#18921 There are some workarounds mentioned in the comments.

@bartaz This seems to be correct as in mdx files each new line produces a new paragraph. I'll update this PR to conform with mdx interleaving rule https://mdxjs.com/docs/what-is-mdx/#interleaving

Long term solution for this would be to move over to the new CSF story format https://storybook.js.org/docs/react/api/csf

@petermakowski
Copy link
Contributor Author

@bartaz I fixed the failing stories manually and created an issue to follow this up and use the latest storybook story format: #1001

@petermakowski
Copy link
Contributor Author

Seems that defaultValue has been deprecated the in latest storybook as well, I had to make more changes to fix components docs that weren't displayed with intended values. https://storybook.js.org/docs/react/api/arg-types#defaultvalue

@petermakowski petermakowski force-pushed the upgrade-storybook branch 2 times, most recently from 4c6a0c5 to b45900f Compare November 23, 2023 08:40
@petermakowski petermakowski requested a review from edlerd November 27, 2023 07:28
renovate.json Outdated Show resolved Hide resolved
Copy link
Member

@bartaz bartaz left a comment

Choose a reason for hiding this comment

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

That's great! Couple clarifying questions in comments but nothing blocking.

Copy link
Contributor

@edlerd edlerd left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you for keeping the version up to date and fixing all the doc files to be compatible.

@petermakowski petermakowski merged commit a98449e into canonical:main Nov 29, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants