Skip to content

[Maps] clean features in locked tooltip after re-fetch - #48016

Merged
nreese merged 8 commits into
elastic:masterfrom
nreese:clean_locked_tooltip_features
Oct 14, 2019
Merged

nreese merged 8 commits into
elastic:masterfrom
nreese:clean_locked_tooltip_features

Conversation

@nreese

@nreese nreese commented Oct 11, 2019 •

Copy link
Copy Markdown
Contributor

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 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
Copy Markdown
Contributor

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

@nreese nreese mentioned this pull request Oct 11, 2019
7 of 9 tasks
@elasticmachine

Copy link
Copy Markdown
Contributor

💚 Build Succeeded

@elasticmachine

Copy link
Copy Markdown
Contributor

💔 Build Failed

@elasticmachine

Copy link
Copy Markdown
Contributor

💚 Build Succeeded

@thomasneirynck thomasneirynck left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great, thanks!

Comment thread x-pack/legacy/plugins/maps/public/actions/map_actions.js
Comment thread x-pack/legacy/plugins/maps/public/actions/map_actions.js Outdated
Comment thread x-pack/legacy/plugins/maps/public/layers/vector_layer.js Outdated
@nreese
nreese requested a review from thomasneirynck October 14, 2019 18:00
@elasticmachine

Copy link
Copy Markdown
Contributor

💚 Build Succeeded

@thomasneirynck thomasneirynck left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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
patrykkopycinski pushed a commit to patrykkopycinski/kibana that referenced this pull request May 6, 2026
* [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

release_note:fix Team:Geo Former Team Label for Geo Team. Now use Team:Presentation 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