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

[Maps] fix Do not allow opening multiple tooltips for single feature #149254

Merged
merged 5 commits into from
Jan 23, 2023

Conversation

nreese
Copy link
Contributor

@nreese nreese commented Jan 19, 2023

Fixes #148819

When multiple tooltips first merged in 7.7.0, TooltipFeature only had id and layerId property so the original equality check _.isEqual(features, tooltipState.features) prevented tooltips from opening that shows identical features. Later releases added new properties to TooltipFeature that broke this deep equals check.

This PR resolves the issue by mapping features to just {id, layerId} before equality check to ensure those are the only properties that determine equality.

@nreese nreese added Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting Feature:Maps v8.7.0 labels Jan 19, 2023
@nreese nreese marked this pull request as ready for review January 19, 2023 21:06
@nreese nreese requested a review from a team as a code owner January 19, 2023 21:06
@elasticmachine
Copy link
Contributor

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

@nreese nreese requested a review from nickpeihl January 19, 2023 21:11
Copy link
Member

@nickpeihl nickpeihl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

code review and tested in chrome

@nickpeihl
Copy link
Member

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

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

id before after diff
maps 2.7MB 2.7MB +92.0B

History

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

@nreese nreese merged commit 050cf79 into elastic:main Jan 23, 2023
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 Feature:Maps release_note:skip Skip the PR/issue when compiling release notes Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas v8.7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Maps] Do not allow opening multiple tooltips for single feature
5 participants