-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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] Hide feature when it has no corresponding term join #36617
[Maps] Hide feature when it has no corresponding term join #36617
Conversation
Pinging @elastic/kibana-gis |
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
💚 Build Succeeded |
x-pack/legacy/plugins/maps/public/shared/layers/joins/left_inner_join.js
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/maps/public/shared/layers/vector_layer.js
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/maps/public/shared/layers/vector_layer.js
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/maps/public/shared/layers/vector_layer.js
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/maps/public/shared/layers/vector_layer.js
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/maps/public/shared/layers/vector_layer.js
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/maps/public/shared/layers/vector_layer.js
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/maps/public/shared/layers/vector_layer.js
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/maps/public/shared/layers/vector_layer.js
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/maps/public/shared/layers/vector_layer.js
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/maps/public/shared/layers/vector_layer.js
Outdated
Show resolved
Hide resolved
Notice in the screen show below that the time filter excludes all data so no matches from the terms join are returned. Notice how the legend does not signal that the source, EMS vector layers, is now empty because no features are visible because of the join. Can you also add some logic to VectorLayer.getCustomIconAndTooltipContent to provide a message when terms join has filtered out all features? That way, the legend icon will signal that the layer is not showing any data. The logic should check if the layer has joins and then verify at least one feature is visible. If not, then return the minus icon with a useful error message. |
💚 Build Succeeded |
💚 Build Succeeded |
@@ -98,25 +119,39 @@ export class VectorLayer extends AbstractLayer { | |||
getCustomIconAndTooltipContent() { | |||
const sourceDataRequest = this.getSourceDataRequest(); | |||
const featureCollection = sourceDataRequest ? sourceDataRequest.getData() : null; | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove extra space
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
code review, tested in chrome
💚 Build Succeeded |
@thomasneirynck Could you please add details about this change to the 7.3 breaking changes doc? You'll find the doc under docs/migration/migration_7_3.asciidoc For sample content and how to format it, look at the 7.2 breaking changes doc: |
Closes #34662
This is essentially blocked by #36466, as that one modifies some of the style-refresh logic.todo:
make this configurable so we support both behaviors (left inner join and inner join)will change the default behavior to hide features instead.open ended issues
what to do with fitting? On EMS-layers, we could just fit on the visible results, but for ES-layers, ES produces the bbox. the latter approach will not work when mashed up with a client-side join.will just fit on the entire source datathis is implemented using mapbox-filters.retain mapbox filter implementationit could also be implemented by just removing the data from source altogether, creating a new source after joining. this implementation resets the source when the data updatescould also use an if-then rule for styling properties too, ignoring to apply the style rules when it has n join.It might not be worth the extra complexity either.