Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.x] [Embeddable Rebuild] [Controls] Clean up services + TODOs (#193180
) (#193429) # Backport This will backport the following commits from `main` to `8.x`: - [[Embeddable Rebuild] [Controls] Clean up services + TODOs (#193180)](#193180) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Hannah Mudge","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-19T14:02:49Z","message":"[Embeddable Rebuild] [Controls] Clean up services + TODOs (#193180)\n\nPart of https://github.com/elastic/kibana/issues/192005\r\nCloses https://github.com/elastic/kibana/issues/167438\r\n\r\n## Summary\r\n\r\n\r\n## Summary\r\n\r\nThis PR represents the second major cleanup task for the control group\r\nembeddable refactor. The tasks included in this PR can be loosely\r\nsummarized as follows:\r\n1. It removes the old, cumbersome services implementation and replaces\r\nit with a much simpler system (which is the same one used in the `links`\r\n+ `presentation_panel` plugins).\r\n- This it the main reason for the decrease in lines - the old system\r\nrequired a **huge** amount of boilerplate code, which is no longer\r\nnecessary with the new method for storing services.\r\n2. It addresses and/or removes any remaining TODO comments in the\r\n`controls` plugin\r\n- This includes renaming `ControlStyle` and `DEFAULT_CONTROL_STYLE` to\r\n`ControlLabelPosition` and `DEFAULT_CONTROL_LABEL_POSITION`\r\nrespectively, which represents a bulk of the changes.\r\n3. It moves all compatibility checks for all control actions to be async\r\nimported.\r\n4. It removes the ability to register controls from the `controls`\r\nplugin setup contract.\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"db5557429979b9a0f3420a50a06c7fd69cbdf5b2","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Presentation","release_note:skip","impact:high","v9.0.0","backport:prev-minor"],"title":"[Embeddable Rebuild] [Controls] Clean up services + TODOs","number":193180,"url":"https://github.com/elastic/kibana/pull/193180","mergeCommit":{"message":"[Embeddable Rebuild] [Controls] Clean up services + TODOs (#193180)\n\nPart of https://github.com/elastic/kibana/issues/192005\r\nCloses https://github.com/elastic/kibana/issues/167438\r\n\r\n## Summary\r\n\r\n\r\n## Summary\r\n\r\nThis PR represents the second major cleanup task for the control group\r\nembeddable refactor. The tasks included in this PR can be loosely\r\nsummarized as follows:\r\n1. It removes the old, cumbersome services implementation and replaces\r\nit with a much simpler system (which is the same one used in the `links`\r\n+ `presentation_panel` plugins).\r\n- This it the main reason for the decrease in lines - the old system\r\nrequired a **huge** amount of boilerplate code, which is no longer\r\nnecessary with the new method for storing services.\r\n2. It addresses and/or removes any remaining TODO comments in the\r\n`controls` plugin\r\n- This includes renaming `ControlStyle` and `DEFAULT_CONTROL_STYLE` to\r\n`ControlLabelPosition` and `DEFAULT_CONTROL_LABEL_POSITION`\r\nrespectively, which represents a bulk of the changes.\r\n3. It moves all compatibility checks for all control actions to be async\r\nimported.\r\n4. It removes the ability to register controls from the `controls`\r\nplugin setup contract.\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"db5557429979b9a0f3420a50a06c7fd69cbdf5b2"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/193180","number":193180,"mergeCommit":{"message":"[Embeddable Rebuild] [Controls] Clean up services + TODOs (#193180)\n\nPart of https://github.com/elastic/kibana/issues/192005\r\nCloses https://github.com/elastic/kibana/issues/167438\r\n\r\n## Summary\r\n\r\n\r\n## Summary\r\n\r\nThis PR represents the second major cleanup task for the control group\r\nembeddable refactor. The tasks included in this PR can be loosely\r\nsummarized as follows:\r\n1. It removes the old, cumbersome services implementation and replaces\r\nit with a much simpler system (which is the same one used in the `links`\r\n+ `presentation_panel` plugins).\r\n- This it the main reason for the decrease in lines - the old system\r\nrequired a **huge** amount of boilerplate code, which is no longer\r\nnecessary with the new method for storing services.\r\n2. It addresses and/or removes any remaining TODO comments in the\r\n`controls` plugin\r\n- This includes renaming `ControlStyle` and `DEFAULT_CONTROL_STYLE` to\r\n`ControlLabelPosition` and `DEFAULT_CONTROL_LABEL_POSITION`\r\nrespectively, which represents a bulk of the changes.\r\n3. It moves all compatibility checks for all control actions to be async\r\nimported.\r\n4. It removes the ability to register controls from the `controls`\r\nplugin setup contract.\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"db5557429979b9a0f3420a50a06c7fd69cbdf5b2"}}]}] BACKPORT--> Co-authored-by: Hannah Mudge <[email protected]>
- Loading branch information