super-productivity/docs/wiki
Het Savani baaafbab44
feat:Add a keyboard shortcut to collapse/expand groups (#7370)
* feat:Add a keyboard shortcut to collapse/expand groups

* fix(collapsible): scope group behavior to isGroup and address review feedback

* fix(collapsible): scope group behavior, fix a11y focus, clean CSS, and update docs

* feat(work-view): apply isGroup to Overdue/Later/Done/Recurring sections

Aligns implementation with the wiki keyboard-shortcuts docs added in this
PR — those sections are described as participating in the expand/collapse-all
group shortcuts but were missing the [isGroup]="true" input.

* feat(tasks): ArrowLeft on top-level task collapses parent group

When a top-level task (no parent) is focused and the existing arrow
handling would otherwise call focusPrevious, hand off to the closest
ancestor collapsible group instead: collapse it and move focus to the
group header. Makes the new group shortcuts reachable from the normal
task-driven keyboard flow rather than requiring a Tab to the header.

Sub-tasks and selected-task hide-detail behavior are unchanged.

* feat(collapsible): ArrowUp/Down on group header focuses adjacent task

When a group header is focused, ArrowDown moves focus into the next
<task> element in document order (the first task of the group when
expanded; the next group's first task when collapsed). ArrowUp moves
focus to the previous task. Pairs with the ArrowLeft hand-off so the
group shortcut and task navigation form a single continuous keyboard
flow.

* feat(tasks): ArrowUp/Down on group-edge task focuses the header

ArrowUp on the first task of a group focuses the current group's
header; ArrowDown on the last task focuses the next group's header.
Routed through new handleArrowUp/handleArrowDown methods so other
focusPrevious/focusNext callsites (move-to-backlog, etc.) keep their
existing semantics.

* refactor(util): extract findAdjacentFocusable for arrow nav

Three places had near-identical DOM-walking logic for "find the next/prev
focusable element across tasks and group headers". Consolidates them
into a single utility with 9 unit tests, plus a shared GROUP_NAV_SELECTOR
constant exported from collapsible.component.

Behavior change: ArrowUp/Down on a group header now considers other
collapsed group headers as next-focusable (previously walked only across
<task> elements). For an all-collapsed list, ArrowDown on a header now
moves to the next header instead of skipping to a far-away task.

* refactor: trim findAdjacentFocusable + tighten collapsible API surface

Multi-agent review consensus:
- Drop the compareDocumentPosition fallback in findAdjacentFocusable.
  Both real callers pass an element matching the selector; the fallback
  branch only existed to satisfy a synthetic test. Util shrinks to ~10
  lines of obvious code.
- Re-privatize setAllGroupExpanded and expandIfCollapsed — neither is
  called from outside CollapsibleComponent.
- Scope focusHeader's selector to ':scope > .collapsible-header' so a
  nested collapsible projected through ng-content can't steal focus.

---------

Co-authored-by: Johannes Millan <johannes.millan@gmail.com>
2026-04-27 14:38:44 +02:00
..
assets docs(wiki): initial revision (v0.1) 2026-01-20 03:04:08 -08:00
0.-Meta-Diataxis.md docs(wiki) v0.2: refactor and populate meta notes (#6134) 2026-01-24 21:14:29 +01:00
0.00-Wiki-Structure-and-Organization.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
0.01-Style-Guide.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
0.02-Wiki-QA-and-Maintenance.md docs(wiki) v0.2: refactor and populate meta notes (#6134) 2026-01-24 21:14:29 +01:00
1.00-Quickstarts.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
1.01-First-Steps.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
1.02-Configure-Data-Synchronization.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
2.00-How_To.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
2.01-Downloads and Install.md docs/wiki content v0.8 (#7068) 2026-04-01 12:40:28 +02:00
2.02-Restore-Data-From-Backup.md docs(wiki): lint headings and lists 2026-02-16 16:23:32 +01:00
2.03-Add-Tasks.md docs(wiki): lint headings and lists 2026-02-16 16:23:32 +01:00
2.04-Manage-Subtasks.md docs(wiki): lint headings and lists 2026-02-16 16:23:32 +01:00
2.05-Manage-Scheduled-Tasks.md docs(wiki): lint headings and lists 2026-02-16 16:23:32 +01:00
2.06-Manage-Repeating-Tasks.md docs(wiki): lint headings and lists 2026-02-16 16:23:32 +01:00
2.07-Manage-Task-Integrations.md docs(wiki): lint headings and lists 2026-02-16 16:23:32 +01:00
2.08-Choose-Sync-Backend.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
2.09-Configure-Sync-Backend.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
2.10-Configure-Obsidian-for-Wiki-Contributions.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
2.11-Run-the-Development-Server.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
2.12-Package-the-App.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
2.13-Run-with-Docker.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
2.14-Build-for-Android.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
2.15-Develop-a-Plugin.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
2.16-Set-Up-Development-Environment.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
2.17-Add-a-New-Issue-Integration.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
2.18-Contribute-Translations.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
3.00-Reference.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
3.01-API.md fix(api): reject inherited fields when creating subtask via REST 2026-04-25 22:36:14 +02:00
3.02-Settings-and-Preferences.md docs/wiki content v0.4 (#6257) 2026-01-29 17:35:38 +01:00
3.03-Keyboard-Shortcuts.md feat:Add a keyboard shortcut to collapse/expand groups (#7370) 2026-04-27 14:38:44 +02:00
3.04-Short-Syntax.md docs/wiki content v0.4 (#6257) 2026-01-29 17:35:38 +01:00
3.05-Web-App-vs-Desktop.md docs(wiki): lint style 2026-02-04 14:45:00 +01:00
3.06-User-Data.md Feat/plugin UI kit (#6362) 2026-02-04 18:18:22 +01:00
3.07-Issue-Integration-Comparison.md feat(gitea): add label-based include and exclude filters (#7359) 2026-04-26 19:10:18 +02:00
3.08-Sync-Integration-Comparison.md docs(wiki): lint style 2026-02-04 14:45:00 +01:00
3.09-Theming.md docs/wiki content v0.9 (#7116) 2026-04-09 19:36:23 +02:00
3.97-Obsidian-Linter-Config-MD.md docs/wiki content v0.4 (#6257) 2026-01-29 17:35:38 +01:00
3.98-Obsidian-Linter-Config-YAML.md docs/wiki content v0.4 (#6257) 2026-01-29 17:35:38 +01:00
3.99-Other.md docs(wiki) v0.2: refactor and populate meta notes (#6134) 2026-01-24 21:14:29 +01:00
4.00-Concepts.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
4.01-The-Today-View.md docs(wiki): normalize tables and rework ToC 2026-02-04 14:45:00 +01:00
4.02-Inbox-View.md docs/wiki content v0.3 (#6231) 2026-01-28 16:11:22 +01:00
4.03-Planner-View.md docs(wiki): normalize tables and rework ToC 2026-02-04 14:45:00 +01:00
4.04-Schedule-View.md docs(wiki): add Repeating Tasks section and update references across multiple documents 2026-02-04 14:45:00 +01:00
4.05-Board-View.md docs(wiki): normalize tables and rework ToC 2026-02-04 14:45:00 +01:00
4.06-Project-View.md docs(wiki): normalize tables and rework ToC 2026-02-04 14:45:00 +01:00
4.07-Tag-View.md docs(wiki): normalize tables and rework ToC 2026-02-04 14:45:00 +01:00
4.07a-Tags_Eat-the-Frog.md docs/wiki content v0.3 (#6231) 2026-01-28 16:11:22 +01:00
4.07b-Tags_Ordinal-Priorities.md docs/wiki content v0.3 (#6231) 2026-01-28 16:11:22 +01:00
4.08-Time-Estimates.md docs(wiki): add How Time Is Logged section 2026-02-04 14:45:00 +01:00
4.09-Task-Attributes.md docs(wiki): substantial addition of integrations (issue and sync) 2026-02-04 14:45:00 +01:00
4.10-Task-Notes.md docs(wiki): add Task Notes 2026-02-04 14:45:00 +01:00
4.11-Subtasks.md docs(wiki): add Repeating Tasks section and update references across multiple documents 2026-02-04 14:45:00 +01:00
4.12-Scheduled-Tasks.md docs(wiki): added Scheduled Tasks; updated references in multiple sections 2026-02-04 14:45:00 +01:00
4.13-Repeating-Tasks.md docs(wiki): lint style 2026-02-04 14:45:00 +01:00
4.14-How-Time-Is-Logged.md docs(wiki): lint style 2026-02-04 14:45:00 +01:00
4.15-Timers-and-Focus-Mode.md docs(wiki): lint style 2026-02-04 14:45:00 +01:00
4.16-Break-Reminders.md docs(wiki): add Reminders and Idle Time 2026-02-04 14:45:00 +01:00
4.17-Idle-Time.md docs(wiki): lint style 2026-02-04 14:45:00 +01:00
4.18-Reflection.md docs(wiki): add Metrics 2026-02-04 14:45:00 +01:00
4.19-Metrics.md docs(wiki): add Metrics 2026-02-04 14:45:00 +01:00
4.20-Task-Archiving.md docs(wiki): add Task Archiving section and update references across multiple documents 2026-02-04 14:45:00 +01:00
4.21-Worklog.md docs(wiki): add new notes for Quick History and Worklog 2026-02-04 14:45:00 +01:00
4.22-Quick-History.md docs(wiki): normalize tables and rework ToC 2026-02-04 14:45:00 +01:00
4.23-Managing-Your-Data.md docs(wiki): substantial addition of integrations (issue and sync) 2026-02-04 14:45:00 +01:00
4.24-Integrations.md Feat/start of next day (#6565) 2026-02-21 12:47:19 +01:00
_Footer.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
_Sidebar.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
Home.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00