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

[Embeddable Rebuild] [Controls] Refactor ControlGroupRenderer #189820

Closed
Tracked by #174961
Heenawter opened this issue Aug 2, 2024 · 1 comment · Fixed by #190561
Closed
Tracked by #174961

[Embeddable Rebuild] [Controls] Refactor ControlGroupRenderer #189820

Heenawter opened this issue Aug 2, 2024 · 1 comment · Fixed by #190561
Assignees
Labels
impact:critical This issue should be addressed immediately due to a critical level of impact on the product. loe:large Large Level of Effort Project:Controls project:embeddableRebuild Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas

Comments

@Heenawter
Copy link
Contributor

Heenawter commented Aug 2, 2024

I will be refactoring the ControlGroupRenderer in the examples plugin, and the refactored version will be moved to the controls plugin alongside everything else 👍 The goal here is to keep the props + API the same, so that we won't have to change anything in the consumer's plugins.

@Heenawter Heenawter added Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas loe:medium Medium Level of Effort impact:critical This issue should be addressed immediately due to a critical level of impact on the product. Project:Controls project:embeddableRebuild labels Aug 2, 2024
@Heenawter Heenawter self-assigned this Aug 2, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

@Heenawter Heenawter added loe:large Large Level of Effort loe:medium Medium Level of Effort and removed loe:medium Medium Level of Effort loe:large Large Level of Effort labels Aug 22, 2024
Heenawter added a commit that referenced this issue Sep 10, 2024
… framework (#190561)

Closes #189820

### Summary

This PR converts the `ControlGroupRenderer` to use the new control group
embeddable, which is built on the new React embeddable framework. With
this conversion, there should not be **any** changes in user-facing
behaviour - therefore, testing of this PR should be focused on ensuring
that no behaviour is changed and/or broken with this refactor.

**Notes to Solution Reviewers:**
- There should be minimal changes to your uses of `ControlGroupRenderer`
- our goal here was to keep the exposed API more-or-less consistent with
this refactor. Therefore, most changes are simply renames + changes of
imports.
- That being said, `updateInput` and `getInput$` are **very much** tied
to the old embeddable infrastructure - so while they will continue to
work for now, they have been deprecated in favour of adding
setters/getters for the parts of the control group state that you need
to update / respond to.

**Notes to Presentation Reviewer:**
- The bundle size was originally being increased by this PR, so I
decided to remove a bunch of the public exports that are no longer
necessary as a final cleanup - this resulted in changes to imports in a
few files, but it was worth doing in this PR IMO so that we didn't have
to increase the Controls bundle limit. Now, this PR shrinks the bundle
size 🎉
- I fixed a small bug with the default value of `showApplySelections` in
this PR - since it was a one-line change, if felt like overkill to
separate it out. See
https://github.com/elastic/kibana/pull/190561/files#r1733253015

### 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact:critical This issue should be addressed immediately due to a critical level of impact on the product. loe:large Large Level of Effort Project:Controls project:embeddableRebuild Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants