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

[ML] Decouple edit-anomaly-swimlane UI action #179073

Merged
merged 9 commits into from
Mar 22, 2024

Conversation

darnautov
Copy link
Contributor

@darnautov darnautov commented Mar 20, 2024

Summary

  • Decouples edit-anomaly-swimlane and apply-time-range-selection UI actions from embeddable framework

Part of #178375
Part of #174967

@darnautov darnautov requested a review from a team as a code owner March 20, 2024 15:55
@darnautov darnautov added :ml release_note:skip Skip the PR/issue when compiling release notes labels Mar 20, 2024
@darnautov darnautov self-assigned this Mar 20, 2024
@darnautov darnautov added Feature:UIActions UI actions. These are client side only, not related to the server side actions.. Team:ML Team label for ML (also use :ml) Feature:Embeddables Relating to the Embeddable system labels Mar 20, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@darnautov darnautov marked this pull request as draft March 20, 2024 16:10
@darnautov darnautov marked this pull request as ready for review March 20, 2024 16:33
@peteharverson peteharverson changed the title [ML] Decouple edit-anomaly-swimlane UI aciton [ML] Decouple edit-anomaly-swimlane UI action Mar 21, 2024
@darnautov darnautov force-pushed the ml-decouple-edit-swim-lane-action branch from 4062c0d to 9be954f Compare March 21, 2024 12:34
@darnautov darnautov requested a review from peteharverson March 21, 2024 12:45
@darnautov darnautov requested a review from peteharverson March 21, 2024 14:53
Copy link
Contributor

@ThomThomson ThomThomson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action conversions LGTM! Code only review, but all of the conventions are followed very well. Great usage of the existing APIs, + creating new ones.

Left one very minor nit.

entityFields: PublishingSubject<MlEntityField[] | undefined>;
}

export type AnomalyChartsEmbeddableApi = HasType<AnomalyExplorerChartsEmbeddableType> &
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This type is really clean and straightforward. Nice work!

This is not necessary, but interfaces have slightly better editor time performance than types, so we're starting to recommend using the interface syntax whenever possible. This could be rewritten like:

export interface AnomalyChartsEmbeddableApi extends HasType<AnomalyExplorerChartsEmbeddableType>, MlEmbeddableBaseApi, AnomalyChartsFieldSelectionApi {}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in 517e8a8

Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested latest changes and LGTM.

Is the 'Clear selection' action also covered here, or does that not need to be decoupled?

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
ml 1949 1950 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
ml 3.7MB 3.7MB +1.2KB

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @darnautov

@darnautov darnautov merged commit 917f854 into elastic:main Mar 22, 2024
16 checks passed
@kibanamachine kibanamachine added v8.14.0 backport:skip This commit does not require backporting labels Mar 22, 2024
@darnautov darnautov deleted the ml-decouple-edit-swim-lane-action branch March 22, 2024 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Embeddables Relating to the Embeddable system Feature:UIActions UI actions. These are client side only, not related to the server side actions.. :ml project:embeddableRebuild release_note:skip Skip the PR/issue when compiling release notes Team:ML Team label for ML (also use :ml) v8.14.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants