refactor(dashboards-ng): use typed factory keys in widgetFactoryRegistry#1807
refactor(dashboards-ng): use typed factory keys in widgetFactoryRegistry#1807chintankavathia wants to merge 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request refines the widgetFactoryRegistry by replacing generic string keys with a specific WidgetFactoryType and marking the registry as @internal. Feedback suggests improving the maintainability of the WidgetFactoryType definition by deriving it directly from the WidgetComponentFactory union using TypeScript's Exclude utility. Additionally, there is a concern that marking the registry as @internal constitutes a breaking change for external consumers, which contradicts the pull request description.
6ca877f to
b15c00f
Compare
spike-rabbit
left a comment
There was a problem hiding this comment.
widgetFactoryRegistry sure, this won't break any app, but is it safe to remove it from the public API? So it was never intended to be used by consumer?
we are not removing it from public api. It is still exported. we are just adding |
This ensures that factory functions are mapped to valid factoryTypes.
Not a breaking change as it is intended to be used internally.
Documentation.
Examples.
Dashboards Demo.
Playwright report.
Coverage Reports: