Add configurable task limit per column 🚦 · Issue #524 · anoopcodehack/DevBoard · GitHub
Skip to content

Add configurable task limit per column 🚦 #524

Description

@anoopcodehack

Add configurable task limit per column 🚦

File: client/src/components/Board/Column.jsx

WIP limit warns but doesn't PREVENT
adding more tasks 💀 fr!!

Fix: add hard limit option:
const COLUMN_LIMITS = {
backlog: null, // unlimited
inprogress: 5, // max 5
review: 3, // max 3
done: null // unlimited
}

const limit = COLUMN_LIMITS[columnId]
const isAtLimit = limit && tasks.length >= limit

// disable add card button when at limit:
<button
onClick={() => !isAtLimit && onAddTask(columnId)}
className={mt-2 flex items-center gap-2 text-xs px-2 py-1.5 rounded transition ${isAtLimit ? 'text-red-400/50 cursor-not-allowed' : 'text-[#555] hover:text-[#888]'}}>
{isAtLimit
? 🚫 Limit reached (${limit})
: '+ Add card'}

~12 lines! No backend needed 🎯
Real Kanban WIP limits!! 🔥

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions