openshift / console

OpenShift Cluster Console UI
https://www.openshift.org
Apache License 2.0
394 stars 603 forks source link

Dynamic plugin: A custom tab in the project's horizontal navigation is overriding the Overview tab #13899

Open bartoval opened 3 months ago

bartoval commented 3 months ago

Both in my plugin and when launching the dynamic-plugin-demo, I noticed this effect:

  1. The first 'Overview' tab is highlighted instead of my custom tab, and it displays the content of my project
  2. If I click on the custom tab, the path keeps getting appended in the browser's URL (only Chrome)
  3. Clicking on the "Demo Plugin" tab and then switching to a different tab doesn't update the URL path. This keeps the path at "/demo-plugin/" and break the navigation to the other sections of the application.

demo-plugin

I am running OCP 4.15 and the dynamic plugin demo with these deps: @openshift-console/dynamic-plugin-sdk": "^1.3.0", "@openshift-console/dynamic-plugin-sdk-webpack": "^1.1.0", "@openshift-console/plugin-shared": "^0.0.3",

spadgett commented 1 month ago

/assign @vojtechszocs @jhadvig /kind bug

bartoval commented 1 month ago

Hello, Just last night I managed to get the correct behavior in this new Plugin version, by removing the initial '/' in the console-extensions.json.

{
  "type": "console.tab/horizontalNav",
    ....
         href": "your-path" 
   ....
}

instead
"href": "/your-path"