[Canvas] Storybook Redux Addon#73227
Merged
clintandrewhall merged 12 commits intoelastic:masterfrom Aug 1, 2020
Merged
Conversation
Contributor
|
Pinging @elastic/kibana-canvas (Team:Canvas) |
Contributor
Author
|
@elasticmachine merge upstream |
spalger
approved these changes
Jul 27, 2020
Contributor
spalger
left a comment
There was a problem hiding this comment.
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.
Contributor
Author
|
@spalger I'll use |
Contributor
Author
|
@elasticmachine merge upstream |
Contributor
|
merge conflict between base and head |
Contributor
Author
|
@elasticmachine merge upstream |
Contributor
💚 Build SucceededBuild metricsasync chunks size
page load bundle size
History
To update your PR or re-run it, just comment with: |
clintandrewhall
added a commit
to clintandrewhall/kibana
that referenced
this pull request
Aug 1, 2020
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> # Conflicts: # x-pack/plugins/canvas/storybook/decorators/router_decorator.tsx
clintandrewhall
added a commit
that referenced
this pull request
Aug 1, 2020
gmmorris
added a commit
to gmmorris/kibana
that referenced
this pull request
Aug 2, 2020
* 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) ...
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.
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
reduxDecoratorcan (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
--addonflag to the script to launch the addon inwatchmode. Refreshing the page should enable any changes:canvas: node scripts/storybook --addonWhat'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.