-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
test(storybook): fix component stories #29245
test(storybook): fix component stories #29245
Conversation
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.
Fantastic, thanks for digging in here! I'll pull/test as soon as I'm able. |
@@ -87,6 +87,7 @@ InteractiveAlert.args = { | |||
InteractiveAlert.argTypes = { | |||
onClose: { action: 'onClose' }, | |||
type: { | |||
control: { type: 'select', options: types }, | |||
control: { type: 'select' }, | |||
options: types, |
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.
This one modifies the "type" control, i think it should be working.
superset-frontend/src/components/AsyncAceEditor/AsyncAceEditor.stories.tsx
Show resolved
Hide resolved
superset-frontend/src/components/AsyncAceEditor/AsyncAceEditor.stories.tsx
Show resolved
Hide resolved
@@ -59,7 +59,8 @@ InteractiveDropdownButton.args = { | |||
InteractiveDropdownButton.argTypes = { | |||
placement: { | |||
defaultValue: 'top', | |||
control: { type: 'select', options: PLACEMENTS }, | |||
control: { type: 'select' }, | |||
options: PLACEMENTS, |
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.
Probably works great, but this thing totally crashes, as it expects to receive only a single child element.
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.
I don't see any changes but no crashes either, weird.
}, | ||
optionType: { | ||
defaultValue: 'default', | ||
control: { type: 'radio', options: ['default', 'button'] }, | ||
control: { type: 'radio' }, | ||
options: ['default', '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.
THese controls LOOK fine, but the story bombs out with an error of
"Cannot read properties of undefined (reading 'find')"
Note that I know none of this is your fault. We kind of forced the Storybook upgrade through, and it had a lot of unexpected fallout like this.
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.
Thanks for all of this. There are still issues with some of these stories and controls, but I know you're inheriting those problems. I think these improvements look good to me, but I'll leave the PR up in case you want to make further enhancements.
Thank you for the review and kind words. If we can merge this it would be great, if the problems are with stories and not component themselves i can open specific PR's for that. For now i think having working controls in storybook improves its usefullness. |
test(storybook): Fix component story controls
SUMMARY
Storybook controls for some components were not working. This pr aims to fix that.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION