Skip to content
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

terms: make filters togglable #1126

Closed
wants to merge 1 commit into from
Closed

terms: make filters togglable #1126

wants to merge 1 commit into from

Conversation

jdve
Copy link

@jdve jdve commented Apr 7, 2014

If a filter has already been created for a particular term label, remove
it instead of adding another one. This makes it convenient to
add/remove term filters quickly without needing to use the filtering
panel.

If a filter has already been created for a particular term label, remove
it instead of adding another one.  This makes it convenient to
add/remove term filters quickly without needing to use the filtering
panel.
@skillflip
Copy link

This is extremely useful. Devs, any indication on when this might be merged in?

jdve: I was going to implement this too, so I'm glad to find your pull request. We had another additional feature in mind. Would it be very hard to add a 'ignore own filters' setting to the terms panel as well? The idea being that with this setting turned on, the terms panel will not be affected by the facet filters it added itself to the filtering panel.

Imagine I have a terms panel showing "Top 5 Pages". At the moment, if you click on one, you'll be left with only that single page name listed in the panel after it refreshes. With the toggle I have in mind, all 5 pages will remain and can be clicked for toggling additional term filters in the way you so nicely added in this commit.

What do you think?
Johann

@jdve
Copy link
Author

jdve commented May 1, 2014

Ooo, that's a great idea! Yeah, I can see that being a very useful feature as well. I'm not sure how hard it would be to do that. I haven't checked if the filterSrv has that sort of parameter exposed. Sounds doable, though, in any case.

@skillflip
Copy link

That would be great if you can have a look. If it looks too big, then let me know and we'll see if we can chip in, but we'd appreciate your guidance and suggestions since you've dabbled in this part of the code for this pull request already. We're actively doing some modifications of our own to Kibana, and I just don't want us to double up on work someone else is doing already.

@jdve
Copy link
Author

jdve commented May 2, 2014

In the near term, it doesn't look like I'm going to have time to work on this. Feel free to take it from here. If I end up looking into this again, I'll add a comment here. Feel free to message me if you'd like some help with this, and I'll try to respond as much as I can.

@skillflip
Copy link

Hi @jdve - I've had some time today on the weekend and whipped up a commit to implement what we've been talking about. It's dependant on your previous commit. Can you have a play or review and let me know what you think? https://github.com/skillflip/kibana/commits/terms-ignore-filters

image

So there is a new option for the terms panel to ignore it's own filters. So with this on, you will see all terms no matter which ones are selected. I've also added some color overrides to the rendering to grey out any terms which are not being selected (if you select at least one term). Then lastly I've added another setting for "Radio Select" mode, meaning that only one term filter can be selected at a time. If you have term1 filtered on, and you select term2, then term1's filter will be removed.

Cheers,
Johann

@jdve
Copy link
Author

jdve commented May 4, 2014

Wow, this looks great! I scanned through your change, and it looks solid. I'll give it a whirl on Monday. I know someone who's going to be very happy with this feature! :)

Jonathan

@skillflip
Copy link

Any luck trying it out? I've played with it some more too and seems to hold together. I'll submit a separate pull request for it soon if I don't hear back (or hear back good stuff!) 😄

@jdve
Copy link
Author

jdve commented May 6, 2014

@skillflip, I just gave it a try--wow, very nice!! I'm gonna be using this, for sure! :)

One comment: in the regular (non-radio) mode, should the filter be "either" instead of "must"? With "must", then actually only one applies, even if multiple options are picked. Right?

@skillflip
Copy link

Hi @jdve. You are right, there are use-cases for both modes. I was using it in a tagging style facet, so there could be more than one tag per indexed item, hence the 'must' mode. However I can see if there is only a single term per indexed item you'd prefer the 'either' mode. I've added a small change to make this configurable.

The full pull request is here: #1201

Thanks!

@w33ble w33ble closed this Oct 6, 2014
@spalger
Copy link
Contributor

spalger commented Oct 6, 2014

Woops! Sorry about that! We recently replaced the master branch with Kibana 4. This action force closed all of the old pull requests against master. We will be reviewing these on a case-by-case basis and creating new tickets as necessary.

The good news is that many long requested features can be found in Kibana 4, and we're being entirely open about our roadmap. Check out the roadmap tickets (which we're still filling in) here.

If you're looking for the old Kibana 3 code you can find it here.

@rashidkpc
Copy link
Contributor

Agree that we shouldn't be adding the same filter multiple times. I've created an issue for it in Kibana 4 here: #1598

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants