feat: Add swimlane grouping by labels and assignees#7875
feat: Add swimlane grouping by labels and assignees#7875Pavlinchen wants to merge 5 commits intonextcloud:mainfrom
Conversation
Add horizontal swimlane rows that group cards by label or assignee, with a "No label" / "Unassigned" catchall lane at the bottom. Cards with multiple labels appear in every matching lane with a subtle duplicate badge. Lane order is drag-reorderable and persisted as a shared board setting via ConfigService (setAppValue), gated behind PERMISSION_EDIT. - New components: Swimlane.vue, SwimlaneHeader.vue - Grouping mode selector in Controls "View Modes" menu - Store: swimlane state, cardsByStackAndLane getter, lane ordering - Backend: swimlane config keys use setAppValue (shared, not per-user) - Tests: PHPUnit ConfigServiceTest, Cypress E2E swimlanesFeatures Closes nextcloud#32 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Admin <derpaulizist@gmail.com> Signed-off-by: Pavlinchen <paulm.schmidt@icloud.com>
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
Disclaimer
This PR was written mainly with LLM assistance (Claude Opus 4.7 max effort) for technical implementation.
Summary
Adds horizontal swimlane grouping to the board view.
Users can now group cards by labels or assignees via the existing "View Modes" menu. Each group renders as a collapsible horizontal row with its own set of stacks, showing only the cards that belong to that group.
Key behaviors:
setAppValue, gated byPERMISSION_EDIT)aria-expanded,aria-label, focus-visible stylesNo database changes — swimlanes are a computed view layer derived from existing card labels and assignee data.
Architecture
The implementation adds no new API endpoints or database tables. It extends the existing frontend state management and adds two new Vue components:
Swimlane.vueandSwimlaneHeader.vue; modifiedBoard.vue,Stack.vue,Controls.vue,CardBadges.vuecardsByStackAndLanegetter incard.js; swimlane order state + actions inmain.jsBoardService::enrichWithBoardSettings()to include swimlane config (3 newgetAppValuecalls);ConfigService::set()gates swimlane keys withPERMISSION_EDITsetAppValue(visible to all users, editable by board editors only). Collapse state remains per-user in localStorageThe existing
vue-smooth-dndContainer/Draggable pattern is reused for both within-lane card drag and lane reordering. Lane isolation usesgroup-namescoping ('stack-' + lane.key) to prevent cross-lane card drops.How it works
SwimlanecomponentsSwimlanerenders aSwimlaneHeader(with label color/avatar, card count, collapse toggle) and the same horizontal stack layoutlaneprop — when present, it usescardsByStackAndLaneto filter cards for that laneChanges
New files (4):
src/components/board/Swimlane.vue— Swimlane row wrapper (header + stacks)src/components/board/SwimlaneHeader.vue— Lane header with label/avatar, count, collapse, drag handletests/unit/Service/ConfigServiceTest.php— PHPUnit tests for swimlane config storage and permission gatingcypress/e2e/swimlanesFeatures.js— Cypress E2E tests for swimlane grouping interactionsModified files (8):
src/components/board/Board.vue— Conditional flat vs swimlane rendering, lane computation, lane reorder DnD (editor-gated)src/components/board/Stack.vue— Acceptlaneprop, lane-scoped card filtering and DnD group namessrc/components/Controls.vue— "Group by" radio selector in View Modes menu (disabled for non-editors)src/components/cards/CardBadges.vue— Duplicate lane badgesrc/store/card.js—cardsByStackAndLanegettersrc/store/main.js— Swimlane mode/order state, mutations, actions, config loadinglib/Service/BoardService.php— Swimlane settings in board enrichment (shared viagetAppValue)lib/Service/ConfigService.php— Swimlane config keys gated byPERMISSION_EDIT, stored viasetAppValueChecklist