Spaces:
Sleeping

puzzle-tool-suite / UI_GUIDE.md
ajith32
Initial Deployment
5b43d8e
|
Raw History Blame Contribute Delete
11.1 kB
# UI/UX Guide - Puzzle Validator
## Visual Layout
```
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ 🧩 PUZZLE VALIDATOR β”‚
β”‚ Upload your CSV file to validate puzzle entries β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ UPLOAD SECTION β”‚
β”‚ β”‚
β”‚ πŸ“ β”‚
β”‚ Click to upload CSV or drag and drop β”‚
β”‚ CSV file with 'Complete Phrase' and 'Puzzle' columns β”‚
β”‚ β”‚
β”‚ [Selected file: example.csv] β”‚
β”‚ β”‚
β”‚ [βœ“ Validate] [Clear] [⬇ Download] β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ VALIDATION IN PROGRESS ────────────────────┐
β”‚ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ β”‚
β”‚ Processing your file... β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ ERROR STATISTICS ────────────────────────┐
β”‚ β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚ β”‚ 100 β”‚ β”‚ 15 β”‚ β”‚ 85 β”‚ β”‚
β”‚ β”‚ Total β”‚ β”‚ Errors β”‚ β”‚ Valid β”‚ β”‚
β”‚ β”‚ Entries β”‚ β”‚ Entries β”‚ β”‚ Entries β”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ ERRORS FOUND (15) ───────────────────────────┐
β”‚ β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚ β”‚ Row β”‚ Phrase β”‚ Puzzle β”‚ECβ”‚ Error Description β”‚ β”‚
β”‚ β”œβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚
β”‚ β”‚ #1 β”‚ Hello World β”‚ H___... β”‚ 2β”‚ First letter not... β”‚ β”‚
β”‚ β”œβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚
β”‚ β”‚ #5 β”‚ Test Case β”‚ T___... β”‚ 6β”‚ Missing period β”‚ β”‚
β”‚ β”œβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚
β”‚ β”‚ #12 β”‚ Info Tech β”‚ I___... β”‚ 7β”‚ Unbalanced quotes β”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚ β”‚
β”‚ [⬇ Download Validated]β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
```
## User Workflow
### Step 1: Upload
```
User Action:
- Click on upload area
- OR Drag-and-drop CSV file
System Response:
- File name displayed
- "Validate" button appears
- Progress bar ready
```
### Step 2: Validate
```
User Action:
- Click "Validate" button
System Response:
- Progress bar animates
- Validation runs (backend processes file)
- Results appear when complete
```
### Step 3: Review
```
System Shows:
- Statistics cards (Total, Errors, Valid)
- Error table with details
- OR "All valid!" message if no errors
```
### Step 4: Download
```
User Action:
- Click "Download Validated CSV"
System Response:
- CSV file downloaded with:
* Original columns
* Error Code column
* Error Description column
```
## Color Scheme
```
Primary Colors:
- Purple-to-Blue Gradient: #667eea β†’ #764ba2
- Used for: Buttons, borders, accents
Status Colors:
- Valid/Success: #20c997 (Green)
- Error: #e74c3c (Red)
- Warning/Neutral: #f0f0f0 (Light Gray)
- Text: #333333 (Dark Gray)
Backgrounds:
- Main: White (#ffffff)
- Hover: Light Purple (#f8f9ff)
- Disabled: Light Gray (#e0e0e0)
```
## Interactive Elements
### Upload Section
```
Normal State:
β”Œβ”€ πŸ“ Click to upload or drag and drop ─┐
β”‚ CSV file with 'Complete Phrase'... β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
Hover State:
β”Œβ”€ πŸ“ Click to upload or drag and drop ─┐ ← Slight scale up
β”‚ CSV file with 'Complete Phrase'... β”‚ ← Slightly darker
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
Drag-Over State:
β”Œβ”€ πŸ“ Click to upload or drag and drop ─┐ ← More pronounced
β”‚ CSV file with 'Complete Phrase'... β”‚ ← Purple highlight
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
```
### Buttons
```
Default:
[βœ“ Validate] [Clear] [⬇ Download]
Hover:
[βœ“ Validate]↑ (with shadow)
[Clear]
[⬇ Download]↑ (with shadow)
Disabled:
[βœ“ Validating...] (grayed out, no hover effect)
Hover Color on Error Table:
β”‚ Entire row becomes light purple (#f8f9ff) β”‚
```
## Messages
### Success Message
```
βœ“ Validation completed successfully!
(Green background, auto-disappears after 5 seconds)
```
### Error Message
```
βœ— Validation error: [error details]
(Red background, auto-disappears after 5 seconds)
```
## Error Display Table
### Column Widths
```
β”Œβ”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ 8% β”‚ 20% β”‚ 20% β”‚ 10% β”‚ 42% β”‚
β”‚ Row# β”‚ Phrase β”‚ Puzzle β”‚ Code β”‚ Description β”‚
β””β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
```
### Error Code Styling
```
Error Code appears in red pill:
β”Œβ”€β”€β”€β”€β”€β”
β”‚2,4,7β”‚ ← Red background, white text, monospace font
β””β”€β”€β”€β”€β”€β”˜
```
## Responsive Design
### Desktop (> 768px)
- Full width container (max 1000px)
- Columns layout for stats
- Full error table with all columns
### Tablet (481px - 768px)
- Adjusted padding
- Smaller font sizes
- Wrapped button group
### Mobile (≀ 480px)
- Full-width buttons (stacked vertically)
- Single column stats
- Horizontal scroll on table
- Reduced padding and margins
## Animations
### Progress Bar
```
Width: 0% β†’ 100% (during validation)
Opacity pulse: 1 ↔ 0.7 (repeating)
Duration: 1.5 seconds
```
### Button Hover
```
Transform: translateY(-2px)
Box-shadow: Fade in from transparent
Duration: 300ms
```
### Message Fade
```
Appears: Instant
Duration: 5 seconds
Disappears: Fade out
```
### Loading Dots
```
. . .
Dots bounce up and down sequentially
Duration: 1.4 seconds total
```
## Accessibility Features
1. **Semantic HTML**: Proper heading hierarchy (h1, h3)
2. **Color Contrast**: High contrast for readability
3. **Focus States**: Clear focus indicators on buttons
4. **Alt Text**: Proper labels on form inputs
5. **ARIA Labels**: (Can be added for screen readers)
## File Upload Interaction
```
Click or Drop Flow:
1. User clicks upload area
↓
2. File picker dialog opens
↓
3. User selects CSV file
↓
4. File name appears below upload section
↓
5. "Validate" button appears
↓
6. User clicks "Validate"
↓
7. Progress bar shows animation
↓
8. Results display with error table
↓
9. "Download" button appears
```
## Error Code Legend
| Code | Color | Meaning |
|------|-------|---------|
| 1 | Red | Lock logic error |
| 2 | Red | Capitalization |
| 3 | Red | Structural mismatch |
| 4 | Red | Character mismatch |
| 5 | Red | Forbidden characters |
| 6 | Red | Missing period |
| 7 | Red | Unbalanced quotes |
| 0 | Green | Valid |
## Performance Indicators
- **File Upload**: Instant (file selected)
- **Validation**: 1-5 seconds (depending on file size)
- **Results Display**: Instant
- **Download**: Instant
## Screen States
### 1. Empty State
- Upload section visible
- No file info
- No buttons except for hidden validate/clear
- No results
### 2. File Selected State
- Upload section visible (user can change file)
- File name shown
- "Validate" button visible
- "Clear" button visible
- No progress bar
- No results
### 3. Validating State
- Upload section disabled
- Progress bar visible with animation
- "Validate" button disabled with spinner
- Results hidden
- "Clear" button visible
### 4. Results State - With Errors
- Upload section enabled (user can upload new file)
- Stats cards displayed
- Error table displayed
- "Download" button visible
- "Clear" button visible
- Success/error message shown
### 5. Results State - No Errors
- Upload section enabled
- "All valid!" message displayed instead of table
- "Download" button visible
- "Clear" button visible
---
**Design Philosophy**: Clean, modern, intuitive, and responsive interface focused on clarity and user feedback.