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

Feature/upgrade storybook #37

Merged
merged 4 commits into from
Jun 10, 2024
Merged

Feature/upgrade storybook #37

merged 4 commits into from
Jun 10, 2024

Conversation

r3dDoX
Copy link
Member

@r3dDoX r3dDoX commented Jun 9, 2024

Had some time over the weekend to upgrade storybook

@r3dDoX r3dDoX requested review from culas and Cybertron01Z June 9, 2024 20:19
@@ -4,7 +4,7 @@ import turbosnap from 'vite-plugin-turbosnap';
import { StorybookConfig } from '@storybook/web-components-vite';

const config: StorybookConfig = {
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
Copy link
Member Author

Choose a reason for hiding this comment

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

That was an automatic Storybook migration.

@@ -50,16 +49,31 @@ properties.

## Typography

<Canvas>
Copy link
Member Author

Choose a reason for hiding this comment

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

Canvas now always has to reference a story, but creating a Typeface story will also show the story in the sidebar. The Typedef Storyblock does not handle the fonts as we used to show it so I set up a little structure that shows the typefaces nicely
Screenshot 2024-06-09 at 22 23 09

@@ -84,7 +98,7 @@ properties.
return numberA - numberB;
})
.map(([, token], index) => (
<React.Fragment key={index}>
<div key={index} style={{display: 'contents'}}>
Copy link
Member Author

Choose a reason for hiding this comment

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

React has been removed as a peer dependency of Storbook, so since we only use it here, we can remove it and use the display: contents to have HTML Elements that don't interfere with the CSS Grid

@@ -28,7 +28,8 @@
"test": "vitest run --reporter=verbose --reporter=junit --coverage",
"test:watch": "vitest",
"design-tokens:generate": "node ./tokens/style-dictionary.cjs",
"icons:generate": "node src/components/icon/generate-icon-types.js"
"icons:generate": "node src/components/icon/generate-icon-types.js",
"chromatic": "VITE_IS_CHROMATIC=true chromatic"
Copy link
Member Author

Choose a reason for hiding this comment

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

turns out I forgot to add this script in the last PR that actually makes sure, chromatic has the proper ENV var passed during build

Copy link
Collaborator

@Cybertron01Z Cybertron01Z left a comment

Choose a reason for hiding this comment

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

lgtm

@r3dDoX r3dDoX merged commit e7d8147 into main Jun 10, 2024
3 checks passed
@r3dDoX r3dDoX deleted the feature/upgrade-storybook branch June 10, 2024 07:02
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