feat(kanban): add per-view pinnedColumns option (#1784)#1833
Open
loukandr wants to merge 2 commits intocallumalpass:mainfrom
Open
feat(kanban): add per-view pinnedColumns option (#1784)#1833loukandr wants to merge 2 commits intocallumalpass:mainfrom
loukandr wants to merge 2 commits intocallumalpass:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a per-view pinnedColumns configuration to the TaskNotes Kanban Bases view so specified columns always render (even when empty) and remain valid drop targets while still allowing hideEmptyColumns: true for non-pinned columns.
Changes:
- Register new Kanban view option
pinnedColumnsin Bases view option registration. - Implement parsing, group augmentation, ordering behavior, and hide-empty exemption for pinned columns in
KanbanView. - Document the option and add regression/unit coverage for Issue #1784.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/bases/registration.ts |
Registers pinnedColumns as a Kanban view option in the Bases options UI. |
src/bases/KanbanView.ts |
Adds pinned column parsing + group augmentation + ordering/visibility behavior updates. |
docs/views/kanban-view.md |
Documents pinnedColumns and updates the example configuration. |
tests/unit/issues/issue-1784-kanban-pinned-columns.test.ts |
Adds regression tests for parsing/augmentation/ordering/visibility logic. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Description
Adds an optional
pinnedColumnsview config totasknotesKanban. Listed column values always render, even when empty, and stay valid drop targets regardless ofhideEmptyColumns. When unset, behavior is unchanged.Use case
A vault with a shared global status set (Backlog, To Do, In Progress, In Review, Done) where individual boards want different always-visible subsets. Without
pinnedColumns, the choice was either show every status everywhere viahideEmptyColumns: false, or hide every empty column and lose the drag target.pinnedColumnsadds the middle option.Behavior
groupByproperty.hideEmptyColumnsskip inrenderFlat.status,priority,tags, or any customgroupBy.Screenshots
The three boards below render the same dataset (three tasks: one in
to-do, two inin-progress). All three views havehideEmptyColumns: true.Without pinnedColumns
Only columns with tasks render.
Backlog,In Review, andDoneare hidden.With pinnedColumns: to-do, in-progress, done
The pinned subset renders in array order.
Donestays visible despite being empty.BacklogandIn Reviewremain hidden.With pinnedColumns: backlog, to-do, in-progress, in-review, done
The full status set always renders. Empty pinned columns stay visible as drop targets.
Implementation
src/bases/registration.ts: registers a newtextBases option forpinnedColumns, mirroring thecolumnOrderprecedent.src/bases/KanbanView.ts:readViewOptionsparses the value as a comma-separated string or YAML array, trims, drops empty entries, and dedupes preserving first-seen order.augmentWithPinnedColumnsinserts empty groups for missing pinned keys, called fromgroupTasksafter the existing status and priority augmenters.applyColumnOrderno-saved-order branch puts pinned keys first in array order. Remaining keys keep alphabetical fallback. Saved drag order branch untouched.renderFlatfilter exempts pinned keys from the empty-column skip.docs/views/kanban-view.md: option documented under "Kanban-Specific Options" and added to the example config.tests/unit/issues/issue-1784-kanban-pinned-columns.test.ts: 23 pure-logic tests covering parser, augmenter, ordering with and without saved order, visibility filter, and integration forstatus,priority, andtagsgrouping.Out of scope
hideEmptyColumns, so the pinned-exempt rule is a no-op there. Pinned values still render in swimlane mode through the augmenter, without the filter interaction.customStatuses/customPrioritiessettings order is not used as a fallback when no saved drag order exists. Existing behavior, not changed here.Closes #1784. Addresses #1446.