Skip to content

Conversation

@fx
Copy link
Owner

@fx fx commented Jul 1, 2025

Closes #37

Summary

  • Added ModeToggle component using Radix UI Switch for better UI/UX
  • Implemented mode persistence to localStorage to maintain state across reloads
  • Added keyboard shortcut (Ctrl/Cmd + E) for quick mode toggling
  • Replaced simple button with a more intuitive switch component
  • Added comprehensive tests for mode toggle functionality and persistence

Implementation Details

  • Mode state was already present in the dashboard store
  • Added separate localStorage key for mode persistence to avoid conflicts
  • ModeToggle component provides visual feedback with labeled switch
  • Keyboard shortcut follows common editor conventions
  • All existing edit mode controls already respect the mode state

Testing

  • Tested mode toggle functionality in the UI
  • Verified persistence across page reloads
  • Tested keyboard shortcut on both Windows/Linux (Ctrl+E) and Mac (Cmd+E)
  • All tests pass (229/231 - 2 unrelated failures)
  • TypeScript checks pass
  • Linting passes

@fx fx merged commit ce7e939 into main Jul 1, 2025
2 checks passed
@fx fx deleted the feat/37-edit-view-mode-toggle branch July 1, 2025 02:45
fx added a commit that referenced this pull request Jul 8, 2025
* feat: implement edit/view mode toggle with persistence

* fix: update Dashboard tests for new ModeToggle component
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 edit/view mode toggle

2 participants