-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Canvas] Storybook Redux Addon #73227
[Canvas] Storybook Redux Addon #73227
Conversation
Pinging @elastic/kibana-canvas (Team:Canvas) |
@elasticmachine merge upstream |
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.
The move to decorators for storybooks LGTM. I'm struggling to compare the rewritten webpack config but I'm assuming that what you have works which means it's not a problem. That said, I do recommend updating it to use webpack-merge
vs a bunch of single-word variables.
@spalger I'll use |
@elasticmachine merge upstream |
merge conflict between base and head |
@elasticmachine merge upstream |
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 is awesome!
💚 Build SucceededBuild metricsasync chunks size
page load bundle size
History
To update your PR or re-run it, just comment with: |
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> # Conflicts: # x-pack/plugins/canvas/storybook/decorators/router_decorator.tsx
* master: (39 commits) [Canvas][tech-debt] Rename __examples__ to __stories__ (elastic#73853) [Canvas] Storybook Redux Addon (elastic#73227) Use "Apply_filter_trigger" in "explore underlying data" action (elastic#71445) [maps] convert top nav config to TS (elastic#73851) [maps] fix fit to bounds for ES document layers with joins (elastic#73985) [Canvas][tech-debt] Refactor Toolbar (completes Kill Recompose.pure) (elastic#73309) [CI] In-progress Slack notifications (elastic#74012) [SIEM][Detection Engine] Fixes tags to accept characters such as AND, OR, (, ), ", * (elastic#74003) [SECURITY_SOLUTION][ENDPOINT] Fix host list Configuration Status cell link loosing list page/size state (elastic#73989) Tweak injected metadata (elastic#73990) Closes elastic#73998 by using `canAccessML` in the ML capabilities API to (elastic#73999) [SIEM] Fixes toaster errors when siemDefault index is an empty or empty spaces (elastic#73991) [Security Solution] Fix timeline pin event callback (elastic#73981) [Security Solution] Fix unexpected redirect (elastic#73969) [Metrics UI] Fix Metrics Explorer TSVB link to use workaround pattern (elastic#73986) [APM] docs: Update machine learning integration (elastic#73597) [Ingest Manager] Fix limited concurrency helper (elastic#73976) [build/sysv] fix missing env variable rename (elastic#73977) Fix a typo. (elastic#73948) [Ingest Manager] Revert fleet config concurrency rollout to rate limit (elastic#73940) ...
Summary
This PR is something I've been excited about for weeks, and now that its dependencies are committed, I can finally create it: a Redux store and inspector for Canvas Storybook!
What is this?
This addon provides a decorator that will surround a component with a custom Redux provider, one that logs the store changes to an Addon Panel in Storybook. This means:
How do I use it?
In your story definition:
The
reduxDecorator
can (currently) accept three state settings:workpad
: an entire workpadelements
: custom elements for the workpadassets
: compatible assetsFeel free to contribute more as necessary...!
Addon Development
Want to work on or improve the addon? Add the
--addon
flag to the script to launch the addon inwatch
mode. Refreshing the page should enable any changes:canvas: node scripts/storybook --addon
What's in the PR?
What did I need to ship in order to ship this?
This takes advantage of a number of changes from my Time to Present PoC. It also needed to use the improvements @crob611 and I made to how we use Kibana Services-- we can now stub out and run Canvas without any Kibana Services present.
...and more.