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

[Embeddables Rebuild] [Controls] Fix data control editor type selector #187390

Conversation

Heenawter
Copy link
Contributor

@Heenawter Heenawter commented Jul 2, 2024

Closes #187382

Summary

This PR separates out the previously memoized CompatibleControlTypesComponent into a separate component that accepts props for the fields that it is dependant on rather than relying on the dependencies to the useMemo function. This is because, previously, we had an extra dependency in the dependency array (controlType) that was causing the memoized component to render too many times and it was causing a weird bug where the old "disabled" menu item wasn't getting unmounted properly.

Before After
Jul-02-2024 13-21-44 Jul-02-2024 13-12-29

By switching to a component with explicit props, unnecessary dependencies should hopefully be avoided in the future.

For maintainers

@Heenawter Heenawter added Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas loe:small Small Level of Effort release_note:skip Skip the PR/issue when compiling release notes impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. Project:Controls project:embeddableRebuild labels Jul 2, 2024
@Heenawter Heenawter self-assigned this Jul 2, 2024
@Heenawter
Copy link
Contributor Author

/ci

@Heenawter Heenawter force-pushed the embeddableRebuild_controls_fix-data-editor_07-02-2024 branch from c5fa242 to dd266fc Compare July 2, 2024 17:48
@Heenawter
Copy link
Contributor Author

/ci

@Heenawter
Copy link
Contributor Author

/ci

@Heenawter
Copy link
Contributor Author

/ci

@Heenawter Heenawter marked this pull request as ready for review July 3, 2024 16:08
@Heenawter Heenawter requested a review from a team as a code owner July 3, 2024 16:08
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

✅ unchanged

History

cc @Heenawter

@Heenawter Heenawter merged commit 5e353a3 into elastic:main Jul 3, 2024
18 checks passed
@Heenawter Heenawter deleted the embeddableRebuild_controls_fix-data-editor_07-02-2024 branch July 3, 2024 20:46
@kibanamachine kibanamachine added v8.15.0 backport:skip This commit does not require backporting labels Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. loe:small Small Level of Effort Project:Controls project:embeddableRebuild release_note:skip Skip the PR/issue when compiling release notes Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas v8.15.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Embeddables Rebuild] Data control editor showing multiple of the same control types
4 participants