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] clean features in locked tooltip after re-fetch #48016

Merged
merged 8 commits into from
Oct 14, 2019

Conversation

nreese
Copy link
Contributor

@nreese nreese commented Oct 11, 2019

Fixes #44116 and #32560

There are 2 bugs

  1. clearTooltipStateForLayer action was not updated to support multiple features in tooltipState back in 7.3
  2. __kbn__feature_id__ changes for each re-refetch even if the underling feature is the same. This makes it impossible to map features from on dataRequest to the next dataRequest.

This PR renames clearTooltipStateForLayer to cleanTooltipStateForLayer and updates the logic to support tooltipState with multiple features. The logic is also updated to keep tooltip features for a layer if they still exist in the layer.

This PR updates ES documents source, ES grid source, and ES point to point source to provide consistent __kbn__feature_id__ across re-fetches for features that are the same.

@nreese nreese added release_note:fix [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation v8.0.0 v7.5.0 labels Oct 11, 2019
@nreese nreese requested a review from thomasneirynck October 11, 2019 19:07
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-gis (Team:Geo)

@nreese nreese mentioned this pull request Oct 11, 2019
9 tasks
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Contributor

@thomasneirynck thomasneirynck left a comment

Choose a reason for hiding this comment

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

Great, thanks!

@nreese nreese requested a review from thomasneirynck October 14, 2019 18:00
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Contributor

@thomasneirynck thomasneirynck left a comment

Choose a reason for hiding this comment

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

thx!


const emsIdField = emsFileLayer._config.fields.find(field => {
return field.type === 'id';
});
Copy link
Contributor

Choose a reason for hiding this comment

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

thx!

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@nreese nreese merged commit 0df08fd into elastic:master Oct 14, 2019
nreese added a commit to nreese/kibana that referenced this pull request Oct 14, 2019
* [Maps] clean features in locked tooltip after re-fetch

* fetch geometry from FEATURE_ID_PROPERTY_NAME instead of _id

* set FEATURE_ID_PROPERTY_NAME for pew pew source

* do not update tooltip state if no features were removed

* set FEATURE_ID_PROPERTY_NAME for EMS_file source and kibana_regionmap source

* avoid adding lodash to map actions

* use if else instead of early return
nreese added a commit that referenced this pull request Oct 14, 2019
* [Maps] clean features in locked tooltip after re-fetch

* fetch geometry from FEATURE_ID_PROPERTY_NAME instead of _id

* set FEATURE_ID_PROPERTY_NAME for pew pew source

* do not update tooltip state if no features were removed

* set FEATURE_ID_PROPERTY_NAME for EMS_file source and kibana_regionmap source

* avoid adding lodash to map actions

* use if else instead of early return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation release_note:fix v7.5.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Maps] Locked tooltips contain features that may no longer exist after source re-fetch
3 participants