📕 Storybook for everyone (take 2)#43529
Merged
streamich merged 75 commits intoelastic:masterfrom Jan 15, 2020
streamich:storybook-2
Merged
📕 Storybook for everyone (take 2)#43529streamich merged 75 commits intoelastic:masterfrom streamich:storybook-2
streamich merged 75 commits intoelastic:masterfrom
streamich:storybook-2
Conversation
2 tasks
Contributor
|
Might want to take a look at #44511 ... I added a number of helpful flags to our script. |
spalger
approved these changes
Jan 13, 2020
clintandrewhall
approved these changes
Jan 13, 2020
Contributor
clintandrewhall
left a comment
There was a problem hiding this comment.
Approving to unblock... most of the changes look good. I'll likely revisit the EuiPopoverAny, but could you please address the ticks in color_manager?
x-pack/legacy/plugins/canvas/public/components/color_manager/color_manager.tsx
Outdated
Show resolved
Hide resolved
Contributor
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
Contributor
Author
|
Merging without the rest of the |
smith
added a commit
to smith/kibana
that referenced
this pull request
Jan 15, 2020
Add Storybook with help from changes in elastic#43529. We still need to do some work around having mocks for hooks and HTTP requests but the basics are there.
streamich
added a commit
that referenced
this pull request
Jan 16, 2020
* 📕 Storybook for everyone (take 2) (#43529) * chore: 🤖 add Infra sample Storybook story * chore: 🤖 add @kbn/storybook package * chore: 🤖 add sample SIEM stories * chore: 🤖 add Canvas new Storybook config * fix: 🐛 fix TypeScript errors * chore: 🤖 add @kbn/babel-preset to package.json * chore: 🤖 move dependencies to devDependencies * chore: 🤖 make Storybook dependencies non-dev * chore: 🤖 upgrade Storybook dependencies * chore: 🤖 add packages to webpack * fix: 🐛 fix TypeScript type check * chore: 🤖 disable ESLint warnings * chore: 🤖 remove Storybook info plugin * chore: 🤖 upate yarn.lock * chore: 🤖 add Storbook to Embeddables * feat: 🎸 add --clean flag to Storybook CLI * coalesce yarn.lock versions * update kbn/pm dist * This reverts commit 97d8ff9 and 49b07cd. * chore: 🤖 use fs instead of mkdirp * chore: 🤖 use debug for message logging * chore: 🤖 update yarn.lock * feat: 🎸 add link to kbn-storybook package * docs: ✏️ add Storybook readme * chore: 🤖 remove packages that failed DLL build * style: 💄 add ESLint comma * chore: 🤖 apply changes from #52209 * fix: 🐛 make Canvas Storybook build again * chore: 🤖 move Canvas stories to global Storybook * chore: 🤖 move more Canvas components to global Storybook * chore: 🤖 move more Canvas stories to global Storybook * chore: 🤖 move <ItemGrid> and <KeyboardShortcutsDoc> to NP SB * chore: 🤖 move shape picker Canvas stories to global Storybook * chore: 🤖 move Canvas sidebar stories to global Storybook * fix: 🐛 split imports to not import path.resolve in Storybook * chore: 🤖 move tag and PDF panel Canvas stories to global SB * chore: 🤖 move Canvas share website flyout stories to global SB * fix: 🐛 clean up <ShareWebsiteFlyout> imports * chore: 🤖 add back Canvas withInfo decorator * chore: 🤖 look for Canvas stories everywhere in /canvas folder * test: 💍 mock correct files in Storyshots * test: 💍 update Canvas Storyshot snapshots * chore: 🤖 move more Canvas components to global Storybook * chore: 🤖 move more Canvas components to global Storybook * test: 💍 update Canvas Storyshots * chore: 🤖 rebuild @kbn/pm * chore: 🤖 refresh @kbn/pm dist/index.js artifact * chore: 🤖 update yarn.lock * chore: 🤖 update @kbn/pm artifact * feat: 🎸 address review comments * fix: 🐛 remove circular import * chore: 🤖 update yarn.lock * test: 💍 disable a test suite * test: 💍 update Canvas storyshots * chore: 🤖 remvoe build step from @kbn/storybook * chore: 🤖 enable disabled functional test suite Co-authored-by: Spencer <email@spalger.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> * chore: 🤖 update yarn.lock Co-authored-by: Spencer <email@spalger.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
smith
added a commit
that referenced
this pull request
Jan 16, 2020
Add Storybook with help from changes in #43529. We still need to do some work around having mocks for hooks and HTTP requests but the basics are there.
jkelastic
pushed a commit
to jkelastic/kibana
that referenced
this pull request
Jan 17, 2020
* chore: 🤖 add Infra sample Storybook story * chore: 🤖 add @kbn/storybook package * chore: 🤖 add sample SIEM stories * chore: 🤖 add Canvas new Storybook config * fix: 🐛 fix TypeScript errors * chore: 🤖 add @kbn/babel-preset to package.json * chore: 🤖 move dependencies to devDependencies * chore: 🤖 make Storybook dependencies non-dev * chore: 🤖 upgrade Storybook dependencies * chore: 🤖 add packages to webpack * fix: 🐛 fix TypeScript type check * chore: 🤖 disable ESLint warnings * chore: 🤖 remove Storybook info plugin * chore: 🤖 upate yarn.lock * chore: 🤖 add Storbook to Embeddables * feat: 🎸 add --clean flag to Storybook CLI * coalesce yarn.lock versions * update kbn/pm dist * This reverts commit 97d8ff9 and 49b07cd. * chore: 🤖 use fs instead of mkdirp * chore: 🤖 use debug for message logging * chore: 🤖 update yarn.lock * feat: 🎸 add link to kbn-storybook package * docs: ✏️ add Storybook readme * chore: 🤖 remove packages that failed DLL build * style: 💄 add ESLint comma * chore: 🤖 apply changes from elastic#52209 * fix: 🐛 make Canvas Storybook build again * chore: 🤖 move Canvas stories to global Storybook * chore: 🤖 move more Canvas components to global Storybook * chore: 🤖 move more Canvas stories to global Storybook * chore: 🤖 move <ItemGrid> and <KeyboardShortcutsDoc> to NP SB * chore: 🤖 move shape picker Canvas stories to global Storybook * chore: 🤖 move Canvas sidebar stories to global Storybook * fix: 🐛 split imports to not import path.resolve in Storybook * chore: 🤖 move tag and PDF panel Canvas stories to global SB * chore: 🤖 move Canvas share website flyout stories to global SB * fix: 🐛 clean up <ShareWebsiteFlyout> imports * chore: 🤖 add back Canvas withInfo decorator * chore: 🤖 look for Canvas stories everywhere in /canvas folder * test: 💍 mock correct files in Storyshots * test: 💍 update Canvas Storyshot snapshots * chore: 🤖 move more Canvas components to global Storybook * chore: 🤖 move more Canvas components to global Storybook * test: 💍 update Canvas Storyshots * chore: 🤖 rebuild @kbn/pm * chore: 🤖 refresh @kbn/pm dist/index.js artifact * chore: 🤖 update yarn.lock * chore: 🤖 update @kbn/pm artifact * feat: 🎸 address review comments * fix: 🐛 remove circular import * chore: 🤖 update yarn.lock * test: 💍 disable a test suite * test: 💍 update Canvas storyshots * chore: 🤖 remvoe build step from @kbn/storybook * chore: 🤖 enable disabled functional test suite Co-authored-by: Spencer <email@spalger.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
jkelastic
pushed a commit
to jkelastic/kibana
that referenced
this pull request
Jan 17, 2020
Add Storybook with help from changes in elastic#43529. We still need to do some work around having mocks for hooks and HTTP requests but the basics are there.
smith
added a commit
to smith/kibana
that referenced
this pull request
Jan 30, 2020
Add Storybook with help from changes in elastic#43529. We still need to do some work around having mocks for hooks and HTTP requests but the basics are there.
smith
added a commit
that referenced
this pull request
Jan 31, 2020
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
embeddable,siem, andinfraplugins.node x-pack/legacy/plugins/canvas/scripts/storybook).See instructions:
Run
embeddablestories:Run
siemstories:Run
infrastories:Run
canvasstories:Canvas
We agreed that I would split Canvas stories in two: (1) the ones that can be run in new global Storybook; (2) and the ones that currently run only in the Canvas local one.
I went through all Canvas Storybook stories and was able to run the below 35 stories in the global Storybook. I changed their extension to
.stories, so they now can be loaded withyarn storybook canvas. The internal Canvas Storybook will also load them, I changed it to support both extensions:.examplesand.stories. For some of these stories to work in global Storybook I had to do small changes to imports and TypeScript types./public/components/file_upload/file_upload.stories.tsx/public/components/font_picker/font_picker.stories.tsx/public/components/color_dot/__examples__/color_dot.stories.tsx/public/components/color_manager/__examples__/color_manager.stories.tsx/public/components/color_palette/__examples__/color_palette.stories.tsx/public/components/color_picker/__examples__/color_picker.stories.tsx/public/components/color_picker_popover/__examples__/color_picker_popover.stories.tsx/public/components/element_card/__examples__/element_card.stories.tsx/public/components/element_types/__examples__/element_controls.stories.tsx/public/components/element_types/__examples__/element_grid.stories.tsx/public/components/item_grid/__examples__/item_grid.stories.tsx/public/components/keyboard_shortcuts_doc/__examples__/keyboard_shortcuts_doc.stories.tsx/public/components/shape_picker/__examples__/shape_picker.stories.tsx/public/components/shape_preview/__examples__/shape_preview.stories.tsx/public/components/shape_picker_popover/__examples__/shape_picker_popover.stories.tsx/public/components/sidebar/__examples__/group_settings.stories.tsx/public/components/sidebar/__examples__/multi_element_settings.stories.tsx/public/components/sidebar_header/__examples__/sidebar_header.stories.tsx/public/components/tag/__examples__/tag.stories.tsx/public/components/tag_list/__examples__/tag_list.stories.tsx/public/components/tool_tip_shortcut/__examples__/tool_tip_shortcut.stories.tsx/public/components/workpad_header/workpad_export/__examples__/disabled_panel.stories.tsx/public/components/workpad_header/workpad_export/__examples__/pdf_panel.stories.tsx/public/components/workpad_header/workpad_export/flyout/__examples__/share_website_flyout.stories.tsx/canvas_plugin_src/renderers/time_filter/components/datetime_range_absolute/__examples__/datetime_range_absolute.stories.tsx/canvas_plugin_src/renderers/time_filter/components/datetime_calendar/__examples__/datetime_calendar.stories.tsx/canvas_plugin_src/renderers/time_filter/components/datetime_quick_list/__examples__/datetime_quick_list.stories.tsx/canvas_plugin_src/renderers/time_filter/components/datetime_input/__examples__/datetime_input.stories.tsx/canvas_plugin_src/renderers/time_filter/components/time_picker/__examples__/time_picker.stories.tsx/canvas_plugin_src/renderers/time_filter/components/pretty_duration/__examples__/pretty_duration.stories.tsx/canvas_plugin_src/renderers/metric/component/__examples__/metric.stories.tsx/canvas_plugin_src/uis/arguments/axis_config/__examples__/extended_template.stories.tsx/canvas_plugin_src/uis/arguments/axis_config/__examples__/simple_template.stories.tsx/canvas_plugin_src/uis/arguments/date_format/__examples__/date_format.stories.tsx/canvas_plugin_src/uis/arguments/number_format/__examples__/number_format.stories.tsxThese remaining stories below would throw an error in global Storybook as they are using some state or some import from
ui/public. Likely that not just the stories, but also the components themselves need some adjustment before they can be migrated to the New Platfrom and global Storybook:/public/components/asset_manager/__examples__/asset.examples.tsx/public/components/asset_manager/__examples__/asset_manager.examples.tsx/public/components/custom_element_modal/__examples__/custom_element_modal.examples.tsx/public/components/expression_input/__examples__/expression_input.examples.tsx/public/components/workpad_header/workpad_export/__examples__/workpad_export.examples.tsx/public/canvas_plugin_src/renderers/time_filter/components/time_filter/__examples__/time_filter.examples.tsx/shareable_runtime/components/__examples__/canvas.examples.tsx/shareable_runtime/components/__examples__/page.examples.tsx/shareable_runtime/components/__examples__/rendered_element.examples.tsx/shareable_runtime/components/footer/__examples__/page_controls.examples.tsx/shareable_runtime/components/footer/__examples__/footer.examples.tsx/shareable_runtime/components/footer/__examples__/scrubber.examples.tsx/shareable_runtime/components/footer/__examples__/title.examples.tsx/shareable_runtime/components/footer/settings/__examples__/autoplay_settings.examples.tsx/shareable_runtime/components/footer/settings/__examples__/settings.examples.tsx/shareable_runtime/components/footer/settings/__examples__/toolbar_settings.examples.tsx/canvas_plugin_src/renderers/advanced_filter/component/__examples__/advanced_filter.examples.tsx/canvas_plugin_src/renderers/dropdown_filter/component/__examples__/dropdown_filter.examples.tsx/canvas_plugin_src/renderers/time_filter/components/time_picker_popover/__examples__/time_picker_popover.examples.tsx/public/expression_types/arg_types/container_style/__examples__/simple_template.examples.tsx/public/expression_types/arg_types/container_style/__examples__/extended_template.examples.tsx/public/expression_types/arg_types/series_style/__examples__/extended_template.examples.tsx/public/expression_types/arg_types/series_style/__examples__/simple_template.examples.tsxCloses #37102