feat: card cover colours (Phase 1 of #155)#515
Conversation
Adds an optional cover colour to cards, shown as a bar across the top of
the card on both private and public boards. Set it via the card context
menu ("Set cover colour") using the shared @kan/shared palette, or clear
it back to none.
Phase 1 of the theme-customisation request (kanbn#155): lightweight, palette
based, no upload infrastructure. Complements kanbn#513 (board backgrounds) —
different field, no overlap.
- db: add nullable card.coverColourCode (varchar 7) + migration
- api: thread coverColourCode through card.update input + repo + board/
card output schemas + board query selection
- web: render cover bar on Card; new CardContextCoverColourModal with
palette swatches + clear; wire into the card context menu
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Verified locally against a running instance (Next dev + Postgres):
Screenshots to follow. Will flip out of draft once they're attached. |
|
Hey @nickmeinhold, Why not move to the general of concept of a settings menu and a popup dialog. A central place for item related configuration like also color.. What's your thoughts on that? |
|
Thanks @knom, really appreciate the enthusiasm, and I think you're onto something for the longer term. Before either of us invests more, I think this is worth a maintainer steer so we build to the project's convention. Cards already have two config surfaces today: the per-action context-menu items (Manage members, Add / edit label, Set due date), each opening a focused modal, plus the full card detail view where description, labels, members and due date are edited. So unlike boards (which had no config hub, which is exactly why your board settings dialog made sense there), cards already have a "central place". That makes the cover-colour placement a genuine convention question:
@hjball, do you have a preference for how card-level configuration should be organised? Happy to shape #515 to match whatever direction you want, and it'd keep knom's #513 and this PR consistent with each other. |
|
And @knom, separately from all the design back-and-forth: it's genuinely great to be collaborating on this with you. Two complementary PRs landing side by side, feedback flowing both ways, this is open source at its best. Looking forward to seeing where it goes. |
|
Same here! |


Card cover colours (Phase 1 of #155)
Adds an optional cover colour to cards, rendered as a bar across the top of the card on both private and public boards. Set it from the card context menu → Set cover colour (palette swatches from
@kan/shared), or clear back to none.This is the lightweight, palette-based first phase of the theme-customisation request in #155 — no upload infrastructure needed. It deliberately complements @knom's #513 (board backgrounds): different field, different surface, no overlap. (Coordination on the issue: #155 (comment))
What's in it
card.coverColourCode(varchar(7)) + generated migrationcoverColourCodethreaded throughcard.updateinput → repo →cardDetail/boardDetailCardoutput schemas → board query selectionCard; newCardContextCoverColourModal(palette + clear) wired into the card context menu; optimistic update via the existinginvalidateCardpatternDesign notes
#0d9488…) for consistency with how labels storecolourCode.nullclears,undefinedleaves untouched (mirrors the existingdueDatehandling incard.update)./^#[0-9a-fA-F]{6}$/) lives at the router boundary.Verification
@kan/db,@kan/apitypecheck clean;@kan/webintroduces zero new type errors vsmain(diffed against baseline).Closes part of #155 (Phase 1; cover images and board-level options tracked separately).