Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
[context view] Apply filters to the context query #11466
Summary: This adds the ability to display a filter bar in the Context view and to apply those filters to the queries. It also modifies the link from the Discover view to the Context view to copy the currently defined filters when switching. New filters can be added from within the Context view using the icons in the expanded detail rows.
Bargs left a comment
This looks really good already!
I only noticed one issue: pinning a filter in the context view throws an error and causes the page to reload.
I think the only other outstanding items are disabling the filters by default and re-adding the filter buttons on the field rows.
2 times, most recently
May 3, 2017
3 times, most recently
May 11, 2017
lukasolson left a comment
Awesome improvement! I found what I think are a couple of issues:
When I create a filter, then pin it, then switch to the context view, the filter appears to be enabled, but it really isn't. If I disable it then re-enable it, it actually becomes enabled:
Also, when I go to the context view, it appears that the filter in/out backgrounds persist, making white boxes in each of the columns of the anchor row:
When I create a filter in discover, then click the back button, the filter gets removed, but it doesn't navigate anywhere. When I go to the context view, then create a filter, then click the back button, I'm returned to the discover view. However, if I'm in the context view, then create a filter, then disable the filter, then click the back button, I stay in the context view but the filter is re-enabled:
@weltenwort this looks great! I was hoping you could provide some clarification on a few items.
It appears with this workflow, any pre-defined filters will automatically be disabled. I understand this workflow and think it makes sense for viewing surrounding documents. Changes made to these filters are local to the context viewer as well. Pinned filters seem to be the exception here. If a pinned filter is enabled is the expectation that they are enabled upon entering the context viewer as well? Or are they expected to follow suite and disable as non-pinned filters do? I believe Lukas ran into the same issue here. I'm just wondering what the expected behavior is. It's a little odd that pinned filters keep their state when entering the context viewer but other filters do not. At the same time, the alternative of automatically disabling a global pinned filter doesn't necessarily make sense either.
This is minor and can be addressed with platform changes later on, but there is no way to add a breadcrumb at the moment is that correct? It can be a bit annoying to hit the back button for each filter change to return to discover and I don't believe it's always the users first inclination to click the discover button in the left hand nav.
@lukasolson I'm wondering, since we are targeting both this and #11375 for 5.5 - are there any concerns combining the two? The ability to add new filters directly from the menu will make this view even more powerful - I'm just wondering if there are any conflicts that we might want to get ahead of. For example - from a user experience perspective the filters are all automatically disabled upon entering the context view. In it's current state, there is an action to enable or disable all. I believe these bulk actions are lost with the new filtering capabilities but correct me if I'm wrong.
That is what I intended here. (I hopefully fixed the problem that they appeared to be enabled but were not applied.) It kind of makes sense given the semantics of pinned filters (in so far as the pinned filters themselves make sense
The breadcrumbs were removed as a result of the discussion in #9198, because we did not want to represent history with them. This becomes especially important with the new accessibility criteria that the design team is currently trying to make Kibana comply with. Maybe they have something to say about this.
We are not expecting any particular difficulties here. Since the context app is just consuming the filter bar as-is, improvements made to it should "just work", assuming that the interface via the