De-couple panel action logic from UI #27996
Labels
discuss
Feature:Embedding
Embedding content via iFrame
impact:low
Addressing this issue will have a low level of impact on the quality/strength of our product.
loe:small
Small Level of Effort
Meta
stale
Used to mark issues that were closed for being stale
We want actions to be available for any Embeddable, but we don't want to force the embeddable object to come with the chrome that it does in dashboard panels. Think of how Canvas works - actions show up in a right column, not a context menu pop up. If we use Embeddables inside Canvas, we want any available actions to also be exposed inside Canvas - and that means decoupling it from the UI so any container can decide how to expose those actions (either via a context menu, or via some other mechanism).
So we should have both a pluggable actions registry, and keep the panel actions registry separate. At which point, it becomes an interesting question... do we need a panel actions registry at all, or do we dynamically create the panel actions menu from the actions, simple mapping something like
menuItem.onClick
toaction.execute
? AndmenuItem.isVisible
toaction.supports(Embeddable)
. We'd have to think about how isVisible and isDisabled work, especially since there is a use case for not knowing whether something will support a given embeddable at any given time. Maybe we need another function likeaction.canExecute(Embeddable)
to determine enabled vs disabled state.The text was updated successfully, but these errors were encountered: