evilmartians/oklch-picker

Add Undo/Redo

Closed this issue · 0 comments

ai commented
  1. Add hotkey listeners to view/base/index.ts: Cmd+Z/Ctrl+Z for undo and Cmd+Y/Cmd+Shift+Z/Ctrl+Y/Ctrl+Shift+Z for redo
  2. Add stores/history.ts to listen for current store and save values. The hotkey listeners should just call functions from this store, most logic should be here.
  3. Test that everything works (doesn’t matter where is the focus, works in different browsers)
  4. Update Size Limit if necessary (but try to avoid using libraries)