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

[8.x] [uiActions] make trigger action registry async (#205512) #206480

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

nreese
Copy link
Contributor

@nreese nreese commented Jan 13, 2025

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

Closes elastic#191642, part of
elastic#205512

PR makes the following changes to uiActions API.
* Deprecates `registerAction` and `addTriggerAction` and replaces them
with `registerActionAsync` and `addTriggerActionAsync`
* Makes all registry consumption methods async, such as `getAction`,
`getTriggerActions` and `getFrequentlyChangingActionsForTrigger`

PR updates presentation_panel plugin to use `registerActionAsync`. With
actions behind async import, page load bundle size has been reduced by
21.1KB.

<img width="500" alt="Screenshot 2025-01-08 at 2 14 23 PM"
src="https://github.com/user-attachments/assets/34a2cae9-dc5e-429b-bbdb-ffd9dfe1cce3"
/>

Also, async exports are [contained in a single file
`panel_module`](elastic#206117). This
results in dashboard only loading one `presentationPanel.chunk`.

<img width="500" alt="Screenshot 2025-01-08 at 2 15 02 PM"
src="https://github.com/user-attachments/assets/e083b852-b50d-4fa7-8ebd-e2f56f85e998"
/>

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Elastic Machine <[email protected]>
(cherry picked from commit 1bd8c97)

# Conflicts:
#	src/platform/plugins/private/presentation_panel/public/panel_component/presentation_panel.tsx
@nreese nreese merged commit d3b8955 into elastic:8.x Jan 13, 2025
11 checks passed
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
presentationPanel 100 113 +13

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
presentationPanel 11 9 -2
uiActions 110 117 +7
total +5

Async chunks

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

id before after diff
dataVisualizer 598.3KB 598.3KB +13.0B
discover 818.0KB 818.0KB +16.0B
lens 1.5MB 1.5MB +30.0B
maps 3.0MB 3.0MB +40.0B
presentationPanel 15.8KB 36.1KB +20.3KB
total +20.4KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
dashboard 48.9KB 49.1KB +163.0B
presentationPanel 40.8KB 19.8KB -21.0KB
presentationUtil 30.9KB 31.0KB +11.0B
uiActions 21.5KB 22.0KB +564.0B
total -20.3KB
Unknown metric groups

API count

id before after diff
presentationPanel 11 9 -2
uiActions 156 163 +7
total +5

ESLint disabled line counts

id before after diff
dashboard 10 11 +1
presentationPanel 6 7 +1
total +2

References to deprecated APIs

id before after diff
aiops 4 9 +5
cases 31 32 +1
controls 13 16 +3
dashboard 21 30 +9
dashboardEnhanced 9 11 +2
data 29 32 +3
discover 9 11 +2
discoverEnhanced 0 2 +2
esql 0 1 +1
imageEmbeddable 1 2 +1
infra 1 2 +1
inputControlVis 10 11 +1
lens 85 92 +7
links 3 4 +1
maps 30 33 +3
ml 35 53 +18
reporting 11 12 +1
securitySolution 470 477 +7
slo 3 7 +4
synthetics 20 22 +2
uiActionsEnhanced 11 12 +1
unifiedSearch 13 15 +2
visualizations 55 57 +2
total +79

Total ESLint disabled count

id before after diff
dashboard 10 11 +1
presentationPanel 6 7 +1
total +2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants