diff --git a/src/lib/components/Sidebar.svelte b/src/lib/components/Sidebar.svelte index 77b30f42f..08f140553 100644 --- a/src/lib/components/Sidebar.svelte +++ b/src/lib/components/Sidebar.svelte @@ -975,7 +975,7 @@ } if (showFavoritesMenu) { const target = e.target as HTMLElement; - if (!target.closest('.favorites-popover') && !target.closest('.collapsed-section-btn')) { + if (!target.closest('.favorites-popover') && !target.closest('.favorites-section .nav-item')) { showFavoritesMenu = false; } } @@ -1038,31 +1038,41 @@ - -
+ + {#if showFavoritesMenu && !isExpanded} @@ -2258,51 +2270,59 @@ text-align: center; } - /* Favorites Section (matches Playlists style) */ + /* Favorites Section (hybrid: nav-item style with expandable children) */ .favorites-section { display: flex; flex-direction: column; } - .favorites-header { + .favorites-nav-wrapper { display: flex; align-items: center; - justify-content: space-between; - padding: 0 8px; - margin-bottom: 6px; + gap: 0; } - .favorites-header .section-header-btn { + .favorites-nav-item { flex: 1; - justify-content: flex-start; + min-width: 0; } - .favorites-items { - display: flex; - flex-direction: column; - } - - .collapsed-section-btn { + .favorites-expand-btn { display: flex; align-items: center; justify-content: center; - width: 32px; - height: 32px; - margin: 0 auto; + width: 24px; + height: 24px; + margin-right: 4px; background: none; border: none; - border-radius: 6px; - color: var(--text-muted); + border-radius: 4px; cursor: pointer; + color: var(--text-muted); transition: background-color 150ms ease, color 150ms ease; } - .collapsed-section-btn:hover, - .collapsed-section-btn.active { + .favorites-expand-btn:hover { background: var(--bg-hover); color: var(--text-primary); } + .favorites-chevron { + display: flex; + align-items: center; + justify-content: center; + transition: transform 150ms ease; + } + + .favorites-chevron.expanded { + transform: rotate(90deg); + } + + .favorites-subitems { + display: flex; + flex-direction: column; + } + /* Favorites Popover (collapsed sidebar) */ .favorites-popover { position: fixed;