You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Syntax is obtuse and discoverability is low. Developers have to know about uiActions registry and trigger constant. The registry is not tied to the embeddable setup API.
Proposed solution
Instead, each trigger should be broken into its own registry.
Resolve uiActions synchronous registry issue for our use cases.
Reduce uiActions synchronous registry scope. Most actions belong to CONTEXT_MENU_TRIGGER and ADD_PANEL_TRIGGER triggers. Moving these to separate registries will reduce the complexity in migrating uiActions registry.
Better developer syntax. Registering embeddable and dashboard actions are better scoped to embeddable setup API for easier discoverability.
Moving registry closer to its consumption improves maintainability. Testing becomes easier since tests no longer need to mock uiActions but instead mock a local resource.
Reduced complexity by eliminating trigger and usage of uiActions one-to-many registry.
nreese
changed the title
[dashboard] break dashboard and embeddable triggers into separate registries
[dashboard][embeddable] break dashboard and embeddable triggers into separate registries
Dec 4, 2024
Closing this issue as we're likely to focus on making the whole UI actions registry async rather than splitting off our own registries. We can reopen this if we revisit the decision.
Problem
Currently, embeddable and dashboard actions are registered in uiActions trigger action registry.
To register a context menu action
To register an "Add panel" action
There are 2 problems with this pattern
Proposed solution
Instead, each trigger should be broken into its own registry.
To register a context menu action
To register a add panel action
Benefits
CONTEXT_MENU_TRIGGER
andADD_PANEL_TRIGGER
triggers. Moving these to separate registries will reduce the complexity in migrating uiActions registry.Potential problems
The text was updated successfully, but these errors were encountered: