Skip to content

Commit ee03892

Browse files
committed
update clarity-outline js with new keybindings and update post
1 parent 9b756f3 commit ee03892

File tree

6 files changed

+1497
-1220
lines changed

6 files changed

+1497
-1220
lines changed

content/posts/keyboard-first-outlining.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,21 @@ Here’s what it looks like:
2020

2121
{{< clarity-outline-simple >}}
2222

23-
The component is designed for keyboard-first interaction. You can fly through your tasks with arrows, use `Alt+arrow` to indent or outdent, and `Alt+Tab` to collapse or expand. Add new items with `Alt+Enter` to quickly expand your outline. Cycle through todo states with `Shift+left/right` arrows. When an item is focused, actions can be done with a single key press: **E** to edit, **S** to change status, **P** to mark priority, **A** to assign, etc. Mouse users aren’t left out: hover actions expose the same controls with shortcut hints. You won’t see rich task descriptions, comment threads or file uploads here; I think those belong on dedicated item pages. This component is the fast, structured backbone you can plug into bigger systems.
23+
The component is designed for keyboard-first interaction.
24+
- Move focus through the outline with the arrow keys, or with Emacs
25+
(`Ctrl+F/B/N/P`) or Vi (`H/J/K/L`)
26+
bindings.
27+
- Move items around in the structure using the same keys but while holding the `Alt` modifier.
28+
- Collapse and expand items that have sub-items with `Alt+T`.
29+
- Add new todos with `Alt+Enter`.
30+
- Cycle through item status with `Shift+←/→`.
31+
32+
When an item is focused, actions can be done with a single key press: `E` to
33+
edit, `S` to change status, `P` to mark priority, `A` to assign, etc. Mouse
34+
users aren’t left out: hover actions expose the same controls with shortcut
35+
hints.
36+
37+
You won’t see rich task descriptions, comment threads or file uploads here; I think those belong on dedicated item pages. This component is the fast, structured backbone you can plug into bigger systems.
2438

2539
The outline takes JSON as input and emits events for every interaction. My plan is to drive it with [Datastar](https://data-star.dev/) with the server pushing live updates, but it can slot into any context.
2640

layouts/shortcodes/clarity-outline-simple.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
{"id":"8","text":"Fix the broken lamp","status":"CANCELLED"},
3333
{"id":"9","text":"Write blog post","status":"IN PROGRESS"}
3434
]'
35-
options='{"statusLabels": [{"label": "TODO", "isEndState": false}, {"label": "IN PROGRESS", "isEndState": false}, {"label": "DONE", "isEndState": true}, {"label": "CANCELLED", "isEndState": true}]}'>
35+
options='{"statusLabels":[{"label": "TODO", "isEndState": false}, {"label": "IN PROGRESS", "isEndState": false}, {"label": "DONE", "isEndState": true}, {"label": "CANCELLED", "isEndState": true}],
36+
"assignees": ["Alice", "Bob", "Charlie"],
37+
"tags": ["urgent", "bug", "feature"]}'>
3638
</clarity-outline>
3739
</div>

0 commit comments

Comments
 (0)