Skip to content

feat: implement persistent sidebar state management - #93

Merged
fx merged 2 commits into
mainfrom
feat/74-persistent-sidebar-state
Jul 3, 2025
Merged

feat: implement persistent sidebar state management#93
fx merged 2 commits into
mainfrom
feat/74-persistent-sidebar-state

Conversation

@fx

@fx fx commented Jul 3, 2025

Copy link
Copy Markdown
Owner

Closes #74

Summary

  • Added sidebar state (sidebarOpen and sidebarPinned) to the dashboard configuration
  • Implemented persistence of sidebar state to localStorage
  • Updated export/import functionality to include sidebar state in both JSON and YAML formats
  • Added proper actions for toggling sidebar state that mark the state as dirty
  • Created comprehensive tests for sidebar state persistence

Changes Made

Configuration Updates

  • Added sidebarOpen and sidebarPinned to DashboardConfig interface
  • Updated exportConfiguration to include sidebar state
  • Updated loadConfiguration to restore sidebar state (with fallback to current state)
  • Updated YAML export to include sidebar properties

Store Actions

  • Modified toggleSidebar action to mark state as dirty
  • Added new toggleSidebarPin action for pin state management
  • Updated TabSidebar component to use proper actions instead of direct state updates

Testing

  • Created comprehensive test suite for sidebar persistence
  • Tests cover export, import, localStorage persistence, and dirty state management
  • All tests passing

Testing

  • Tested sidebar state persists across page reloads
  • Verified state is included in JSON export
  • Verified state is included in YAML export
  • Confirmed import restores sidebar state correctly
  • All unit tests pass
  • TypeScript checks pass
  • Linting passes

Epic: #72

@fx
fx merged commit fd60fb2 into main Jul 3, 2025
2 checks passed
@fx
fx deleted the feat/74-persistent-sidebar-state branch July 3, 2025 05:35
fx added a commit that referenced this pull request Jul 8, 2025
* feat: implement persistent sidebar state management

* fix: remove unused import and fix formatting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement persistent sidebar state management

1 participant