mirror of
https://github.com/jhbruhn/respira.git
synced 2026-01-27 02:13:41 +00:00
Major fixes: - Fix PEN data encoding to properly mark color changes and end markers - COLOR_END (0x03) for intermediate color blocks - DATA_END (0x05) for the final stitch only - Machine now correctly reads total stitch count across all color blocks - Reset uploadProgress when pattern is deleted to re-enable upload button - Allow pattern deletion during WAITING states - Allow pattern upload in COMPLETE states - Fix pattern state tracking to reset when patternInfo is null UI improvements: - Integrate workflow stepper into compact header - Change app title to "SKiTCH Controller" - Reduce header size from ~200px to ~70px - Make Sewing Progress section more compact with two-column layout - Replace emojis with Heroicons throughout - Reorganize action buttons with better visual hierarchy - Add cursor-pointer to all buttons for better UX - Fix cached pattern not showing info in Pattern File box - Remove duplicate status messages (keep only state visual indicator) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
5.6 KiB
5.6 KiB
UI/UX Improvements for Brother Embroidery Machine Controller
Overview
This document outlines the UI/UX improvements made to enhance usability for non-technical users.
Key Improvements
1. Workflow Stepper Component
File: src/components/WorkflowStepper.tsx
A visual progress indicator showing all 7 steps of the embroidery workflow:
- Connect to Machine
- Load Pattern
- Upload Pattern
- Mask Trace
- Start Sewing
- Monitor Progress
- Complete
Features:
- Clear visual indication of current step (highlighted in blue with ring)
- Completed steps marked with green checkmarks
- Future steps shown in gray
- Progress bar connecting all steps
- Step descriptions for context
2. Next Step Guide Component
File: src/components/NextStepGuide.tsx
Context-sensitive guidance that shows users exactly what to do next:
Features:
- Clear instruction cards with icons
- Step-by-step bullet points
- Color-coded by urgency:
- Blue: Informational/next action
- Yellow: Waiting for user/machine action
- Green: Success/ready states
- Red: Errors
- Tailored messages for each machine state
- Non-technical language
3. Pattern Upload Lock
Modified: src/components/FileUpload.tsx
Prevents users from accidentally changing the pattern after upload:
Features:
- Pattern file selection disabled after successful upload
- Clear notification explaining pattern is locked
- Users must complete or delete current pattern before uploading new one
- Prevents confusion and potential errors
4. Simplified Information Display
Modified Components:
MachineConnection.tsx: Reduced from 5 details to 2 essential onesFileUpload.tsx: Added filename, reformatted with better visual hierarchyProgressMonitor.tsx: Simplified time display, removed technical coordinates- All components use consistent card-style layouts with gray backgrounds
Changes:
- Removed technical details (MAC address, serial number, raw coordinates)
- Added thousand separators for numbers (e.g., "12,345 stitches")
- Changed time format from "5:30" to "5 min 30 sec" for clarity
- Larger progress percentage display (2xl font)
- Better visual grouping of related information
5. Contextual UI Visibility
Modified: src/App.tsx
Sections now show/hide based on workflow state:
Visibility Rules:
- Workflow Stepper: Only visible when connected
- Next Step Guide: Always visible, content changes based on state
- Machine Connection: Always visible
- Pattern File: Only visible when connected
- Sewing Progress: Only visible when pattern is uploaded
- Pattern Preview: Shows placeholder when no pattern loaded
6. Enhanced Visual Design
Changes:
- New gradient blue header with tagline
- Gray background for better card contrast
- Consistent rounded corners and shadows
- Better spacing and padding
- Color-coded status indicators throughout
- Improved typography hierarchy
7. Better Error Handling
Features:
- Errors displayed prominently at top of page
- Clear error messages with left border highlighting
- Error guidance in Next Step Guide
- Distinct error states in workflow
User Experience Flow
Before Improvements:
- All panels visible at once
- No clear indication of what to do next
- Technical information overwhelming
- Could change pattern after upload
- No visual workflow guidance
After Improvements:
- Clear step-by-step progression shown at top
- Next Step Guide tells users exactly what to do
- Only relevant sections visible for current step
- Pattern locked after upload (prevents mistakes)
- Simple, non-technical language throughout
- Visual feedback at every step
Technical Implementation
New Files Created:
src/components/WorkflowStepper.tsxsrc/components/NextStepGuide.tsx
Modified Files:
src/App.tsx- Main layout and state managementsrc/components/FileUpload.tsx- Added pattern locksrc/components/MachineConnection.tsx- Simplified displaysrc/components/ProgressMonitor.tsx- Improved readabilitysrc/utils/errorCodeHelpers.ts- Fixed TypeScript compatibility
State Management:
- Added
patternUploadedstate to track upload status - Pattern lock prevents re-upload without delete
- Automatic state detection from machine status
- Proper cleanup on disconnect/delete
Design Principles Applied
- Progressive Disclosure: Show only what's needed for current step
- Clarity Over Completeness: Hide technical details, show user-friendly info
- Visual Hierarchy: Use size, color, and spacing to guide attention
- Feedback: Always show current state and next action
- Error Prevention: Lock pattern after upload, confirm destructive actions
- Consistency: Unified visual language across all components
Accessibility Considerations
- Clear visual indicators with icons
- Color not the only differentiator (icons + text)
- Large touch targets for buttons
- Readable font sizes
- Semantic HTML structure
- Clear labels and descriptions
Testing Recommendations
- Test complete workflow from connect to complete
- Verify pattern cannot be changed after upload
- Check all machine states show correct guidance
- Test error scenarios display properly
- Verify responsiveness on different screen sizes
- Test with actual embroidery machine if possible
Future Enhancement Opportunities
- Add estimated time remaining during sewing
- Add pattern preview thumbnails in stepper
- Add sound notifications for state changes
- Add pattern history/favorites
- Add tutorial mode for first-time users
- Add keyboard shortcuts for power users
- Add offline mode indicators
- Add pattern size validation warnings