diff --git a/package.json b/package.json index 7d2e1e8..0cbed1b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "my-weekly-todo-list", - "version": "1.109.0", + "version": "1.109.1", "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/WeeklyView.tsx b/src/components/WeeklyView.tsx index e48d783..0bcfd92 100644 --- a/src/components/WeeklyView.tsx +++ b/src/components/WeeklyView.tsx @@ -8557,6 +8557,8 @@ export default function WeeklyView() { {listToDelete !== list.id && { const occupiedSlots = list.tasks.map(t => t.somedaySlotIndex).filter(s => s !== null && s !== undefined) as number[]; let nextFreeSlot = 0; @@ -9825,12 +9827,16 @@ function SomedayAddTask({ onCancel, slotIdx, darkMode, + showProjectIcons, + showTaskCheckboxes, }: { listId: string; onAdd: (title: string) => void; onCancel?: () => void; slotIdx?: number; darkMode?: boolean; + showProjectIcons?: boolean; + showTaskCheckboxes?: boolean; }) { const [title, setTitle] = useState(""); const inputRef = useRef(null); @@ -9850,25 +9856,66 @@ function SomedayAddTask({ } }, [slotIdx]); - // Bottom-of-list "Add task..." gets an input-style background so it reads - // as a real input. The inline slot-editor (slotIdx !== undefined) keeps the - // transparent look so it visually matches the surrounding task rows. const isBottomAddInput = slotIdx === undefined; + if (isBottomAddInput) { + // Render as a flex row that mirrors the task item layout so the input + // aligns exactly with the task text column (icon spacer + checkbox spacer + input). + return ( +
  • +
    { e.preventDefault(); handleSubmit(); }} + style={{ display: "flex", alignItems: "center", gap: "4px", width: "100%" }} + > + {/* Icon column spacer — matches task item icon column */} + {showProjectIcons && } + {/* Checkbox spacer — matches task item checkbox column */} + {showTaskCheckboxes && } + setTitle(e.target.value)} + onBlur={handleSubmit} + onKeyDown={(e) => { + if (e.key === "Escape") { + setTitle(""); + if (onCancel) onCancel(); + else e.currentTarget.blur(); + } + }} + className="weekly-task-text" + style={{ + flex: 1, + border: `1px solid ${darkMode ? "#374151" : "#e5e7eb"}`, + background: darkMode ? "#1f2937" : "#ffffff", + color: darkMode ? "#f9fafb" : "#111827", + padding: "4px 8px", + borderRadius: "4px", + fontSize: "0.9375rem", + outline: "none", + height: "26px", + boxSizing: "border-box", + }} + placeholder="Add task..." + data-someday-add-input={listId} + /> + +
  • + ); + } + + // Inline slot editor: transparent, no border return (
  • { - e.preventDefault(); - handleSubmit(); - }} + onSubmit={(e) => { e.preventDefault(); handleSubmit(); }} style={{ width: "100%" }} >