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

Expose useActiveNamespace in the dynamic plugin SDK

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Major Major
    • None
    • None
    • Dynamic Plugins
    • None
    • HAC Infra OCP - Sprint 240

      Currently there is no good way for plugins to get the active namespace outside of resource pages. We should expose useActiveNamespace to support this. (useActiveNamespace is only exposed in the internal API.)

      This seems important to pair with NamespaceBar since it's unclear how to get the initial namespace from NamespaceBar. This is borderline a bug since it's not clear how to use NamespaceBar without it. We should consider for 4.12. 

      AC: 

      • Expose the `useActiveNamespace` in the console-dynamic-plugin-sdk pkg
      • Remove the internal implementation of `useActiveNamespace` from console-shared pkg
        • note the solution does not currently remove the implementation from console-shared, rather useActiveNamespace will be left in console shared, and exposed via require and imports statements.
      • Replace the imports

            sgoodwin_redhat Steve goodwin
            spadgett@redhat.com Samuel Padgett
            Jakub Hadvig
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: