feat(module:tabs): support for start and end extra content#9097
Merged
Conversation
|
This preview will be available after the AzureCI is passed. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #9097 +/- ##
=======================================
Coverage 92.01% 92.01%
=======================================
Files 564 565 +1
Lines 20026 20034 +8
Branches 3107 3107
=======================================
+ Hits 18426 18435 +9
Misses 1261 1261
+ Partials 339 338 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
HyperLife1119
commented
Apr 19, 2025
| import { Directive, inject, input, TemplateRef } from '@angular/core'; | ||
|
|
||
| @Directive({ | ||
| selector: '[nzTabBarExtraContent]:not(nz-tabset)' |
Collaborator
Author
There was a problem hiding this comment.
nz-tabset 上也有一个属性为 nzTabBarExtraContent,因此需要排除一下。
我在想是否应该弃用 nz-tabset 上的 nzTabBarExtraContent 用法,引导用户采用现在这种更通用的用法?
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces support for rendering extra content at both the start and end of the tabset. Key changes include:
- Adding a new binding ([extraContents]) and helper (contentChildren) in the tabset component.
- Updating the tab navigation bar to render start and end extra content using Angular 17’s computed and input signals.
- Updating tests, docs, and demos to reflect the enhanced functionality.
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| components/tabs/tabset.component.ts | Added support for extra content binding and integrated extraContents. |
| components/tabs/tabset.component.spec.ts | Added tests to verify rendering of start and end extra content. |
| components/tabs/tabs.module.ts | Updated module exports to include the new extra content directive. |
| components/tabs/tab-nav-bar.component.ts | Implemented computed signals to conditionally render extra content. |
| components/tabs/tab-bar-extra-content.directive.ts | Created new directive for specifying extra content position. |
| Documentation and demo files | Updated to demonstrate the new functionality. |
Laffery
reviewed
Apr 21, 2025
Laffery
requested changes
Apr 21, 2025
1111039 to
e4a7396
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
Only extra content at the end is supported.
What is the new behavior?
Supports extra content at the start and end.
Does this PR introduce a breaking change?
Other information