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

[Maps] [Embeddables] Provide ability to edit actions displayed in context menu and on map #43643

Closed
3 tasks done
Tracked by #43879
spong opened this issue Aug 21, 2019 · 5 comments · Fixed by #51975
Closed
3 tasks done
Tracked by #43879
Assignees
Labels
[Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation enhancement New value added to drive a business result Feature:Embedding Embedding content via iFrame

Comments

@spong
Copy link
Member

spong commented Aug 21, 2019

  • Add disabledActions property to embeddable inputs.
  • In embeddable panel respect disabledActions input—don't render disabled actions.
  • In SIEM set disabledActions to [CUSTOM_TIME_RANGE_ACTION, CUSTOM_TIME_RANGE_BADGE].

See full description below.


In integrating maps into the SIEM App with the Embeddables API, we want to customize the map such that the CustomTimeRangeAction does not show up in the context menu, and that the CustomTimeRangeBadge panel does not show in the top left corner of the map (highlighted below).

We need to hide these components/actions as the SIEM App manages the global time range, and we want to hide any additional controls to simplify the experience/ui for our users.

image

Currently it doesn't look as if there's any way to disable these components directly for a given embeddable without removing the action entirely, e.g.

start.detachAction(CONTEXT_MENU_TRIGGER, 'CUSTOM_TIME_RANGE');
start.detachAction(PANEL_BADGE_TRIGGER, 'CUSTOM_TIME_RANGE_BADGE');

which results in the following desired UI, but will also remove those actions for any embeddable registered with the same api instance....not good. 😬

image

It looks as if the context menu checks for the action's compatibility with the embeddable before displaying a menu item -- perhaps we can set some sort of action enabled state on the embeddable's input that either the action or context menu could use to conditionally display? (Similarly so for the TimerangeBadge / CustomTimeRangeBadge?)

Please let me know if I've missed some part of the API where these UI elements can configured -- thanks!

cc @stacey-gammon @nreese

@spong spong added Feature:Embedding Embedding content via iFrame [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation enhancement New value added to drive a business result labels Aug 21, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-gis

@stacey-gammon
Copy link
Contributor

cc @streamich

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-arch

@stacey-gammon
Copy link
Contributor

perhaps we can set some sort of action enabled state on the embeddable's input that either the action or context menu could use to conditionally display?

I think this sounds like a good idea. Perhaps disabledActions array and set to [CUSTOM_TIME_RANGE_ACTION, CUSTOM_TIME_RANGE_BADGE].

@spong
Copy link
Member Author

spong commented Aug 26, 2019

Similarly so, as shown in #43642, being able to disable the default APPLY_FILTER_TRIGGER action would allow us to get the desired UX (no prompt for which filter action to use) when filtering from tooltips in the map.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation enhancement New value added to drive a business result Feature:Embedding Embedding content via iFrame
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants