Skip to content

Conversation

@aalves08
Copy link
Member

@aalves08 aalves08 commented Dec 18, 2025

Summary

Fixes #16218

Occurred changes and/or fixed issues

  • add new locations for Tab extension point:

  • TabLocation.RESOURCE_DETAIL_PAGE

  • TabLocation.RESOURCE_CREATE_PAGE

  • TabLocation.RESOURCE_EDIT_PAGE

  • TabLocation.ALL

  • give deprecation notice to TabLocation.RESOURCE_DETAIL

  • update documentation

Technical notes summary

Areas or cases that should be tested

Fix the imports in pkg/kubectl-explain/index.ts:

import {
  ActionLocation, IPlugin, IInternal, TabLocation
} from '@shell/core/types';

add the following bits of code to the same file:

DETAIL PAGE

plugin.addTab(
    TabLocation.RESOURCE_DETAIL_PAGE,
    { resource: ['service'] },
    {
      name:       'some-name',
      label:      'detail-page-label',
      weight:     -5,
      showHeader: true,
      tooltip:    'this is a tooltip message',
      component:  () => import('./MyTabComponent.vue')
    }
  );

CREATE PAGE

plugin.addTab(
    TabLocation.RESOURCE_CREATE_PAGE,
    { resource: ['service'] },
    {
      name:       'some-name',
      label:      'create-page-label',
      weight:     -5,
      showHeader: true,
      tooltip:    'this is a tooltip message',
      component:  () => import('./MyTabComponent.vue')
    }
  );

EDIT PAGE

plugin.addTab(
    TabLocation.RESOURCE_EDIT_PAGE,
    { resource: ['service'] },
    {
      name:       'some-name',
      label:      'edit-page-label',
      weight:     -5,
      showHeader: true,
      tooltip:    'this is a tooltip message',
      component:  () => import('./MyTabComponent.vue')
    }
  );

ALL PAGES

plugin.addTab(
    TabLocation.ALL,
    { resource: ['pod', 'service'] },
    {
      name:       'some-name',
      label:      'all-pages-label',
      weight:     -5,
      showHeader: true,
      tooltip:    'this is a tooltip message',
      component:  () => import('./MyTabComponent.vue')
    }
  );
  • Check that the tabs appear fine in the mentioned areas

Areas which could experience regressions

Screenshot/Video

Checklist

  • The PR is linked to an issue and the linked issue has a Milestone, or no issue is needed
  • The PR has a Milestone
  • The PR template has been filled out
  • The PR has been self reviewed
  • The PR has a reviewer assigned
  • The PR has automated tests or clear instructions for manual tests and the linked issue has appropriate QA labels, or tests are not needed
  • The PR has reviewed with UX and tested in light and dark mode, or there are no UX changes
  • The PR has been reviewed in terms of Accessibility
  • The PR has considered, and if applicable tested with, the three Global Roles Admin, Standard User and User Base

@aalves08 aalves08 added this to the v2.14.0 milestone Dec 18, 2025
@aalves08 aalves08 self-assigned this Dec 18, 2025
@aalves08 aalves08 force-pushed the 16218-new-tabs-location-extensions branch from 2032e9e to 6f9bf12 Compare December 18, 2025 18:28
@aalves08 aalves08 merged commit 77fed86 into rancher:master Dec 19, 2025
63 of 64 checks passed
|`TabLocation.RESOURCE_DETAIL`| String | Location for a Tab on a Resource Detail page |
|`TabLocation.RESOURCE_SHOW_CONFIGURATION`| String | Location for a Tab on a Resource Show Configuration *(From Rancher version v2.14.0)* |
|`TabLocation.RESOURCE_CREATE_PAGE`| String | Location for a Tab on a Resource Create page |
|`TabLocation.RESOURCE_EDIT_PAGE`| String | Location for a Tab on a Resource Edit page |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ALL RESOURCE_CREATE_PAGE, RESOURCE_EDIT_PAGE and RESOURCE_DETAIL_PAGE are also from v2.14.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tech Debt: Improve experience on Tabs extensions point with new locations

3 participants