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

feat: migrate storybook to use args #443

Merged
merged 5 commits into from
Jul 5, 2021

Conversation

knokmki612
Copy link

#255 (comment) への対応です

@vercel
Copy link

vercel bot commented Jun 22, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/ties-makimura/chibi-ch-i-lo/9MN5s8MwhcPF3W4ewe1ujTUNnwMF
✅ Preview: https://chibi-ch-i-lo-git-feat-migrate-storybook-t-839416-ties-makimura.vercel.app

@knokmki612
Copy link
Author

優先度設定を経ずに着手したこのプルリクエストですが、移行の対象である箇所をそのままにしても問題なく動作する(新規と既存の共存は可能)ので、この時点でレビューとマージにすすめるのでいかがでしょう? @horimasumi

現状機能追加にあわせてリファクタリングしていることがあるので、このプルリクエストの移行作業に当たるものも同じようにすすめればよいかと思いまして

@knokmki612
Copy link
Author

@knokmki612 knokmki612 marked this pull request as ready for review July 5, 2021 07:24
@knokmki612
Copy link
Author

コンフリクト解消直後の状態だとなぜかstorybookが正常に機能しなかった(真っ白な画面が表示される)ので、 npx sb@latest upgrade によってstorybookのバージョンを更新&依存関係更新をして正常に機能することを確認しました

Copy link

@kou029w kou029w left a comment

Choose a reason for hiding this comment

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

より便利になって良さそうに感じます 👍

Comment on lines 47 to 51
export const Linked = Template.bind({});
Linked.args = {
...Default.args,
onBookLinkClick: undefined,
linked: true,
Copy link

Choose a reason for hiding this comment

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

Controlsによって引数が表示され操作できるようになっているためLinkedのようなストーリーは省いても良いようになったかもしれませんね。もちろんこのままでも良いです。ご判断にお任せします。

Copy link
Author

Choose a reason for hiding this comment

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

Controlsによって引数が表示され操作できるようになっている

たしかにlinkedについてはControlsでの切り替えで期待した表示になっており、わざわざ専用のstoryを用意する必要はなさそうですね!

image

NoEditableについても、BookPreviewの実装としてはonBookEditハンドラーが渡されているかどうかで表示が変わりますが、今回の変更でハンドラーが必ず渡されるようになった?からか、期待した表示にならない(編集ボタンが表示され続ける)ようです

不要なstoryを取り除く変更をしたいとおもいます

@knokmki612 knokmki612 merged commit 0775b7f into master Jul 5, 2021
@knokmki612 knokmki612 deleted the feat-migrate-storybook-to-use-args branch July 5, 2021 08:31
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