From 672c474f94c3a7d11f1251ec75df8907c8c4a392 Mon Sep 17 00:00:00 2001 From: "user.email" Date: Sun, 16 Aug 2026 01:42:44 +0530 Subject: [PATCH] Add collapse/expand toggle on each column MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds a ▶/▼ toggle to each column header. When collapsed the card list and empty-state hint are hidden, but the Droppable area stays mounted so tasks can still be dragged into a collapsed column. Collapse state is local component state. Closes #278 --- .../client/src/components/Board/Column.jsx | 65 +++++++++++-------- 1 file changed, 39 insertions(+), 26 deletions(-) diff --git a/devboard/client/src/components/Board/Column.jsx b/devboard/client/src/components/Board/Column.jsx index 0ae2ae4..546a351 100644 --- a/devboard/client/src/components/Board/Column.jsx +++ b/devboard/client/src/components/Board/Column.jsx @@ -17,6 +17,7 @@ const Column = ({ isActive, }) => { const [sorted, setSorted] = useState(false); + const [collapsed, setCollapsed] = useState(false); const [animate, setAnimate] = useState(false); useEffect(() => { @@ -30,7 +31,6 @@ const Column = ({ const displayTasks = sorted ? [...tasks].sort((a, b) => { const order = { high: 0, medium: 1, low: 2 }; - return (order[a.priority] ?? 3) - (order[b.priority] ?? 3); }) : tasks; @@ -66,39 +66,52 @@ const Column = ({ - +
+ + + +
- {/* Droppable cards area */} + {/* Droppable cards area (kept mounted so drag-and-drop still works) */} {(provided, snapshot) => (
- {tasks.length === 0 ? ( -
- No tasks here — drag one in or click + Add card -
- ) : ( - displayTasks.map((task, index) => ( - - )) - )} - + {!collapsed && + (tasks.length === 0 ? ( +
+ No tasks here — drag one in or click + Add card +
+ ) : ( + displayTasks.map((task, index) => ( + + )) + ))} {provided.placeholder}
)} @@ -115,4 +128,4 @@ const Column = ({ ); }; -export default Column; \ No newline at end of file +export default Column;