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

Remove circular dependency between uiActions & data/embeddable plugins #82047

Closed
smith opened this issue Oct 29, 2020 · 3 comments · Fixed by #82791
Closed

Remove circular dependency between uiActions & data/embeddable plugins #82047

smith opened this issue Oct 29, 2020 · 3 comments · Fixed by #82791
Assignees
Labels
Feature:UIActions UI actions. These are client side only, not related to the server side actions.. NeededFor:Core

Comments

@smith
Copy link
Contributor

smith commented Oct 29, 2020

The uiActions plugin imports types from the data and embeddable plugins:

import type { RangeSelectContext, ValueClickContext } from '../../embeddable/public';
import type { ApplyGlobalFilterActionContext } from '../../data/public';

These plugins have uiActions as a dependency, so there's a circular dependency here.

uiActions does not declare data or embeddables as dependencies in its kibana.json.

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-arch (Team:AppArch)

@lukeelmers
Copy link
Member

Plan here is to use the declare module pattern so that embeddables/data can augment the existing TriggerContextMapping instead of having their types directly imported.

While we want to stay away from this pattern in general, we decided it's okay in this case because a) It's the quickest way to unblock progress on folks moving to TS project refs; and b) We are already using this pattern for ActionContextMapping so it makes sense that we would go in and refactor everything at once in the future.

I'll have a PR up for this in a bit.

@lukeelmers lukeelmers added Feature:UIActions UI actions. These are client side only, not related to the server side actions.. NeededFor:Core labels Nov 5, 2020
@lukeelmers
Copy link
Member

We're getting close on finishing this one. PR is up here: #82791

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:UIActions UI actions. These are client side only, not related to the server side actions.. NeededFor:Core
Projects
None yet
3 participants