Uploaded image for project: 'OpenShift Console'
  1. OpenShift Console
  2. CONSOLE-4685

Refactor clusterserviceversion.tsx menuActions to accept actions from provider.

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • None
    • None
    • None
    • None
    • None
    • OCP Console - Sprint 275

      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 useOverlay hook instead.
      To use this hook we have to firstly refactor actions that use createModalLauncher instances to accept a callback from useOverlay hook.

      One such instance is clusterserviceversion.tsx menuActions, we should refactor it so that the cluster service version details and list page will receive actions from a console.action/resource-provider extension and newly introduced action provider hook.

      AC:

      1. Create new useClusterServiceVersionActionProvider that would return the existing actions within menuActions.
      2. Expose the hook via extension console.action/resource-provider.
      3. Adjust the clusterserviceversion.tsx file to accept the actions from exposed hook (use ActionServiceProvider and LazyActionMenu for that, reference usePVCActionProvider and persistent-volume-claim.tsx) instead of menuActions.

              rh-ee-jonjacks Jon Jackson
              rh-ee-mziska Marek Ziska (Inactive)
              None
              None
              Yanping Zhang Yanping Zhang
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: