Skip to content

Conversation

@dsmmcken
Copy link
Contributor

@dsmmcken dsmmcken commented Nov 7, 2025

To adopt NavTabList in enterprise, we need to be able to attach a popper to a navtab. This PR creates a slot that goes after the title, that takes a render function, passing in the tab.

Enterprise has a diverged from Core and is lacking bug fixes, so I would like to get NavTabList de-duplicated and used in Enterprise.

Testing:
Tested by manually creating popper in styleguide, worked as expected.

To adopt NavTabList in enterprise, we need to be able to attach a popper to the navtabs.
@dsmmcken dsmmcken requested a review from mattrunyon November 7, 2025 18:43
@dsmmcken dsmmcken self-assigned this Nov 7, 2025
@codecov
Copy link

codecov bot commented Nov 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 45.11%. Comparing base (590def3) to head (1e3c039).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2565      +/-   ##
==========================================
- Coverage   45.16%   45.11%   -0.06%     
==========================================
  Files         769      769              
  Lines       43463    43463              
  Branches    11170    10989     -181     
==========================================
- Hits        19632    19608      -24     
- Misses      23815    23839      +24     
  Partials       16       16              
Flag Coverage Δ
unit 45.11% <ø> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dsmmcken dsmmcken requested a review from Copilot November 7, 2025 18:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a renderTabSlot prop to the NavTabList component, allowing consumers to render custom content after each tab's title. This provides flexibility for adding tab-specific UI elements like badges or indicators.

  • Adds optional renderTabSlot prop to NavTabList and NavTab components
  • Renders slot content after tab title and before close button
  • Includes test coverage for the new functionality

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
packages/components/src/navigation/NavTabList.tsx Adds renderTabSlot prop definition with JSDoc and threads it through to NavTab
packages/components/src/navigation/NavTab.tsx Adds renderTabSlot prop and renders slot content after tab title
packages/components/src/navigation/NavTabList.test.tsx New test file with coverage for renderTabSlot functionality

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dsmmcken
Copy link
Contributor Author

@copilot fix all the comments

Copy link
Contributor

Copilot AI commented Nov 11, 2025

@dsmmcken I've opened a new pull request, #2573, to work on those changes. Once the pull request is ready, I'll request review from you.

@dsmmcken dsmmcken requested a review from mattrunyon November 11, 2025 21:32
@dsmmcken dsmmcken merged commit 6981b5a into main Nov 13, 2025
10 of 11 checks passed
@dsmmcken dsmmcken deleted the dmckenzie_NavTabSlot branch November 13, 2025 15:37
@github-actions github-actions bot locked and limited conversation to collaborators Nov 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants