-
Notifications
You must be signed in to change notification settings - Fork 11
fix: hide navigation header if there is nothing underneath #1024
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
This reverts commit 8bf3da5.
Codecov Report
@@ Coverage Diff @@
## main #1024 +/- ##
==========================================
+ Coverage 85.06% 85.07% +0.01%
==========================================
Files 820 820
Lines 16863 16878 +15
Branches 2190 2195 +5
==========================================
+ Hits 14344 14359 +15
Misses 2488 2488
Partials 31 31
Continue to review full report at Codecov.
|
This comment has been minimized.
This comment has been minimized.
}, | ||
{ | ||
type: NavItemType.Link, | ||
icon: 'icon', |
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.
Shouldn't this show up since there is not feature flag applied?
@@ -87,6 +91,26 @@ export class NavigationListComponent { | |||
return this.collapsed ? IconType.TriangleRight : IconType.TriangleLeft; | |||
} | |||
|
|||
public shouldShowHeader(index: number): Observable<boolean> { |
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.
Please use htMemoize
return isEmpty(features.flat()) | ||
? of(false) | ||
: combineLatest( | ||
features |
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.
You shouldn't need to check feature flag state every time. One resolution per browser refresh is enough. Then we can just share the same result throughout (till another browser refresh)
closing this, please check #1035 instead |
Description
Please include a summary of the change, motivation and context.
Testing
Local testing done.
Checklist: