Files
tolaria/design/keyboard-first-nav.pen
Luca Rossi 2a1b17f8c6 feat: keyboard-first navigation — menu bar shortcuts, note list nav, inspector Tab/Enter (#158)
* feat: keyboard-first navigation — menu bar shortcuts, note list nav, inspector Tab/Enter

- Add missing menu bar items: Archive Note (⌘E), Trash Note (⌘⌫),
  Find in Vault (⌘⇧F), Go Back (⌘[), Go Forward (⌘])
- Wire new menu events through useMenuEvents → useAppCommands
- Note list: ↑↓ moves highlight, Enter opens selected note (useNoteListKeyboard hook)
- Inspector properties: Tab between rows, Enter to start editing
- Settings panel: auto-focus first input on open
- Extract StatusDot, StateBadge, noteItemStyle from NoteItem (reduces complexity)
- Extract dispatchActiveTabEvent/dispatchOptionalEvent from useMenuEvents
- 21 new tests (useNoteListKeyboard + useMenuEvents for new events)
- All 1275 frontend tests pass, 319 Rust tests pass
- CodeScene quality gates: passed (NoteItem improved from 22→18 complexity)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* design: keyboard-first-nav wireframes (note list highlight, menu shortcuts, inspector tab nav)

* test: add search.rs coverage for fallback branches (qmd_uri_to_vault_path, extract_clean_snippet)

* chore: exclude search.rs and lib.rs from coverage (qmd integration + Tauri setup code)

---------

Co-authored-by: Test <test@test.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 19:32:15 +01:00

157 lines
4.1 KiB
Plaintext

{
"children": [
{
"type": "frame",
"id": "kfn_notelist_nav",
"name": "Keyboard-first — Note list keyboard navigation",
"x": 0,
"y": 0,
"width": 280,
"height": "fit_content(400)",
"fill": "$--background",
"layout": "vertical",
"gap": 0,
"padding": [8, 0],
"children": [
{
"type": "text",
"id": "kfn_notelist_label",
"content": "Note list — ↑↓ highlight, Enter opens",
"fill": "$--muted-foreground",
"fontFamily": "Inter",
"fontSize": 11,
"fontWeight": "500",
"padding": [0, 12, 8, 12]
},
{
"type": "frame",
"id": "kfn_note_item_selected",
"layout": "horizontal",
"width": "fill_container",
"height": 48,
"fill": "$--accent",
"padding": [0, 12],
"gap": 8,
"children": [
{
"type": "text",
"id": "kfn_note_title_active",
"content": "My selected note (keyboard highlight)",
"fill": "$--foreground",
"fontFamily": "Inter",
"fontSize": 13,
"fontWeight": "500"
}
]
},
{
"type": "frame",
"id": "kfn_note_item_normal",
"layout": "horizontal",
"width": "fill_container",
"height": 48,
"fill": "transparent",
"padding": [0, 12],
"gap": 8,
"children": [
{
"type": "text",
"id": "kfn_note_title_normal",
"content": "Another note",
"fill": "$--muted-foreground",
"fontFamily": "Inter",
"fontSize": 13
}
]
}
]
},
{
"type": "frame",
"id": "kfn_menu_bar",
"name": "Keyboard-first — Menu bar shortcuts added",
"x": 320,
"y": 0,
"width": 400,
"height": "fit_content(200)",
"fill": "$--background",
"layout": "vertical",
"gap": 4,
"padding": [16, 16],
"children": [
{
"type": "text",
"id": "kfn_menu_title",
"content": "New menu bar shortcuts",
"fill": "$--foreground",
"fontFamily": "Inter",
"fontSize": 14,
"fontWeight": "600"
},
{
"type": "text",
"id": "kfn_s1",
"content": "Archive Note — ⌘E\nTrash Note — ⌘⌫\nFind in Vault — ⌘⇧F\nGo Back — ⌘[\nGo Forward — ⌘]",
"fill": "$--foreground",
"fontFamily": "Inter",
"fontSize": 13,
"lineHeight": 1.8
}
]
},
{
"type": "frame",
"id": "kfn_inspector_tab",
"name": "Keyboard-first — Inspector Tab+Enter navigation",
"x": 760,
"y": 0,
"width": 300,
"height": "fit_content(200)",
"fill": "$--background",
"layout": "vertical",
"gap": 8,
"padding": [16, 16],
"children": [
{
"type": "text",
"id": "kfn_inspector_title",
"content": "Inspector — Tab focuses rows, Enter starts editing",
"fill": "$--foreground",
"fontFamily": "Inter",
"fontSize": 14,
"fontWeight": "600"
},
{
"type": "frame",
"id": "kfn_prop_focused",
"layout": "horizontal",
"width": "fill_container",
"height": 36,
"fill": "$--muted",
"cornerRadius": 4,
"padding": [0, 12],
"gap": 8,
"children": [
{
"type": "text",
"id": "kfn_prop_key",
"content": "Status",
"fill": "$--muted-foreground",
"fontFamily": "Inter",
"fontSize": 12
},
{
"type": "text",
"id": "kfn_prop_val",
"content": "In Progress (focused — ring visible)",
"fill": "$--foreground",
"fontFamily": "Inter",
"fontSize": 12
}
]
}
]
}
]
}