Skip to content
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

[8.x] [Embeddable Rebuild] [Controls] Clean up services + TODOs (#193180) #193429

Merged
merged 1 commit into from
Sep 19, 2024

Conversation

kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

…3180)

Part of elastic#192005
Closes elastic#167438

## Summary

## Summary

This PR represents the second major cleanup task for the control group
embeddable refactor. The tasks included in this PR can be loosely
summarized as follows:
1. It removes the old, cumbersome services implementation and replaces
it with a much simpler system (which is the same one used in the `links`
+ `presentation_panel` plugins).
- This it the main reason for the decrease in lines - the old system
required a **huge** amount of boilerplate code, which is no longer
necessary with the new method for storing services.
2. It addresses and/or removes any remaining TODO comments in the
`controls` plugin
- This includes renaming `ControlStyle` and `DEFAULT_CONTROL_STYLE` to
`ControlLabelPosition` and `DEFAULT_CONTROL_LABEL_POSITION`
respectively, which represents a bulk of the changes.
3. It moves all compatibility checks for all control actions to be async
imported.
4. It removes the ability to register controls from the `controls`
plugin setup contract.

### 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

### 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 <[email protected]>
(cherry picked from commit db55574)
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #1 / SyncAlertsSwitch it toggles the switch

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
controls 362 353 -9

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
controls 134 130 -4

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
controls 459.4KB 455.7KB -3.7KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
controls 12.9KB 13.3KB +401.0B
Unknown metric groups

API count

id before after diff
controls 138 134 -4

async chunk count

id before after diff
controls 11 10 -1

References to deprecated APIs

id before after diff
controls 17 13 -4

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @Heenawter

@kibanamachine kibanamachine merged commit b2e6263 into elastic:8.x Sep 19, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants