fix: Show sidebar favorites empty state for discoverability (#2061)

This commit is contained in:
Elizabet Oliveira 2026-04-06 20:05:16 +01:00 committed by GitHub
parent 2570ff844c
commit 7d1a8e549a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 33 additions and 4 deletions

View file

@ -0,0 +1,5 @@
---
"@hyperdx/app": patch
---
fix: Show sidebar favorites empty state when none are starred yet

View file

@ -400,10 +400,20 @@ export default function AppNav({ fixed = false }: { fixed?: boolean }) {
onToggle={() => setIsSavedSearchExpanded(!isSavedSearchExpanded)}
/>
{!isCollapsed && !!favoritedSavedSearches.length && (
{!isCollapsed && (
<Collapse in={isSavedSearchExpanded}>
<div className={styles.subMenu}>
{favoritedSavedSearches.map(renderSavedSearchLink)}
{favoritedSavedSearches.length > 0 ? (
favoritedSavedSearches.map(renderSavedSearchLink)
) : favorites != null && savedSearches != null ? (
<Text size="xs" c="dimmed" pl="lg" pr="xs" py={4} lh={1.4}>
No favorites. Star on{' '}
<Anchor component={Link} href="/search/list" size="xs">
Saved Searches
</Anchor>
.
</Text>
) : null}
</div>
</Collapse>
)}
@ -430,10 +440,24 @@ export default function AppNav({ fixed = false }: { fixed?: boolean }) {
onToggle={() => setIsDashboardsExpanded(!isDashboardsExpanded)}
/>
{!isCollapsed && !!favoritedDashboards.length && (
{!isCollapsed && (
<Collapse in={isDashboardsExpanded}>
<div className={styles.subMenu}>
{favoritedDashboards.map(renderDashboardLink)}
{favoritedDashboards.length > 0 ? (
favoritedDashboards.map(renderDashboardLink)
) : favorites != null && dashboards != null ? (
<Text size="xs" c="dimmed" pl="lg" pr="xs" py={4} lh={1.4}>
No favorites. Star on{' '}
<Anchor
component={Link}
href="/dashboards/list"
size="xs"
>
Dashboards
</Anchor>
.
</Text>
) : null}
</div>
</Collapse>
)}