-
Notifications
You must be signed in to change notification settings - Fork 140
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(Calendar): Story を見直し #5097
base: master
Are you sure you want to change the base?
Conversation
commit: |
to={args.to ? dayjs(args.to).toDate() : undefined} | ||
onSelectDate={args.onSelectDate} | ||
/> | ||
), |
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.
ここ、コメントの通りなんですが、argTypes
を指定しないと Playground がクラッシュするし、指定すると Date でなく UnixTime (number) が入ってくる仕様みたいなので、なくなく描画時に Date に変換するようにしてます。
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.
focusVisible: ['button'], | ||
}, | ||
}, | ||
} |
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.
VRT と VRTFocusVisible を一つにまとめたかったんですが、 play 関数でカレンダーのうち一つを年選択に切り替えるのと、focusVisible を適用する設定が衝突して描画結果が安定しないことがあるので分離してます。
}, | ||
chromatic: { forcedColors: 'active' }, | ||
}, | ||
} |
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.
ついでに |
あ、Calendar って単体で提供されてるんだって驚きつつ Storybook 対応してましたけど、やっぱ DatePicker とセットで使う前提な感じなんですかね。であれば非公開コンポーネントにしちゃっても良さそうですねー。 |
DatePicker のために存在してるので非公開の対応もお願いします! |
@uknmr 非公開コンポーネントに変更してディレクトリ移動もしてみました! |
packages/smarthr-ui/src/index.ts
Outdated
@@ -63,7 +63,6 @@ export { InformationPanel } from './components/InformationPanel' | |||
export { Tooltip } from './components/Tooltip' | |||
export { BottomFixedArea } from './components/BottomFixedArea' | |||
export { ErrorScreen, MessageScreen } from './components/ErrorScreen' | |||
export { Calendar } from './components/Calendar' |
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.
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.
まさか使ってるプロダクトがあるとは……!(sasaki さんごめんなさい🙏
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.
あれ…。Stats で利用0を確認したんですが、漏れるときは漏れるのか…。
https://github.com/kufu/smarthr-ui-stats
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.
そもそも Stats にこのプロダクトが反映されてないだけでした…。
というのもあるので今後はちゃんとコード検索します!
関連URL
https://smarthr.atlassian.net/browse/SHRUI-1104
概要
変更内容
確認方法
Storybook や Chromatic で確認してください。