From 1183d103f0c30d55053f0c7947a7a733a56dc979 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Normen=20Mu=CC=88ller?= Date: Sat, 10 Jan 2026 13:13:54 +0100 Subject: [PATCH] feat: keep kanban headers visible on scroll --- PR.md | 29 +++++++++++++++++++++++++++++ styles/kanban-view.css | 19 ++++++++++++++++++- 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 PR.md diff --git a/PR.md b/PR.md new file mode 100644 index 00000000..1e7f461c --- /dev/null +++ b/PR.md @@ -0,0 +1,29 @@ +# feat/kanban-sticky-headers + +## Keep kanban column headers visible while scrolling + +This change keeps kanban column headers visible during vertical scrolling by making the board the vertical scroll container and pinning column headers. It avoids JS logic and preserves existing drag-and-drop behavior. + +Examples (illustrative): + +- Long kanban columns keep their headers visible while scrolling vertically. +- Swimlane boards keep the header row pinned and column headers readable. + +## Changelog + +- make kanban board the vertical scroll container +- pin column headers with sticky positioning +- ensure Bases kanban root allows board scrolling + +## Tests + +- npm run i18n:sync +- npm run lint (warnings only; no errors) +- node generate-release-notes-import.mjs +- npm run typecheck +- npm run test:ci -- --verbose (fails in both ./main and this branch: tests/unit/issues/due-date-timezone-inconsistency.test.ts) +- npm run test:integration +- npm run test:performance (pass: no tests found) +- npm run build (warning: missing GOOGLE_OAUTH_CLIENT_ID / MICROSOFT_OAUTH_CLIENT_ID) +- npm run test:build +- Manual: verified sticky headers in Obsidian after force reload diff --git a/styles/kanban-view.css b/styles/kanban-view.css index b1f7297a..820f373a 100644 --- a/styles/kanban-view.css +++ b/styles/kanban-view.css @@ -13,6 +13,14 @@ max-width: 100%; } +/* Bases Kanban root uses tn-tasknotesKanban (no kanban-view wrapper) */ +.tasknotes-plugin.tn-tasknotesKanban { + display: flex; + flex-direction: column; + height: 100%; + min-height: 0; +} + /* Kanban Header */ .tasknotes-plugin .kanban-view__header { display: flex; @@ -99,12 +107,18 @@ display: flex; height: 100%; overflow-x: auto; + overflow-y: auto; padding: var(--tn-spacing-md); gap: var(--tn-spacing-md); min-height: 0; flex-wrap: nowrap; } +.tasknotes-plugin.tn-tasknotesKanban .kanban-view__board { + flex: 1; + min-height: 0; +} + /* Board Scrollbar */ .tasknotes-plugin .kanban-view__board::-webkit-scrollbar { height: 8px; @@ -247,6 +261,9 @@ padding: var(--tn-spacing-sm) var(--tn-spacing-md); border-bottom: 1px solid var(--tn-border-color); background: var(--tn-bg-secondary); + position: sticky; + top: 0; + z-index: 5; border-radius: var(--tn-radius-md) var(--tn-radius-md) 0 0; cursor: grab; user-select: none; @@ -519,4 +536,4 @@ background: var(--tn-bg-secondary); transition: transform 0.15s ease, border-color 0.15s ease; } -} \ No newline at end of file +}