-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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] ignore global query layer setting #35542
Conversation
💔 Build Failed |
…GlobalQuery is disabled
…e index patterns are included in list
💔 Build Failed |
Pinging @elastic/kibana-gis |
💔 Build Failed |
@cchaos @thomasneirynck Should Currently, the For example: if you create an EMS vector layer of the world countries the details panel looks like this But, once a join is added, it looks like this Is it weird to have the Just for context, here is what the layer details panel looks like with a vector layer from es_search_source. The |
💚 Build Succeeded |
I was having an issue understanding what this toggle does and had to go through the entire issue and PR thread to understand what the toggle does. It was almost more clear in TSVB when labelled as "Ignore global filters". Though it is weird to have a toggle with a negative label. Maybe a word other than "Apply" which is more of an action item vs a passive "Let it be" type of thing. I'm also not entirely following why the "Apply global filters" is tied to joins, and based on the screenshots, I think it will not be clear to the user either. If filters are directly affected by joins then the filters panel should come after the joins panel. Though, it seems more of an overall layer setting that should be able to be switched on/off no matter the layer type. Why can't you just always say "Never apply global filters" not matter what other settings they have/don't have selected for the layer? That way the option is always available, but may not do anything now because it's not actually tied to an index pattern yet. You can then keep it in one place for all layers and not have it inside the Filter panel. All that said, I'm always a proponent of disabling rather than hiding and then adding tooltips explaining why something is disabled. |
I think always showing an active
Should i move the
I like the idea of always showing but having the |
Makes the most sense to me. |
@cchaos I agree, I had some trouble with For instance, if I wanted to filter on a specific flights the airports but they were two different indices if global filters were applied, the airport layer would disappear. If global filters were ignored, they would persist even though the flights layer is being filtered. |
@alexfrancoeur @cchaos @thomasneirynck Should the Filter panel be removed and then the filter input be moved into the Source settings panel? This would make it clearer that the filter only applies to the source and not joins. |
Filters is too much it's own beast and can be quite large. I'd leave it as it's own. Also based on your screenshot above, if the toggle can't be used and is disabled it should also be in the "off" position. |
💚 Build Succeeded |
Just chatted with @gchaps and we decided the best label was |
💚 Build Succeeded |
💔 Build Failed |
…d applyGlobalQuery is disabled
💚 Build Succeeded |
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.
tested and works. neat!
a little unrelated, but isn't the layer-settings panel getting a little unbalanced? (cc @cchaos)
e.g. should we remove Display layer when map is in zoom range.
it's a little fluffy
and the global-query switch doesn't have a little heading, while all other 3 settings do.
x-pack/plugins/maps/public/embeddable/map_embeddable_factory.js
Outdated
Show resolved
Hide resolved
The label for that element didn't give a good understanding of the control which is why the help text was necessary. However the spacing seems really off and there might be a way to change the label text to just be more verbose like
That's how labels are handled for switches vs inputs. We know there's a bit of a disparity and may alter that later in EUI, but I'd leave it as is. |
💚 Build Succeeded |
Going with @cchaos suggestion, how about this for the label Zoom range for layer visibility and then removing the fluffy text. |
💚 Build Succeeded |
💔 Build Failed |
jenkins, test this |
💚 Build Succeeded |
* [Maps] ignore global query layer setting * do not include index pattern id in query bar indexPatterns when applyGlobalQuery is disabled * update how embeddable factory extracts indexPatterns so only queryable index patterns are included in list * support applyGlobalQuery for heatmap and getBounds * add functional tests to join layer * show filter section when layer has join * move checkbox to layer settings panel * text review * set checkbox to false when disabled * do not trigger refetch when global query and global filter changes and applyGlobalQuery is disabled * rename applyGlobalQuery to getApplyGlobalQuery * throw error in map embeddable factory if layerListJSON can not be parsed * remove extra space * update zoom range slider label and remove nested EuiFormRow
* [Maps] ignore global query layer setting * do not include index pattern id in query bar indexPatterns when applyGlobalQuery is disabled * update how embeddable factory extracts indexPatterns so only queryable index patterns are included in list * support applyGlobalQuery for heatmap and getBounds * add functional tests to join layer * show filter section when layer has join * move checkbox to layer settings panel * text review * set checkbox to false when disabled * do not trigger refetch when global query and global filter changes and applyGlobalQuery is disabled * rename applyGlobalQuery to getApplyGlobalQuery * throw error in map embeddable factory if layerListJSON can not be parsed * remove extra space * update zoom range slider label and remove nested EuiFormRow
implements #33041
When layer does not support filtering like Tile layer or Vector layer from EMS without a join, the checkbox is disabled
This PR adds
applyGlobalQuery
setting to layer. When false, source data fetches, join data fetches and get bounds data fetches will ignore global query bar and filter pills.Index patterns that are only applied to layers that disable applyGlobalQuery will not provide type ahead support in query bar or be selectable in filter pill editor