Skip to content

Collections sidenav folder icon should reflect expanded/collapsed state #939

Closed

Description

@malibio

Overview

The Collections section in the navigation sidebar uses a static folder icon that does not change when the section is expanded or collapsed. Users have no visual indicator of the current state unless child items happen to be visible.

Problem Statement

User Experience:

  1. User sees the Collections nav item with a closed folder icon
  2. User clicks to expand — child collections appear, but the folder icon stays the same
  3. User cannot tell at a glance whether Collections is expanded or collapsed when no children are visible

Expected: The folder icon should switch to an "open folder" variant when collectionsExpanded is true, and back to a "closed folder" when false — consistent with standard file explorer conventions.

Proposed Solution

Conditionally render two folder SVG icons in the Collapsible.Trigger based on the collectionsExpanded state:

  • Closed (collectionsExpanded === false): current closed folder icon
  • Open (collectionsExpanded === true): open folder icon variant

Acceptance Criteria

  • Folder icon shows closed state when Collections section is collapsed
  • Folder icon shows open state when Collections section is expanded
  • Icon switches immediately on click (no delay)
  • Works correctly on initial load when collectionsExpanded is restored from persisted layout state
  • Tests pass (bun run test:all)
  • Code passes bun run quality:fix

Technical Specifications

Files to Modify

  • NavigationSidebar: packages/desktop-app/src/lib/components/layout/navigation-sidebar.svelte — Collapsible.Trigger block for Collections (~lines 262–363)

Implementation Details

The collectionsExpanded boolean is already available in scope from the layout store. The trigger currently renders a single static folder SVG. Replace it with a conditional that swaps between a closed folder icon and an open folder icon (e.g. Lucide folder vs folder-open, or equivalent inline SVGs matching the existing icon style).

The existing icon uses:

<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
  <path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z" />
</svg>

The open folder variant should follow the same SVG style/dimensions.

Related Issues

Activity

  1. self-assigned this
    on Mar 14, 2026
  2. added a commit that references this issue on Mar 14, 2026
    61c92ff
  3. added a commit that references this issue on Mar 14, 2026
    e04bfb3
  4. added a commit that references this issue on Jun 22, 2026
    3316b29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions