Skip to content

Commit 6e88979

Browse files
improvements
1 parent 06be268 commit 6e88979

4 files changed

Lines changed: 86 additions & 31 deletions

File tree

client/help-content.html

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,36 @@
1-
<div>
1+
<div class="help-content">
22
<h2>Task Board Help</h2>
3-
<h3>Columns</h3>
4-
<p>The board has four columns representing task statuses: <strong>Pending</strong>, <strong>In Progress</strong>, <strong>Blocked</strong>, and <strong>Done</strong>.</p>
3+
4+
<h3>Board Overview</h3>
5+
<p>The board is organized into four columns representing task statuses:</p>
6+
<ul>
7+
<li><strong>Pending</strong> — Tasks waiting to be started</li>
8+
<li><strong>In Progress</strong> — Tasks currently being worked on</li>
9+
<li><strong>Blocked</strong> — Tasks that are stuck or waiting on dependencies</li>
10+
<li><strong>Done</strong> — Completed tasks</li>
11+
</ul>
512

613
<h3>Adding Tasks</h3>
7-
<p>Click the <strong>+</strong> button in any column header to add a new task to that column. Enter a title and optionally a description, then click <strong>Add</strong>.</p>
14+
<p>Click the <strong>+</strong> button in any column header to add a new task. Fill in:</p>
15+
<ul>
16+
<li><strong>Title</strong> — A short name for the task (required)</li>
17+
<li><strong>Description</strong> — Additional details (optional)</li>
18+
<li><strong>Priority</strong> — Choose High, Medium, or Low from the dropdown</li>
19+
</ul>
20+
<p>Click <strong>Add</strong> to create the task, or <strong>Cancel</strong> to discard.</p>
821

922
<h3>Moving Tasks</h3>
10-
<p>Drag and drop cards between columns to change their status. Cards can be reordered within a column as well.</p>
23+
<p><strong>Drag and drop</strong> task cards between columns to change their status. Cards can also be reordered within a column. A dashed placeholder shows where the card will land.</p>
24+
25+
<h3>Priority</h3>
26+
<p>Each task has a color-coded priority badge:</p>
27+
<ul>
28+
<li><strong style="color: var(--Colors-Base-Accent-Red-500);">HIGH</strong> — Urgent, needs immediate attention</li>
29+
<li><strong style="color: var(--Colors-Base-Accent-Orange-500);">MEDIUM</strong> — Normal priority</li>
30+
<li><strong style="color: var(--Colors-Base-Neutral-800);">LOW</strong> — Can wait, lower urgency</li>
31+
</ul>
32+
<p><strong>Click</strong> a priority badge on any task card to cycle through the levels (Low → Medium → High).</p>
1133

12-
<h3>Persistence</h3>
13-
<p>All tasks are saved in your browser's local storage and will persist across page refreshes.</p>
34+
<h3>Data Storage</h3>
35+
<p>All tasks are saved in your browser's local storage and persist across page refreshes.</p>
1436
</div>

client/task-board.css

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ html, body.bespoke {
6464
height: 20px;
6565
padding: 0 6px;
6666
border-radius: 10px;
67-
background: var(--Colors-Stroke-Default);
68-
color: var(--Colors-Text-Body-Default);
67+
background: color-mix(in srgb, var(--Colors-Primary-Default) 15%, transparent);
68+
color: var(--Colors-Text-Body-Strongest);
6969
font-size: 11px;
7070
font-weight: 600;
7171
}
@@ -105,10 +105,10 @@ html, body.bespoke {
105105
flex-shrink: 0;
106106
}
107107

108-
.bespoke .status-dot.pending { background: var(--Colors-Base-Neutral-500); }
109-
.bespoke .status-dot.inprogress { background: var(--Colors-Base-Primary-500); }
110-
.bespoke .status-dot.blocked { background: var(--Colors-Base-Error-500); }
111-
.bespoke .status-dot.done { background: var(--Colors-Base-Success-500); }
108+
.bespoke .status-dot.pending { background: var(--Colors-Base-Neutral-600); }
109+
.bespoke .status-dot.inprogress { background: var(--Colors-Primary-Default); }
110+
.bespoke .status-dot.blocked { background: var(--Colors-Alert-Error-Default); }
111+
.bespoke .status-dot.done { background: var(--Colors-Alert-Success-Default); }
112112

113113
/* ===== TASK CARD ===== */
114114

@@ -160,26 +160,32 @@ html, body.bespoke {
160160

161161
.bespoke .task-card-priority {
162162
font-size: 10px;
163-
font-weight: 600;
164-
padding: 1px 6px;
165-
border-radius: 8px;
163+
font-weight: 700;
164+
padding: 2px 8px;
165+
border-radius: 10px;
166166
text-transform: uppercase;
167-
letter-spacing: 0.3px;
167+
letter-spacing: 0.4px;
168+
cursor: pointer;
169+
transition: opacity 0.1s;
170+
}
171+
172+
.bespoke .task-card-priority:hover {
173+
opacity: 0.8;
168174
}
169175

170176
.bespoke .task-card-priority.high {
171-
background: color-mix(in srgb, var(--Colors-Base-Error-500) 15%, transparent);
172-
color: var(--Colors-Base-Error-500);
177+
background: var(--Colors-Base-Accent-Red-500);
178+
color: #fff;
173179
}
174180

175181
.bespoke .task-card-priority.medium {
176-
background: color-mix(in srgb, var(--Colors-Base-Warning-500) 15%, transparent);
177-
color: var(--Colors-Base-Warning-600);
182+
background: var(--Colors-Base-Accent-Orange-500);
183+
color: #fff;
178184
}
179185

180186
.bespoke .task-card-priority.low {
181-
background: color-mix(in srgb, var(--Colors-Base-Success-500) 15%, transparent);
182-
color: var(--Colors-Base-Success-600);
187+
background: var(--Colors-Base-Neutral-800);
188+
color: #fff;
183189
}
184190

185191
/* ===== DROP PLACEHOLDER ===== */
@@ -205,6 +211,12 @@ html, body.bespoke {
205211

206212
.bespoke .add-task-form .input {
207213
font-size: 13px;
214+
padding: 6px 8px;
215+
}
216+
217+
.bespoke .add-task-form select.input {
218+
appearance: auto;
219+
cursor: pointer;
208220
}
209221

210222
.bespoke .add-task-form-actions {

client/task-board.js

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@ const SEED_TASKS = [
1010
{ id: 't2', title: 'Prepare rollback runbook', desc: 'Document step-by-step rollback procedure including feature flag and DB migration revert.', status: 'pending', assignee: 'Alex R.', priority: 'high' },
1111
{ id: 't3', title: 'Send customer notification email', desc: 'Notify enterprise customers about the upcoming v2.0 release and expected downtime window.', status: 'done', assignee: 'Marketing', priority: 'medium' },
1212
{ id: 't4', title: 'Update API documentation', desc: 'Add docs for new endpoints introduced in v2.0.', status: 'inprogress', assignee: 'Jordan K.', priority: 'medium' },
13-
{ id: 't5', title: 'Investigate /api/users 500 errors', desc: 'Datadog showing ~2% error rate on /api/users since 8:45 AM. Possible race condition in connection pooling.', status: 'inprogress', assignee: 'Alex R.', priority: 'high' },
14-
{ id: 't6', title: 'Review onboarding flow copy', desc: 'Final copy review for the updated first-run experience.', status: 'done', assignee: 'Sarah C.', priority: 'low' },
15-
{ id: 't7', title: 'Deploy marketing landing page', desc: 'Blocked on engineering go/no-go decision at 9 AM.', status: 'blocked', assignee: 'Marketing', priority: 'medium' },
16-
{ id: 't8', title: 'Post launch announcement in #general', desc: 'Prepare Slack message for all-hands after successful deploy.', status: 'pending', assignee: 'Sarah C.', priority: 'low' }
13+
{ id: 't5', title: 'Review onboarding flow copy', desc: 'Final copy review for the updated first-run experience.', status: 'done', assignee: 'Sarah C.', priority: 'low' },
14+
{ id: 't6', title: 'Deploy marketing landing page', desc: 'Blocked on engineering go/no-go decision at 9 AM.', status: 'blocked', assignee: 'Marketing', priority: 'medium' },
15+
{ id: 't7', title: 'Post launch announcement in #general', desc: 'Prepare Slack message for all-hands after successful deploy.', status: 'pending', assignee: 'Sarah C.', priority: 'low' }
1716
];
1817

1918
const DATA_VERSION = 1;
@@ -111,6 +110,11 @@ function renderAddForm(colId) {
111110
<form class="add-task-form" data-col="${colId}">
112111
<input type="text" class="input" name="title" placeholder="Task title" autocomplete="off" required />
113112
<input type="text" class="input" name="desc" placeholder="Description (optional)" autocomplete="off" />
113+
<select class="input" name="priority">
114+
<option value="high">High</option>
115+
<option value="medium" selected>Medium</option>
116+
<option value="low">Low</option>
117+
</select>
114118
<div class="add-task-form-actions">
115119
<button type="submit" class="button button-primary">Add</button>
116120
<button type="button" class="button button-text add-task-cancel">Cancel</button>
@@ -126,14 +130,14 @@ function handleAddClick(colId) {
126130
if (form) form.focus();
127131
}
128132

129-
function handleAddSubmit(colId, title, desc) {
133+
function handleAddSubmit(colId, title, desc, priority) {
130134
const id = `t${nextId++}`;
131-
tasks.push({ id, title, desc: desc || '', status: colId, assignee: '', priority: 'medium' });
135+
tasks.push({ id, title, desc: desc || '', status: colId, assignee: '', priority: priority || 'medium' });
132136
saveTasks();
133137
_addFormColumn = null;
134138
renderBoard();
135139
if (_context.emit) {
136-
_context.emit('task:added', { taskId: id, title, desc: desc || '', status: colId });
140+
_context.emit('task:added', { taskId: id, title, desc: desc || '', status: colId, priority });
137141
}
138142
}
139143

@@ -274,14 +278,30 @@ export function init(context = {}) {
274278
}
275279
}, { signal });
276280

281+
container.addEventListener('click', (e) => {
282+
const badge = e.target.closest('.task-card-priority');
283+
if (!badge) return;
284+
const card = badge.closest('.task-card');
285+
if (!card) return;
286+
e.stopPropagation();
287+
const task = tasks.find(t => t.id === card.dataset.taskId);
288+
if (!task) return;
289+
const cycle = ['low', 'medium', 'high'];
290+
const idx = cycle.indexOf(task.priority);
291+
task.priority = cycle[(idx + 1) % cycle.length];
292+
saveTasks();
293+
renderBoard();
294+
}, { signal });
295+
277296
container.addEventListener('submit', (e) => {
278297
e.preventDefault();
279298
const form = e.target.closest('.add-task-form');
280299
if (!form) return;
281300
const title = form.querySelector('input[name="title"]').value.trim();
282301
if (!title) return;
283302
const desc = form.querySelector('input[name="desc"]').value.trim();
284-
handleAddSubmit(form.dataset.col, title, desc);
303+
const priority = form.querySelector('select[name="priority"]').value;
304+
handleAddSubmit(form.dataset.col, title, desc, priority);
285305
}, { signal });
286306
}
287307

vite.config.module.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const copyModuleAssets = {
99
mkdirSync(outDir, { recursive: true });
1010
copyFileSync(resolve(__dirname, 'client/content.html'), resolve(outDir, 'content.html'));
1111
copyFileSync(resolve(__dirname, 'client/task-board.css'), resolve(outDir, 'simulation.css'));
12+
copyFileSync(resolve(__dirname, 'client/help-content.html'), resolve(outDir, 'help-content.html'));
1213
}
1314
};
1415

0 commit comments

Comments
 (0)