feat: add visualContext prop to top navigation#4631
Open
amanabiy wants to merge 2 commits into
Open
Conversation
amanabiy
commented
Jun 15, 2026
|
|
||
| type InternalTopNavigationProps = SomeRequired<TopNavigationProps, 'utilities'> & InternalBaseComponentProps; | ||
|
|
||
| function wrapWithVisualContext(content: React.ReactNode, visualContext: TopNavigationProps.VisualContext) { |
Member
Author
There was a problem hiding this comment.
This is going to be reused for the custom-content.
17aaad4 to
69b8bf6
Compare
69b8bf6 to
ef6adcc
Compare
ef6adcc to
b8f0439
Compare
b8f0439 to
13c89ab
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4631 +/- ##
==========================================
+ Coverage 97.51% 97.55% +0.03%
==========================================
Files 948 948
Lines 30346 30350 +4
Branches 11067 11069 +2
==========================================
+ Hits 29593 29609 +16
+ Misses 706 694 -12
Partials 47 47 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
pan-kot
previously approved these changes
Jun 15, 2026
2f36591 to
8a52bc0
Compare
amanabiy
commented
Jun 15, 2026
| (useTopNavigation as jest.Mock).mockImplementation(actualUseTopNavigation); | ||
| }); | ||
|
|
||
| // The overflow drawer only renders once utilities are collapsed, which depends on layout |
Member
Author
There was a problem hiding this comment.
New addition: I have added this test with a mock to help with the test coverage.
pan-kot
approved these changes
Jun 16, 2026
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 visualContext prop to TopNavigation that controls whether the dark visual context is applied.
Related links, issue #, if available: n/a
How has this been tested?
Unit tests, and test pages
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.