picasso-skill 2.7.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,162 +0,0 @@
1
- # Interaction Design Reference
2
-
3
- ## Table of Contents
4
- 1. Form Design
5
- 2. Focus Management
6
- 3. Loading Patterns
7
- 4. Empty States
8
- 5. Error Handling
9
- 6. UX Writing
10
- 7. Common Mistakes
11
-
12
- ---
13
-
14
- ## 1. Form Design
15
-
16
- ### Input Fields
17
- - Use visible labels above inputs, not placeholder-only labels (placeholders disappear on focus)
18
- - Input height: 40-48px for desktop, 48px minimum for touch
19
- - Group related fields visually (name + email, street + city + zip)
20
- - Show validation inline, not in an alert after submission
21
- - Use `inputmode` attribute for mobile keyboards: `inputmode="email"`, `inputmode="numeric"`, `inputmode="tel"`
22
- - Auto-focus the first field on page load when the form is the primary task
23
-
24
- ### Field States
25
- Every input needs four visible states:
26
- 1. **Default**: subtle border, neutral background
27
- 2. **Focus**: accent border (2px), subtle glow or shadow
28
- 3. **Error**: error-colored border, inline error message below the field
29
- 4. **Disabled**: reduced opacity (0.5), `cursor: not-allowed`
30
-
31
- ### Buttons
32
- - Primary action: filled, high contrast (accent color)
33
- - Secondary action: outlined or ghost (border only)
34
- - Destructive action: red/error color, requires confirmation for irreversible actions
35
- - Button text: verb-first ("Save changes", "Create project"), never "Submit" or "Click here"
36
- - Loading state: replace text with spinner or use `aria-busy="true"`, disable the button to prevent double-submission
37
-
38
- ---
39
-
40
- ## 2. Focus Management
41
-
42
- ### Focus Indicators
43
- Never remove focus outlines without replacement. Use a visible, high-contrast focus ring:
44
- ```css
45
- :focus-visible {
46
- outline: 2px solid var(--accent);
47
- outline-offset: 2px;
48
- }
49
- ```
50
-
51
- Use `:focus-visible` (not `:focus`) to show focus rings only for keyboard navigation, not mouse clicks.
52
-
53
- ### Focus Trapping
54
- Modal dialogs must trap focus within them. When a modal opens:
55
- 1. Move focus to the first focusable element inside
56
- 2. Tab cycles within the modal
57
- 3. Escape closes the modal
58
- 4. Focus returns to the trigger element on close
59
-
60
- ### Skip Links
61
- Add a skip-to-content link as the first focusable element:
62
- ```html
63
- <a href="#main-content" class="skip-link">Skip to content</a>
64
- ```
65
- ```css
66
- .skip-link {
67
- position: absolute;
68
- top: -100%;
69
- left: 0;
70
- }
71
- .skip-link:focus {
72
- top: 0;
73
- z-index: 1000;
74
- }
75
- ```
76
-
77
- ---
78
-
79
- ## 3. Loading Patterns
80
-
81
- ### Skeleton Screens
82
- Replace content with gray shapes that match the expected layout. This feels faster than a spinner because the user can see the structure forming.
83
-
84
- ### Progressive Loading
85
- Show content as it arrives. Do not wait for everything to load before showing anything. Use `Suspense` boundaries in React to show parts of the page while others load.
86
-
87
- ### Optimistic Updates
88
- For user-initiated actions (like, save, delete), update the UI immediately and reconcile with the server response. Show a subtle undo option if the server rejects the action.
89
-
90
- ### Spinner vs. Skeleton
91
- - **Spinner**: Use for actions that take 1-3 seconds (button submissions, API calls). Place inside the triggering element.
92
- - **Skeleton**: Use for content areas that take 0.5-5 seconds to load. Match the shape of the expected content.
93
- - **Progress bar**: Use for operations that take 5+ seconds with measurable progress (file uploads, multi-step processes).
94
-
95
- ---
96
-
97
- ## 4. Empty States
98
-
99
- Empty states are an opportunity, not a placeholder. They should:
100
- 1. Explain what this area will contain once populated
101
- 2. Provide a clear action to get started
102
- 3. Optionally include an illustration or icon for warmth
103
-
104
- ```
105
- No projects yet.
106
- Create your first project to get started.
107
- [+ Create Project]
108
- ```
109
-
110
- Never show a blank page, an error message, or raw "null" / "undefined" in place of empty content.
111
-
112
- ---
113
-
114
- ## 5. Error Handling
115
-
116
- ### Inline Errors
117
- Show errors next to the element that caused them, not in a modal or toast. Use the error color for the field border and display the message directly below.
118
-
119
- ### Error Messages
120
- - Be specific: "Email address must include an @ symbol" not "Invalid input"
121
- - Be helpful: suggest the fix, not just the problem
122
- - Be human: "We couldn't find that page" not "404 Not Found"
123
-
124
- ### Network Errors
125
- Show a non-blocking banner or inline message with a retry action. Never show a raw error object or stack trace.
126
-
127
- ### Form Validation
128
- Validate on blur (when the user leaves a field), not on every keystroke. Show success indicators for valid fields (subtle checkmark or green border).
129
-
130
- ---
131
-
132
- ## 6. UX Writing
133
-
134
- ### Buttons
135
- - Use action verbs: "Save", "Send", "Create", "Delete"
136
- - Be specific: "Save changes" > "Save", "Send message" > "Send"
137
- - Match the action to the context: "Place order" not "Submit"
138
-
139
- ### Labels
140
- - Clear and concise: "Full name" not "Please enter your full name"
141
- - Avoid jargon: "Phone number" not "Primary contact number"
142
-
143
- ### Confirmations
144
- - State what happened: "Project created successfully"
145
- - Provide next step if relevant: "Project created. Add your first task?"
146
-
147
- ### Destructive Actions
148
- - State what will happen: "This will permanently delete 3 files"
149
- - Require explicit confirmation: "Type DELETE to confirm"
150
- - Provide an out: "Cancel" should be more prominent than "Delete"
151
-
152
- ---
153
-
154
- ## 7. Common Mistakes
155
-
156
- - Placeholder text as the only label (disappears on focus, inaccessible)
157
- - Disabling the submit button before all fields are filled (users do not know which field is missing)
158
- - Using toast notifications for errors (the user may not see them, they disappear)
159
- - No loading feedback after clicking a button (user clicks again, causing duplicate submissions)
160
- - Custom scrollbars that break native scroll behavior
161
- - Hover-only interactions with no keyboard or touch equivalent
162
- - Alert/confirm dialogs that block the entire page for minor confirmations