[Controls] Redux Toolkit and Embeddable Redux Wrapper#114371
[Controls] Redux Toolkit and Embeddable Redux Wrapper#114371ThomThomson merged 46 commits intoelastic:masterfrom
Conversation
…ing and removing controls
… Delete all functionality with confirm. Reset width after canceling edit
…son/kibana into andreadelrio/dndControls-design-1
[Controls] dnd clone design improvements
Co-authored-by: Andrea Del Rio <delrio.andre@gmail.com>
|
@elasticmachine merge upstream |
|
Pinging @elastic/kibana-presentation (Team:Presentation) |
| > => ({ | ||
| diffInput: (a, b) => { | ||
| const differences: Partial<InputType> = {}; | ||
| const allKeys = [...Object.keys(a), Object.keys(b)] as Array<keyof InputType>; |
There was a problem hiding this comment.
is there a missing spread operator for the Object.keys(b) here?
There was a problem hiding this comment.
Wow, what a good catch... that could've made for some annoying and hard to diagnose errors down the line! I've fixed that.
poffdeluxe
left a comment
There was a problem hiding this comment.
There's a lot going on here but overall looks good to me. I had one question regarding that spread operator but other than that this seems like it's going to make embeddable state management much easier
💚 Build SucceededMetrics [docs]Module Count
Public APIs missing comments
Async chunks
Public APIs missing exports
Page load bundle
History
To update your PR or re-run it, just comment with: |
…mple/introduce-baseline-tests * 'master' of github.com:elastic/kibana: (55 commits) [Fleet] Improve Functionality around Managed Package Policies (elastic#114526) cleanup (elastic#114902) remove stray semicolon (elastic#114969) [Security Solution] Edit host isolation exception IP UI (elastic#114279) [ML] APM Correlations: Round duration values to be used in range aggregations. (elastic#114833) [Index Management] Added `data-test-subj` values to the index context menu buttons (elastic#114900) [Stack monitoring] Fix logstash functional tests for react (elastic#114819) Implement hybrid approach to writing rule execution event logs (elastic#114852) [Detection Rules] Add 7.16 rules (elastic#114939) Fixing exceptions export format (elastic#114920) Clean up inaccurate comments (elastic#114935) chore(NA): fixes a typo on persist_bazel_cache.sh comment (elastic#114943) [ci] Fixes Bazel cache writes (elastic#114915) fix package.json: (elastic#114936) [Controls] Redux Toolkit and Embeddable Redux Wrapper (elastic#114371) [APM] Fixes incorrect index config names (elastic#114901) (elastic#114904) [Workplace Search] Fix button order and remove extra source name label (elastic#114899) [Actions] Fixed actions telemetry for multiple namespaces usage (elastic#114748) docs: fix config names (elastic#114903) Update kibana to EMS 7.16 (elastic#114865) ...
Summary
Closes #101194
Redux Embeddable Wrapper
system which can be used to give any embeddable the ability to manage its state via Redux without the hassle of setting up a new store, building a slice, or dealing with syncing redux state and embeddable state. Embeddables that wish to use redux can now do so with the following steps:
ReduxEmbeddableWrapper, providing the input type and the reducers.useReduxEmbeddableContexthook to access the dispatch, typed actions, and selector.Redux state in Control Group
The control group has been updated to use Redux with the Redux embeddable wrapper. This greatly simplifies state management in the control group embeddable. It's behaviour should be the same, with a few small exceptions:
Preconfigured story
The storybook now has story with a control group pre-configured. This makes development faster, and makes it easier to check out the progress at a glance!