-
Notifications
You must be signed in to change notification settings - Fork 48
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
Bump @storybook/react
to ^7.4.2
#1656
Bump @storybook/react
to ^7.4.2
#1656
Conversation
|
Chromatic Report🚀 Congratulations! Your build was successful! |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1656 +/- ##
=======================================
Coverage 87.16% 87.16%
=======================================
Files 281 281
Lines 3904 3904
Branches 822 822
=======================================
Hits 3403 3403
Misses 426 426
Partials 75 75 ☔ View full report in Codecov by Sentry. |
65678a5
to
6c17064
Compare
@@ -54,10 +57,11 @@ const Template: StoryFn<typeof AlphaStack> = (args) => ( | |||
</AlphaStack> | |||
) | |||
|
|||
export const Primary: StoryObj<typeof AlphaStack> = { | |||
export const Primary: Story = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://storybook.js.org/blog/improved-type-safety-in-storybook-7/?ref=storybookblog.ghost.io 에 의하면 satiesfies 를 도입하여 강타입으로 스토리를 선언할 수 있어서 런타임 에러 방지가 가능하다고 합니다. 다만 이미 작성된 스토리를 마이그레이션하더라도 유의미한 차이는 없을 것 같아 굳이 모두 바꾸지는 않았습니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export default { | ||
title: '~/src/foundation/Typography', | ||
const meta: Meta = { | ||
title: 'Foundation/Typography', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e5367af
to
17f154c
Compare
component: TabsComposition, | ||
subcomponents: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
subcomponents 필드가 버전7에서 deprecated되었다고 합니다. 여기서 제안하는 ArgsTable 을 사용하는 것을 고민중입니다. -> 시도해보았으나 안되네요 😢
@@ -87,7 +58,7 @@ const innerWrapperStyle = { | |||
borderRadius: 20, | |||
} | |||
|
|||
function withFoundationProvider(Story, context) { | |||
export function WithFoundationProvider(Story, context) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WithFoundationProvider.jsx 를 tsx 로 변경하려면 tsconfig.include 에 파일을 포함시키고 rootDir를 '.' 로 해야되는데, 그러면 타입 빌드 결과가 달라지게 되서 jsx 그대로 두었습니다
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
복잡한 설정 없이 타이핑 이점을 누리기 위해서 아예 preview.ts 내부로 옮기는 건 어떤가요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
혹시 src/
폴더를 의미하신 걸까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.storybook/preview.ts
에요. 해당 파일안에 직접 작성하면 컴파일하지 않아도 괜찮지 않을까? 싶었습니다
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
7f884bc
to
1469a96
Compare
'../src/stories/Intro.stories.mdx', | ||
'../src/**/*.stories.(tsx|mdx)', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'../src/stories/Intro.stories.mdx'
없이도 동일한 동작일 거 같아요
webpackFinal: async (config) => { | ||
config.resolve = { | ||
...config.resolve, | ||
// Apply tsconfig alias path | ||
plugins: [ | ||
...(config?.resolve?.plugins ?? []), | ||
new TsconfigPathsPlugin({}), | ||
], | ||
extensions: [ | ||
...(config.resolve?.extensions ?? []), | ||
'.ts', | ||
'.tsx', | ||
] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
중요하진 않지만, 나중에 Vite로 마이그레이션도 해볼만할 거 같아요.
} | ||
} | ||
|
||
export default config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
newline
.changeset/long-walls-count.md
Outdated
--- | ||
"@channel.io/bezier-react": minor | ||
--- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
버전 업은 하지 않아도 괜찮지 않을까요? 라이브러리를 사용하는 입장에서는 기능 추가 등의 변화가 있는 것도 아니고, 내부 컴포넌트 구현이 변경된 것도 아니라서 버전을 올리지 않아도 될 거 같아요.
@@ -87,7 +58,7 @@ const innerWrapperStyle = { | |||
borderRadius: 20, | |||
} | |||
|
|||
function withFoundationProvider(Story, context) { | |||
export function WithFoundationProvider(Story, context) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
복잡한 설정 없이 타이핑 이점을 누리기 위해서 아예 preview.ts 내부로 옮기는 건 어떤가요?
- with `npx storybook@latest upgrade` command
- npx storybook@next migrate csf-2-to-3 --glob="**/*.stories.tsx"
…d is deprecated in storybook v7
This reverts commit 156f7cf.
1469a96
to
4dad50d
Compare
Self Checklist
Related Issue
Fixes #1255
Summary
Details
버전 업에 따른 변경 사항은 다음과 같습니다.
main
파일 마이그레이션 (codemod 사용), ts 마이그레이션하여 스토리북에서 제공하는 타입 활용 (#).preview
파일도 themeProvider 분리하고 ts 마이그레이션getTitle
유틸을 활용해서component/.../lastFolderName
형식으로 타이틀 얻어오던 것을 제거. 스토리북 7버전 부터는 동적으로 타이틀을 계산하는 것을 허용하지 않고 있고, 명시적으로 지정하지 않으면 알아서 경로를 잘 보여주게 됩니다. (#)control
의option
필드가control
아래에 있었던 것을 하나 올려서 같은 depth 가 되도록 변경 (#)이후 pr 에서 아래 이슈들을 차례대로 다루면 될 것 같습니다.
#1083
#1000
Breaking change? (Yes/No)
References