Closed stacey-gammon closed 5 years ago
Hi Stacey,
I was asking on the other forums about being able to specify an onclick
event for various sorts of visualisations, because that exposes a new level of use cases & benefits from the visualisation tools. i.e. "take action". It's not enough anymore to just see that something is happening, the preference is to be able to take action and to put something in place to handle that, or report on it, or modify its future behaviour, all from within Kibana and/or its apps, OR the places that the visualisations are embedded into. I believe that your comments regarding
Need fleshed out support for pluggable panel actions that also speak the embeddable language
is referring to this same behaviour that I'm thinking of.
I'd also like to propose that prior to the full rearchitecture you've described above, that perhaps a smaller incremental step, is to expose a postMessage()
function for visualisations (via a checkbox perhaps), so that when the user clicks on it, the function will take the information regarding that specific clicked element, and send it in the postMessage()
. This will then allow some additional capabilities within the current embedded iframe approach.
Thoughts?
Hi @kriston13, sorry for the delayed response.
I'm pretty sure that we are actively working towards a solution for your use case. That is, a very flexible system for exposing actions from various events on different embeddables. Though getting a full plan in place for that is not something that will happen in the short term.
We do already have pluggable panel actions in place, maybe that is something you can look at? Nothing is actually using it at the moment, minus a test to make sure the interface works - https://github.com/elastic/kibana/tree/master/test/plugin_functional/plugins/sample_panel_action. We haven't broadcast it much because until we have a few solid use cases, the interface is probably apt to change quite a bit.
The only problem right now is that there is no additional context passed to the action - like an element that was just clicked on. We do want to think that through more too in order to support #12560
I don't really see us adding anything in the short term though, until we can spend more time understanding the longer term picture.
Not sure where to comment on this, but I read through the slides, and have started thinking about this a bit.
One thing I want to point out is that I think that the thing we are calling "trigger" should be called "event", e.g. most developers would think of a "click event" rather than a "click trigger" and the thing we're calling "event" would be an "event listener" or something.
@chrisdavies good point! I'm down with changing to that terminology (though I think I will leave the current slides alone because the recorded demos use that terminology). Moving forward though, it makes sense to me!
Embeddables
Goal:
Related:
Current infrastructure
Future infrastructure
API Overview
Embeddable
Container.ts
Action API
Trigger, the most simple object: