Repository navigation
feat: Add swimlane grouping by labels and assignees - #7875
Pavlinchen wants to merge 16 commits into
Conversation
|
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.) |
|
Force pushed new (rebased) version to incorporate GanttView |
|
on it! |
grnd-alt
left a comment
There was a problem hiding this comment.
Hey, thanks for your pr and the much appreciated work you did here.
Did not review the code fully but wanted to leave some comments from testing:
- there's a lot of layout shift when cards are moved between stacks as the column width changes.
- the order of lanes randomly changes when moving in columns in one lane
- the "order by" setting is persisted between site refreshes but the settings radio button's don't reflect it after refresh
- more of an opinion: I don't know if it's really necessary to have the column names listed for every lane, and them having different widths per lane seems counter-intuitive as well (but that's more of a design question idk what's better here)
| public function __construct( | ||
| private readonly IConfig $config, | ||
| private readonly IGroupManager $groupManager, | ||
| private readonly PermissionService $permissionService, |
There was a problem hiding this comment.
that's a circular dependency and breaks the app
|
Hello again & thanks for the patience.
|
|
Hi @grnd-alt, following up here. The June revision (20dbf48) covers the points from your May review. Is this PR something this project wants? If the answer is yes: which base should I target? So I can rebase onto main as it stands and or stack on top of #8259 - lmk Thanks in advance & |
|
@Pavlinchen I must say, I personally do not see a need for swimlanes to be honest. But it seems to be somewhat wanted by the community as there's a 10year old issue with some likes about it. I am open to have it in, but I do see the risk of increased complexity and maintenance cost, especially since we have the gantt chart which is in a not so good state performance whise right now. So if you are motivated to have it in and think you'll get it in a very good state that's easily maintainable, I would say go on! In regards to the rebase, I am currently mainly working on a refactor to move to vue3: #8276 The pr you mentioned is incorporated into the vue3 rewrite I would advise you to wait until that is merged. |
|
Will pick this back up in ~4 weeks |
Groups cards into horizontal lanes by label or assignee, with a "No label" / "Unassigned" catchall lane. A card with several labels shows up in every matching lane and carries a badge. The flat board stays the default. Mode and lane order are shared board settings, stored as three columns on deck_boards. ConfigController routes them to BoardService, which validates them once the EDIT permission check has passed. Closes nextcloud#32 Signed-off-by: Pavlinchen <69079839+Pavlinchen@users.noreply.github.com>
20dbf48 to
8db86c2
Compare
|
Hi @grnd-alt, thanks for your patience. There have been quite a few changes, so here's a quick overview
Mode and lane order also moved from app config entries to three |
- Lanes are as wide as their columns, so narrow windows no longer clip the last columns inside smooth-dnd's overflow: hidden wrapper. - Header and lane columns ignore their content width, so a long card or stack title no longer shifts lane columns against the header row. - Cloned card containers in the lane ghost no longer catch the drop point, so dragging a lane downwards finds its target again. - Cypress covers all three cases. Signed-off-by: Pavlinchen <69079839+Pavlinchen@users.noreply.github.com>
setSwimlaneSetting moved the board ETag but fired no BoardUpdatedEvent, so the live update listener sent no update to other open tabs. They only saw the change after a reload and could overwrite it. It now dispatches BoardUpdatedEvent, like other board updates. Signed-off-by: Pavlinchen <69079839+Pavlinchen@users.noreply.github.com>
Everything else on an archived board is read-only, but the grouping switches and lane drag still wrote to the board. setSwimlaneSetting now throws the same StatusException as StackService and LabelService. The view menu disables the switches, and the lane drag handle is hidden. Collapsing a lane stays possible, it is stored per user in the browser. Signed-off-by: Pavlinchen <69079839+Pavlinchen@users.noreply.github.com>
Every Stack instance added a window mousemove listener when it mounted. In the swimlane view there is one instance per lane and list, so a large board kept hundreds of listeners that did nothing unless their own list was the drag source. The listener is now added on dragStart and removed on dragEnd or unmount, so an idle board has none. Signed-off-by: Pavlinchen <69079839+Pavlinchen@users.noreply.github.com>
smooth-dnd sends dragStart and dragEnd to every container, not only to the source, so the listener exists while any drag runs on the board. The test now fails if a mounted hook brings back the permanent listener. Signed-off-by: Pavlinchen <69079839+Pavlinchen@users.noreply.github.com>
Entries in swimlaneUserOrder were bare uids, so a user and a group with the same id shared one lane. They are now "<type>:<participant>" strings and labels are stored as ints. The server rejects entries without a valid type, duplicates, nested arrays and entries over 255 bytes. A failed reorder now shows an error. Signed-off-by: Pavlinchen <69079839+Pavlinchen@users.noreply.github.com>
…s, return the stored value The server encodes label and user orders itself and returns the stored string. Label ids that are not on the board and entries in the format of earlier builds are dropped instead of rejected, so a deleted label or a bare user id no longer blocks saving. The client takes the stored order into the store unless a newer write started. Signed-off-by: Pavlinchen <69079839+Pavlinchen@users.noreply.github.com>
The stored order may now hold 32768 bytes. A participant id is checked with the same rule as when a board is shared, so it has at most 64 characters, and the separate 255-byte limit per entry is gone. When an order passes 80 percent of the byte or entry limit, the server logs one warning with the board id and the sizes, never an entry. Signed-off-by: Pavlinchen <69079839+Pavlinchen@users.noreply.github.com>
When a user, group or team is deleted, drop its lane from the user order of every board, archived and deleted boards included. The search matches the stored JSON text with an escaped LIKE and the service then compares the decoded entries exactly, so similar ids such as Ann, a_n% or a group id containing the user entry stay untouched. A board that fails to update is logged and skipped so the deletion goes on. The order helpers now return lists and writeSwimlaneSetting is the only place that encodes the order and checks the stored size. Signed-off-by: Pavlinchen <69079839+Pavlinchen@users.noreply.github.com>
A user order may now arrive with up to twice the byte and entry limit. If the stored encoding is over the limit, the server drops every entry of a participant who is not assigned to a card of the board, not shared with the board and not its owner. Assignments on archived and deleted cards count. The lane for unassigned cards stays, and the remaining entries keep their order. If the order is still too large, the request gets a 400. A cut down order is logged on info, an order that stays too large on warning, with the board id and sizes only. The label order keeps its single limit, unknown labels are already dropped exactly. The removal of deleted participants goes through the same write and so gets the same check. Signed-off-by: Pavlinchen <69079839+Pavlinchen@users.noreply.github.com>
A refresh that started before a swimlane write finished could bring back the old order or mode and overwrite the optimistic value. Track started and open writes per config key, take a snapshot before the refresh loads, and skip every setting whose write was open at the snapshot or started since. readSwimlaneOrder becomes readSwimlaneSettings and also guards the mode. A plain board load takes no snapshot and skips nothing. Tests cover both orders of write and load, a mode write that finishes before or after the load, and a failed mode write after a refresh. The write rolls back, and the next refresh is not skipped. Signed-off-by: Pavlinchen <69079839+Pavlinchen@users.noreply.github.com>
An order saved through the API before duplicates were refused can hold the same id twice. mergeVisibleOrder carried both entries along, so the server answered every reorder with 400. It now keeps the first entry only. readSwimlaneSettings parsed any valid JSON, so a stored object or number reached order.indexOf in computedLanes and threw while rendering. It now takes the parsed value only if it is an array and keeps the order it had before otherwise. Signed-off-by: Pavlinchen <69079839+Pavlinchen@users.noreply.github.com>
The three swimlane settings in docs/API.md now say that archived boards refuse the write with a 500, the same status StackService and LabelService give. The note on the stored answer also names whitespace as a reason it can differ from the request. The docblock of writeSwimlaneSetting claimed it was the only place that checks the size limit. normalizeSwimlaneValue checks the raw size too, so the docblock now speaks of the stored size. Signed-off-by: Pavlinchen <69079839+Pavlinchen@users.noreply.github.com>
|
Adressed all findings from own testing and LLM review |
All three stacks were created with order 0. Postgres returns rows with equal sort keys in no fixed order, so Todo could end up in the third column and the card move test failed before the drag. Signed-off-by: Pavlinchen <69079839+Pavlinchen@users.noreply.github.com>
…r comment The stack with the unbreakable title shared order 0 with Todo. The comment claimed the card move test runs last, but Mocha runs the nested suite after it. Signed-off-by: Pavlinchen <69079839+Pavlinchen@users.noreply.github.com>
Summary
Adds an optional 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:
PERMISSION_EDIT); not on archived boardstype:id, so a user and a group with the same id get separate lanesParticipantCleanupListener)Example Screenshot
How it works
SwimlanecomponentsSwimlanerenders aSwimlaneHeader(with label color/avatar, card count, collapse toggle) and the same horizontal stack layoutlaneprop - when present, it usescardsByStackAndLaneMapto filter cards for that laneKnown gaps
Checklist
🤖 AI (if applicable)