-
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
Fix Map bounding box controls #6863
Conversation
ceb3faf
to
6b6d15f
Compare
6c83b5d
to
4217434
Compare
@@ -46,6 +46,7 @@ module.exports = function VislibRenderbotFactory(Private) { | |||
VislibRenderbot.prototype.buildChartData = buildChartData; | |||
VislibRenderbot.prototype.render = function (esResponse) { | |||
this.chartData = this.buildChartData(esResponse); | |||
this.chartData.title = this.vis.title || ''; |
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.
This in my experience has never been undefined, it's usually 'New Visualization' when I would expect that, put the OR for safekeeping.
Added this when I thought the filters were panel specific and started implementing this for that, found out they weren't and left this piece for the future since it shouldn't be undefined anyway.
Currently this overwrites the entire filter object. It actually overwrites all geo filter objects. So couple things:
|
Also get rid of that title, it just duplicate's the data shown elsewhere in the UI |
I've addressed your concerns @rashidkpc, I couldn't reproduce the overwriting of pinned filters, but everything else has been corrected. |
const isDisabled = filt.meta.disabled; | ||
const isSameFilterType = filt.hasOwnProperty(filterKey); | ||
if (!isDisabled && isSameFilterType) { | ||
_.assign(pendingFilter.meta, filt.meta); // be sure to keep any meta data |
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.
Unfortunately I don't think you can keep all of the meta key as it links to the index pattern, you'll end up with filters referencing the wrong pattern. You can keep all the rest, but you need to replace the index pattern with the right one
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.
Hmm, so should I check and make sure they're the same index pattern?I figured if checking to make sure they're the same doesn't matter, neither does overwriting it.
Also, what do I do in the ui to make it change?
@panda01 yeah, my mistake on the pinned filters thing. |
different index. fixed the tests.
So there's an interesting behavior here that I'm not sure how to handle.
Feels like a weird interaction, filters usually only filter down. It sort of seems like we should always be fitting the new filter within the bounds of the old one right? Maybe I'm just being pedantic. @tbragin can you help me out here? |
@rashidkpc kpc @panda01 I checked out the PR and played with the current implementation. In trying to think of user's expectations, when they add multiple filters to a geomap, there are three scenarios I can imagine: The current implementation accomplishes (2), Rashid is asking whether we should actually be doing (1), and someone else reading this ticket may wonder if we in fact should be doing (3). Either way, some minor issues I see with the current approach are:
As @rashidkpc notes, we could constrain the behavior and require successive drill-ins, but:
All in all, i'm probably ok with keeping (2) assuming we make it more obvious to the user what's happening there, and re-evaluate if we get negative feedback. Is there any world in which we would consider doing (3)? |
I think that the showing of partially greyed out buckets would be very useful, however it isn't very reliable because that information depends on a request to es which could be plagued with all kind of issues on the wire taking away from the experience.
I would be down for this if this is possible with elasticsearch, in my looking at the docs, i couldn't find a mention of it, and the structure doesn't make it look doable I do think that we should give some sort of indication to the user that their current action will overwrite what ever filter they have set. Maybe even something as simple as a caution icon next to it, or in place of it on hover, with some tooltip text for help. |
@tbragin @rashidkpc IMO we should put some kind of indicator on or around the filter icon that give information on hover since that is really one of the more viable solutions, should I move forward with that, I'm completely open to better suggestions! |
I agree with @tanya. it is not entirely clear what behaviour we exactly want. There is also the possibility that we want panning/zooming to automatically adjust the filters (cf. #8087). For those reasons, I'm closing this for now. We're also looking at an overhaul of the map so we can revisit #3731 and this PR in that context. |
`[email protected]` ⏩ `83.0.0`⚠️ The biggest change in this PR by far is the `EuiButtonEmpty` Emotion conversion, which changes the DOM structure of the button slightly as well as several CSS classes around it. EUI has attempted to convert any custom EuiButtonEmpty CSS overrides where possible, but would super appreciate it if CODEOWNERS checked their touched files. If anything other than a snapshot or test was touched, please double check the display of your button(s) and confirm everything still looks shipshape. Feel free to ping us for advice if not. --- ## [`83.0.0`](https://github.com/elastic/eui/tree/v83.0.0) **Bug fixes** - Fixed `EuiPaginationButton` styling affected by `EuiButtonEmpty`'s Emotion conversion ([#6893](elastic/eui#6893)) **Breaking changes** - Removed `isPlaceholder` prop from `EuiPaginationButton` ([#6893](elastic/eui#6893)) ## [`82.2.1`](https://github.com/elastic/eui/tree/v82.2.1) - Updated supported Node engine versions to allow Node 16, 18 and >=20 ([#6884](elastic/eui#6884)) ## [`82.2.0`](https://github.com/elastic/eui/tree/v82.2.0) - Updated EUI's SVG icons library to use latest SVGO v3 optimization ([#6843](elastic/eui#6843)) - Added success color `EuiNotificationBadge` ([#6864](elastic/eui#6864)) - Added `badgeColor` prop to `EuiFilterButton` ([#6864](elastic/eui#6864)) - Updated `EuiBadge` to use CSS-in-JS for named colors instead of inline styles. Custom colors will still use inline styles. ([#6864](elastic/eui#6864)) **CSS-in-JS conversions** - Converted `EuiButtonGroup` and `EuiButtonGroupButton` to Emotion ([#6841](elastic/eui#6841)) - Converted `EuiButtonIcon` to Emotion ([#6844](elastic/eui#6844)) - Converted `EuiButtonEmpty` to Emotion ([#6863](elastic/eui#6863)) - Converted `EuiCollapsibleNav` and `EuiCollapsibleNavGroup` to Emotion ([#6865](elastic/eui#6865)) - Removed Sass variables `$euiCollapsibleNavGroupLightBackgroundColor`, `$euiCollapsibleNavGroupDarkBackgroundColor`, and `$euiCollapsibleNavGroupDarkHighContrastColor` ([#6865](elastic/eui#6865)) --------- Co-authored-by: Cee Chen <[email protected]> Co-authored-by: Jeramy Soucy <[email protected]> Co-authored-by: Kibana Machine <[email protected]>
Changes the push filter to instead also modify if there is already one.
Also properly set the title for visualizations.
Fixes #3731.