From ca8de37310c92b2844359b17db19ac2e80e235df Mon Sep 17 00:00:00 2001 From: Timothy Cardoza Date: Thu, 5 Feb 2026 10:46:12 -0600 Subject: [PATCH] change matrix colors to reflect task size --- src/lib/constants.ts | 8 ++++---- src/views/MatrixView.tsx | 11 ++++++----- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/lib/constants.ts b/src/lib/constants.ts index cb34221..2552423 100644 --- a/src/lib/constants.ts +++ b/src/lib/constants.ts @@ -18,10 +18,10 @@ export const URGENCY_OPTIONS = [ { value: "7", label: "7 - Half-Week" }, { value: "6", label: "6 - This Week/5 Days" }, { value: "5", label: "5 - Next Week/10 Days" }, - { value: "4", label: "4 - 3 Weeks" }, - { value: "3", label: "3 - 6 Weeks" }, - { value: "2", label: "2 - 3 Months" }, - { value: "1", label: "1 - 6 Months" } + { value: "4", label: "4 - Three Weeks" }, + { value: "3", label: "3 - Six Weeks" }, + { value: "2", label: "2 - Three Months" }, + { value: "1", label: "1 - Six Months" } ]; export const URGENCY_HOURS: Record = { 10: 12, diff --git a/src/views/MatrixView.tsx b/src/views/MatrixView.tsx index 296ef7f..dc15d0e 100644 --- a/src/views/MatrixView.tsx +++ b/src/views/MatrixView.tsx @@ -1,5 +1,5 @@ import { type Component, For, createMemo } from "solid-js"; -import { store, calculateUrgencyScore, setActiveTaskId, setStore, getCombinedScore, matchesFilter } from "@/store"; +import { store, calculateUrgencyScore, setActiveTaskId, setStore, matchesFilter } from "@/store"; import { cn } from "@/lib/utils"; import { Select, SelectContent, SelectItem, SelectTrigger } from "@/components/ui/select"; @@ -85,11 +85,11 @@ export const MatrixView: Component = () => { }; const urgencyScore = calculateUrgencyScore(task.dueDate); - const combinedScore = getCombinedScore(task); - // Map 1-10 to HSL Hue (0 = Red, 240 = Blue) - // Using a slightly limited range for better aesthetics (0 to 220) - const hue = ((10 - combinedScore) / 9) * 220; + // Map task size (0-10) to HSL Hue (240 = Blue/Cool, 0 = Red/Warm) + // This creates a "true gradient" from small to large tasks. + const taskSize = task.size ?? 5; + const hue = (1 - (taskSize / 10)) * 240; const dotColor = `hsl(${hue}, 85%, 55%)`; return ( @@ -123,6 +123,7 @@ export const MatrixView: Component = () => {

{task.title}

U: {urgencyScore} + S: {task.size ?? 5} P: {task.priority}