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

Add a mechanism to allow plugins to intercept "click to filter" #6189

Closed
trevan opened this issue Feb 10, 2016 · 7 comments
Closed

Add a mechanism to allow plugins to intercept "click to filter" #6189

trevan opened this issue Feb 10, 2016 · 7 comments
Labels
Feature:Plugins Feature:Visualizations Generic visualization features (in case no more specific feature label is available) release_note:enhancement Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@trevan
Copy link
Contributor

trevan commented Feb 10, 2016

My use case is to be able to click on an item and then choose from a set of "actions". This would be like filtering on it, filtering it out, going to another website, drilling down to a different dashboard, etc.

One way is to convert the current "click to filter" action into a context menu with default actions (filter in, filter out, etc) and then allow plugins to add additional actions (go to a website, drill to a different dashboard, etc).

@ashson
Copy link

ashson commented Feb 11, 2016

Yes, it would be great to have this feature. We can then have Kibana dashboard interact with other websites for apps.

@trevan
Copy link
Contributor Author

trevan commented Feb 12, 2018

I've been thinking on this recently and I wonder if the plugin API could be an override of the listeners.click and API.events.filter actions in visualizations?

Currently, those just call filterBarClickHandler but what if they instead call into some code that grabs a list of registered actions. The actions would have a sort order and can determine if they want to be skipped or if they want to tackle the event. The last action would be the default filterBarClickHandler. Plugins could then register their actions.

@epixa, thoughts?

@epixa
Copy link
Contributor

epixa commented Mar 16, 2018

@trevan I like where you're going with that at a high level, at least. Do you envision this just being a way for plugins to change the singular action that occurs when you click, or do you propose adding some sort of context menu when there are multiple actions that match?

ping @elastic/kibana-visualizations

@epixa epixa added Feature:Plugins Feature:Visualizations Generic visualization features (in case no more specific feature label is available) labels Mar 16, 2018
@thomasneirynck
Copy link
Contributor

Similar requests have come up in the context of "drilldowns": #4439. The idea that, after clicking on a visualization, you can navigate elsewhere. An initial effort around this topic will be likely for dashboard-drilldowns (#12560).

I agree that this would be very valuable to have for individual visualizations, and that this could be part of the plugin-API (like you mentioned, "custom click handlers"). We've discussed it internally on occasion, but have not made concrete steps to bring this into Kibana.

@trevan
Copy link
Contributor Author

trevan commented Mar 16, 2018

@epixa, I would like it if Kibana always showed a context menu because I feel there are always two actions you can do: filter in and filter out. Then plugins could add additional actions to the context menu to drill down, call apis, go to external sites, etc.

But I felt that forcing a context menu for all clicks in the default Kibana might be too disruptive so allowing a plugin to create the context menu would be a first step.

I spoke with @timroes about this at Elasticon and we discussed where this hook might fit. He mentioned that there is work being done that might change how the plugin api works but he was interested in seeing a pr to see how I would make it work.

@timroes timroes added the Team:Visualizations Visualization editors, elastic-charts and infrastructure label Sep 16, 2018
@nreese
Copy link
Contributor

nreese commented Oct 2, 2020

@Dosant Can this be closed with the work done with triggers and drilldowns?

@nreese nreese closed this as completed Oct 2, 2020
@nreese nreese reopened this Oct 2, 2020
@Dosant
Copy link
Contributor

Dosant commented Oct 6, 2020

@Dosant Can this be closed with the work done with triggers and drilldowns?

Yes!

#71854
#42845

@Dosant Dosant closed this as completed Oct 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Plugins Feature:Visualizations Generic visualization features (in case no more specific feature label is available) release_note:enhancement Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

No branches or pull requests

8 participants