Skip to content

Add collapse/expand context menus for Bases Task List views#1791

Open
renatomen wants to merge 5 commits intocallumalpass:mainfrom
renatomen:feat/collapse-expand-buttons
Open

Add collapse/expand context menus for Bases Task List views#1791
renatomen wants to merge 5 commits intocallumalpass:mainfrom
renatomen:feat/collapse-expand-buttons

Conversation

@renatomen
Copy link
Copy Markdown
Contributor

@renatomen renatomen commented Apr 12, 2026

Summary

Adds collapsible groups and subgroups to Bases Task List grouped views, controlled via context menus and a configurable default collapsed state.

Context Menus

  • Right-click a primary group header: expand/collapse its subgroups
  • Right-click empty view area: expand/collapse all groups, or all groups and subgroups

Demo

Default Collapsed State

  • New "Default collapsed state" dropdown view option (Expanded/Collapsed)
  • Collapse state is preserved across re-renders via ephemeral state

Other Fixes

  • View options now re-read on every render so config changes take effect without restarting Obsidian
  • Search box is properly torn down when enableSearch is toggled off
  • Fixed expandedRelationshipFilterMode dropdown (Bases returns array indices as strings for string[] dropdowns)

Commits

  1. fix: Correct expandedRelationshipFilterMode dropdown value comparison
  2. feat: Add collapse/expand ALL GROUPS/SUBGROUPS option to context menus
  3. docs: Add demo animation

@renatomen renatomen marked this pull request as ready for review April 12, 2026 10:09
…s for Bases Task List views

Add collapsible groups and subgroups to Bases Task List grouped views,
controlled via context menus and a configurable default collapsed state.

Context menus:
- Right-click a primary group header: expand/collapse its subgroups
- Right-click empty view area: expand/collapse all groups, or all
  groups and subgroups

Default collapsed state:
- New "Default collapsed state" dropdown view option (Expanded/Collapsed)
- Collapse state is preserved across re-renders via ephemeral state
- Bases returns array indices as strings for string[] dropdown options

Other fixes:
- View options now re-read on every render so config changes take
  effect without restarting Obsidian
- Search box is properly torn down when enableSearch is toggled off
@renatomen renatomen force-pushed the feat/collapse-expand-buttons branch from 49b0321 to 6fd59e4 Compare April 27, 2026 02:15
renatomen and others added 3 commits April 27, 2026 14:28
…ions

BasesDropdownOption.options expects Record<string,string>, not string[].
Also updates the config.get() comparison to match the key returned by Bases
when using object-style options (returns key, not numeric index).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…llOptions type

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Bases returns dropdown selections as index strings ("0", "1") rather
than the option key. Map "1" to "Collapsed" to match the registered
options order, consistent with how expandedRelationshipFilterMode is
already handled.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant