-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[uiActions] pass trigger into action handlers #71675
Conversation
public readonly execute = async (config: Config, context: ActionContext) => { | ||
public readonly execute = async ( | ||
config: Config, | ||
context: ActionExecutionContext<ActionContext> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want tot use trigger
, we "specify" special type here which is an extension around regular ActionContext
…s-improve-context # Conflicts: # src/plugins/ui_actions/public/actions/action.ts # src/plugins/ui_actions/public/context_menu/build_eui_context_menu_panels.tsx # src/plugins/ui_actions/public/triggers/trigger_internal.ts
Pinging @elastic/kibana-app-arch (Team:AppArch) |
@elasticmachine merge upstream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, ran on Ubuntu/Chrome.
@elasticmachine merge upstream |
💚 Build SucceededBuild metricspage load bundle size
History
To update your PR or re-run it, just comment with: |
Closing in favour of #74363 |
Summary
Partially addresses #63854.
Trigger
now passed into action's execution handlers.This allows to check inside the action which trigger fired the execution.
later can be extended with
disabledActions
use case described here: #63854Implemented as an enhancement that no changes to existing consumer required.
To access
trigger
, need to wrapContext
type with anActionExecutionContext
wrapper typeregular usage, as before:
If need to get access to trigger:
Checklist
Delete any items that are not applicable to this PR.