Repository navigation
feat: add secondaryContent to Header - #5255
Open
gethinwebster wants to merge 1 commit into
Open
gethinwebster wants to merge 1 commit into
gethinwebster wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5255 +/- ##
=======================================
Coverage 97.82% 97.82%
=======================================
Files 1006 1006
Lines 32566 32567 +1
Branches 12095 12095
=======================================
+ Hits 31857 31858 +1
+ Misses 703 667 -36
- Partials 6 42 +36 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
gethinwebster
force-pushed
the
dev-v3-gethinw-header-secondary-content
branch
from
November 4, 2026 17:00
bfcd8cb to
85fb631
Compare
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Passing secondaryContent={0} renders an unwrapped text node, losing the slot’s layout styles and causing findSecondaryContent() to return null despite visible content.
1 open issue
What changed in this PR
Adds a public secondaryContent slot to Header, reusing the existing layout support used by ExpandableSection.
Changes:
- Exposes secondary content beside the heading and before actions, outside the heading element.
- Adds
findSecondaryContent()to Header test utilities. - Adds unit coverage, visual permutations, and updated API snapshots.
| File | Description |
|---|---|
src/test-utils/dom/header/index.ts |
Adds the secondary-content finder. |
src/header/styles.scss |
Renames slot selectors to match the public prop. |
src/header/internal.tsx |
Replaces the internal slot prop with secondaryContent. |
src/header/interfaces.ts |
Defines and documents the public prop. |
src/header/__tests__/header.test.tsx |
Tests default absence, heading separation, and content order. |
src/expandable-section/expandable-section-header.tsx |
Passes secondary content through the new prop. |
src/__tests__/snapshot-tests/__snapshots__/test-utils-selectors.test.tsx.snap |
Records the new slot selector. |
src/__tests__/snapshot-tests/__snapshots__/documenter.test.ts.snap |
Records the prop and test-utils finder. |
pages/header/permutations.page.tsx |
Adds secondary-content visual permutations. |
Review effort: Balanced
gethinwebster
force-pushed
the
dev-v3-gethinw-header-secondary-content
branch
from
November 5, 2026 08:11
85fb631 to
5f74aef
Compare
gethinwebster
force-pushed
the
dev-v3-gethinw-header-secondary-content
branch
from
November 5, 2026 08:28
5f74aef to
26335b9
Compare
gethinwebster
marked this pull request as ready for review
November 5, 2026 08:43
gethinwebster
requested review from
vikaskale2722
and removed request for
a team
November 5, 2026 08:43
gethinwebster
enabled auto-merge
November 5, 2026 11:51
gethinwebster
requested review from
a team and
ywyyu17
and removed request for
a team and
vikaskale2722
November 6, 2026 08:46
This branch was successfully deployed
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.

Description
Adds a
secondaryContentprop to Header, as a follow-up from adding the same to ExpandableSection.Related links, issue #, if available: n/a
How has this been tested?
Review checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness
CONTRIBUTING.md.CONTRIBUTING.md.Security
checkSafeUrlfunction.Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.