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

[expressions] couple to UI Actions #111426

Open
9 tasks
ppisljar opened this issue Sep 7, 2021 · 2 comments
Open
9 tasks

[expressions] couple to UI Actions #111426

ppisljar opened this issue Sep 7, 2021 · 2 comments
Labels
Feature:ExpressionLanguage Interpreter expression language (aka canvas pipeline) impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:large Large Level of Effort Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@ppisljar
Copy link
Member

ppisljar commented Sep 7, 2021

Currently expression renderer can use handler.emit to emit pretty much anything but it can't know what will actually be handled by the application consuming the expressions. Application could decide to do anything with the value, but most applications today handle the value to UIActions plugin.

To standardize the way expression events work we should couple expressions with UIActions:

  • add optional dependency on UIActions to expressions plugin
  • add optional parameter getExtraActionContext: () => Context to ExpressionRenderHandlerParams
  • remove hasCompatibleActions from ExpressionRenderHandlerParams
  • add preventDefault: () => void to ExpressionRendererEvent
  • expression renderer event handler should emit the value, check if preventDefault was called and if not call uiActions?.executeTriggerActions(name, { …context, ...getExtraActionContext() });
    note: above should only happen when rendering with interactions enabled
  • update consumers to either call .preventDefault() on event and manually handle it, or even better remove the manual handling in favor of internal handling with uiActions
    • lens should not prevent default but let expressions emit uiAction, lens should still call correct method on this.input (still needs subscription to events$)
    • visualize should prevent default only for bounds event, for all other events it should not do anything
    • canvas currently doesn't subscribe to events$. It probably shouldn't and should let expressions call uiActions even when it moves to the new filtering approach.
@ppisljar ppisljar added Feature:ExpressionLanguage Interpreter expression language (aka canvas pipeline) Team:AppServices labels Sep 7, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-services (Team:AppServices)

@exalate-issue-sync exalate-issue-sync bot added 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 labels Sep 13, 2021
@exalate-issue-sync exalate-issue-sync bot added loe:large Large Level of Effort and removed loe:small Small Level of Effort labels Sep 29, 2021
@ppisljar ppisljar changed the title expressions actions/effects [expressions] couple to UI Actions Sep 30, 2021
@exalate-issue-sync exalate-issue-sync bot added impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. and removed impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. labels Oct 20, 2022
@stratoula stratoula added Team:Visualizations Visualization editors, elastic-charts and infrastructure and removed Team:AppServicesSv labels Nov 14, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-visualizations @elastic/kibana-visualizations-external (Team:Visualizations)

@timductive timductive added impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. and removed impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. labels Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:ExpressionLanguage Interpreter expression language (aka canvas pipeline) impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:large Large Level of Effort Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants