-
Story
-
Resolution: Done
-
Undefined
-
None
-
None
-
None
-
None
-
None
-
False
-
-
False
-
3
-
None
-
None
-
OCP Console - Sprint 276
As part of the work on react-router v5 drop, we need to migrate from the createModalLauncher instances in our codebase and we need to use the useModal hook instead. Before we are able to migrate to useModal we have to refactor consumers of createModalLauncher to be a hook/FC form first.
For pipelines plugin there are several of such instances - useSinkPubSubActionProvider, useUriActionsProvider, useEventSourcesActionsProvider, useKnativeConnectorActionProvider, useTopologyActionsProvider, useBrokerActionProvider, useChannelActionProvider and useCommonActionsProvider. To see all the consumers in a list visit Inventory of createModalLauncher in Console(those marked with no big refactor needed). We should refactor actions that store createModalLauncher callbacks within these providers ( identified in the inventory), so that the actions will store callbacks via useOverlay hook instead. Example for a refactor of single action that used a createModalLauncher can be seen here https://github.com/openshift/console/pull/15230.
AC:
- Introduce new hooks for modals used within the actions of the above providers. This hook should use useOverlay hook to return a callback that would launch these modals.
- Consolidate above providers to use this new hook.
- Pass the modal launcher callback retrieved from the hook to the actions and use that callback instead of the createModalLauncher instance.
- blocks
-
CONSOLE-4670 [KNATIVE] Drop remaining createModalLauncher instances and use useOverlay instead
-
- Closed
-
- is cloned by
-
CONSOLE-4670 [KNATIVE] Drop remaining createModalLauncher instances and use useOverlay instead
-
- Closed
-
- links to