Repository navigation
Add sidebar project multi-select with group drag and context menu - #226
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Aligns the sidebar with Things 3 Mac: project rows can now be multi-selected, dragged as a group, and acted on as a group via the context menu. Area rows are not part of the selection.
Changes
New selection store (
@taskora/api)sidebarSelection.store.ts:ids(in selection order),anchorId, andorder(display order of sidebar project rows, registered by the sidebar).toggle(id, currentId)— ⌘/Ctrl+click; on the first multi-select, the currently open project is included.extendTo(id, currentId)— ⇧+click; selects the contiguous range from the anchor (defaults to the current project).sidebarSelectionGroup()— returns the group in display order, ornullwhen fewer than 2 rows are selected.sidebarContextMenuTargets(id)— right-clicking inside the selection targets the whole group; otherwise the selection is cleared and only that row is targeted.Sidebar behavior (
SidebarProjectSection,ProjectItem)useCollapseAfterDragStart), the drag overlay shows aDragCountBadge, and on drop the group replaces the dragged project in display order (expandProjectGroup).Group context menu (
ProjectContextMenu)Other
sidebarProjectLayout:removeProjectsandexpandProjectGrouphelpers for group drag.useProjectCompletion: newtoggleGroupplus a group-aware remaining-tasks dialog.ProjectMovePickeraccepts a partialcurrentso group moves don't highlight a location.CONTEXT.mddocuments the new Sidebar Selection domain concept; spec at.scratch/sidebar-multi-select/spec.md.Tests
sidebarSelection.store.test.ts: toggle/extend/group/context-menu targeting.SidebarProjectSection.test.tsx: group drag (collapse, ordered drop, per-project ownership writes, reorder after all writes), cancel restore, and dragging a non-selected project.sidebarProjectLayout.test.ts:removeProjects/expandProjectGroup.ProjectContextMenu.test.tsx: group menu item count, hidden single-project actions, group delete, grouped completion dialog, and group move.Out of scope