-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Embeddable Rebuild] [Controls] Refactor control editing + creation (#…
…187606) Closes #187504 ## Summary This PR changes how control creation/editing is handled in the new system by changing from a state manager to an explicit `initialState` + `updateState` callback structure. Unfortunately, the `stateManager` system really only works if we had inline creation for controls - since we don't have that, the embeddable (and hence the `stateManager`) doesn't exist until **after** the editor is saved. Therefore, especially with respect to the custom options component, we had no way of knowing what keys the `stateManager` should include when trying to create a new control. The new system isn't quite as clean IMO, but it works better for our current goals with this refactor. We can revisit the `stateManager` idea once controls support inline editing 👍 This PR also fixes a few visual bugs, noted below. ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
- Loading branch information
1 parent
fcf2702
commit 23bb3c1
Showing
17 changed files
with
649 additions
and
231 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.