From 10e7ba98f10590d5962fe8252e7c757dce0f986d Mon Sep 17 00:00:00 2001 From: mARTin-B78 Date: Mon, 11 May 2026 15:15:40 +0200 Subject: [PATCH] fix: always reserve icon column width for checkbox/text alignment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Icon column (14px fixed width) is now always rendered when priority or project icon settings are enabled, even when a task has no icons. Each icon slot is a 12×12px centered container so icons are the same size and horizontally aligned. Increased gap to 2px for breathing room. v1.111.2 --- package.json | 2 +- src/components/GridTaskBlock.tsx | 56 ++++++++++++++++++-------------- 2 files changed, 32 insertions(+), 26 deletions(-) diff --git a/package.json b/package.json index fbada23..c2ff4e9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "my-weekly-todo-list", - "version": "1.111.1", + "version": "1.111.2", "description": "A web-based weekly task management application that organizes to-dos and calendar events in a single, intuitive weekly view", "main": "index.js", "scripts": { diff --git a/src/components/GridTaskBlock.tsx b/src/components/GridTaskBlock.tsx index 2081978..d2e8fe3 100644 --- a/src/components/GridTaskBlock.tsx +++ b/src/components/GridTaskBlock.tsx @@ -341,31 +341,37 @@ export function GridTaskBlock({ setEditingTaskId(task.id); }} > - {(() => { - const pb = showPriorityIcons ? getPriorityBadge(task, priorityStyle, 11) : null; - const hasProject = !!(showProjectIcons && task.project); - if (!pb && !hasProject) return null; - return ( - - {pb && {pb.node}} - {hasProject && (() => { - const rawIcon = task.project!.icon || ""; - const normalised = rawIcon.startsWith("fa") && rawIcon.length > 2 && rawIcon[2] === rawIcon[2].toUpperCase() - ? rawIcon.slice(2, 3).toLowerCase() + rawIcon.slice(3) - : rawIcon; - const found = allIcons.find(i => i.name === normalised || i.name === rawIcon); - if (found) { - return found.type === "fa" - ? - : ; - } - return task.project!.icon - ? {task.project!.icon} - : ; - })()} - - ); - })()} + {(showPriorityIcons || showProjectIcons) && ( + + {showPriorityIcons && (() => { + const pb = getPriorityBadge(task, priorityStyle, 11); + return pb ? ( + + {pb.node} + + ) : null; + })()} + {showProjectIcons && task.project && (() => { + const rawIcon = task.project!.icon || ""; + const normalised = rawIcon.startsWith("fa") && rawIcon.length > 2 && rawIcon[2] === rawIcon[2].toUpperCase() + ? rawIcon.slice(2, 3).toLowerCase() + rawIcon.slice(3) + : rawIcon; + const found = allIcons.find(i => i.name === normalised || i.name === rawIcon); + return ( + + {found + ? (found.type === "fa" + ? + : ) + : (task.project!.icon + ? {task.project!.icon} + : ) + } + + ); + })()} + + )} {showTaskCheckboxes && (