fix: inline project icons so multi-line text wraps around them
Move project icons from flex siblings into the text span so that multi-line task titles wrap around the icon instead of leaving empty space below it. v1.59.4 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
b6f5ba42ed
commit
6fc0ccef74
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "my-weekly-todo-list",
|
||||
"version": "1.59.3",
|
||||
"version": "1.59.4",
|
||||
"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": {
|
||||
|
||||
@ -306,18 +306,18 @@ export function GridTaskBlock({
|
||||
/>
|
||||
)}
|
||||
<span style={task.completed && showTaskCheckboxes ? { opacity: 0.5, flex: 1, display: "flex", alignItems: "center", flexWrap: "wrap", rowGap: "2px" } : { flex: 1, display: "flex", alignItems: "center", flexWrap: "wrap", rowGap: "2px" }}>
|
||||
{showProjectIcons && task.project && (() => {
|
||||
<span style={{ marginRight: "4px" }}>{showProjectIcons && task.project && (() => {
|
||||
const found = allIcons.find(i => i.name === task.project!.icon);
|
||||
const iconStyle = { marginRight: "4px", verticalAlign: "middle" } as const;
|
||||
if (found) {
|
||||
return found.type === "fa"
|
||||
? <FontAwesomeIcon icon={found.icon as IconDefinition} style={{ fontSize: "11px", marginRight: "4px", color: task.project!.color || "#888", flexShrink: 0 }} />
|
||||
: <MdiIcon path={found.icon as string} size={0.5} color={task.project!.color || "#888"} style={{ marginRight: "3px", flexShrink: 0 }} />;
|
||||
? <FontAwesomeIcon icon={found.icon as IconDefinition} style={{ fontSize: "11px", ...iconStyle, color: task.project!.color || "#888" }} />
|
||||
: <MdiIcon path={found.icon as string} size={0.5} color={task.project!.color || "#888"} style={{ ...iconStyle, display: "inline-block" }} />;
|
||||
}
|
||||
return task.project!.icon
|
||||
? <span style={{ fontSize: "11px", marginRight: "3px", flexShrink: 0 }}>{task.project!.icon}</span>
|
||||
: <FontAwesomeIcon icon={faFolder} style={{ fontSize: "11px", marginRight: "4px", color: task.project!.color || "#888", flexShrink: 0 }} />;
|
||||
})()}
|
||||
<span style={{ marginRight: "4px" }}>{task.title}</span>
|
||||
? <span style={{ fontSize: "11px", ...iconStyle }}>{task.project!.icon}</span>
|
||||
: <FontAwesomeIcon icon={faFolder} style={{ fontSize: "11px", ...iconStyle, color: task.project!.color || "#888" }} />;
|
||||
})()}{task.title}</span>
|
||||
{/* Subtask indicator */}
|
||||
{task.subTasks && task.subTasks.length > 0 && (() => {
|
||||
const completed = task.subTasks.filter(s => s.completed).length;
|
||||
|
||||
@ -9760,11 +9760,6 @@ function TaskItem({
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
{showProjectIcons && task.project && (
|
||||
<span style={{ flexShrink: 0, position: "relative", top: "2px" }}>
|
||||
<ProjectIcon icon={task.project.icon} size={13} color={task.project.color || "#888"} />
|
||||
</span>
|
||||
)}
|
||||
<span
|
||||
style={{
|
||||
whiteSpace: "pre-wrap",
|
||||
@ -9773,6 +9768,11 @@ function TaskItem({
|
||||
flex: 1,
|
||||
}}
|
||||
>
|
||||
{showProjectIcons && task.project && (
|
||||
<span style={{ marginRight: "4px", verticalAlign: "middle" }}>
|
||||
<ProjectIcon icon={task.project.icon} size={13} color={task.project.color || "#888"} />
|
||||
</span>
|
||||
)}
|
||||
{task.title}
|
||||
</span>
|
||||
{(() => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user