-
Notifications
You must be signed in to change notification settings - Fork 33
feat: adds a renderSlot to NavTabList after content #2565
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
To adopt NavTabList in enterprise, we need to be able to attach a popper to the navtabs.
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this 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
renderTabSlotprop 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.
|
@copilot fix all the comments |
Co-authored-by: dsmmcken <[email protected]>
Co-authored-by: dsmmcken <[email protected]>
Co-authored-by: dsmmcken <[email protected]>
Co-authored-by: dsmmcken <[email protected]>
Co-authored-by: dsmmcken <[email protected]>
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.