added text layers and redo and undo #9
Open
svsairevanth wants to merge 2 commits intomarkfulton:mainfrom
Open
Conversation
Features implemented: - Text tool mode with interactive text layer management - TextStylePanel component with comprehensive controls: * Font selection (14 Google Fonts) * Font size slider (12-200px) * Color picker with hex values * Text alignment (left, center, right) * Text styling (bold, italic, underline) * Multiple text layers support - Canvas text rendering with Konva: * Drag to reposition text * Resize and rotate with transformer * Click to select text layers * Visual feedback for selected text - Export functionality includes text overlays - Keyboard shortcuts: * T - Switch to text tool * Delete/Backspace - Remove selected text * Escape - Deselect text - Responsive UI with tool grid (2x2 layout) - Dynamic Google Fonts loading Dependencies added: - react-colorful for color picker Files modified: - src/types/index.ts - Added TextLayer interface - src/store/useAppStore.ts - Text layer state management - src/components/TextStylePanel.tsx - New component - src/components/ImageCanvas.tsx - Text rendering & interaction - src/components/PromptComposer.tsx - Text tool button - src/App.tsx - Conditional TextStylePanel rendering - src/hooks/useKeyboardShortcuts.ts - Text tool shortcuts - package.json - Added react-colorful dependency
Features implemented: - Text history tracking with state snapshots - Undo button (Ctrl+Z) to revert text changes - Redo button (Ctrl+Shift+Z) to reapply changes - Visual undo/redo buttons in TextStylePanel - History state management in Zustand store - Works with all text operations: * Adding new text layers * Editing text content * Changing font, size, color, alignment * Deleting text layers * Moving/transforming text - Keyboard shortcuts work even while typing - Buttons disabled when no history available Files modified: - src/store/useAppStore.ts - History state and undo/redo actions - src/components/TextStylePanel.tsx - Undo/redo UI buttons - src/hooks/useKeyboardShortcuts.ts - Ctrl+Z/Ctrl+Shift+Z shortcuts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.