diff --git a/web/app/components/base/quadrant-matrix/index.tsx b/web/app/components/base/quadrant-matrix/index.tsx index 3dfbe9d286..07114ecb1c 100644 --- a/web/app/components/base/quadrant-matrix/index.tsx +++ b/web/app/components/base/quadrant-matrix/index.tsx @@ -2,7 +2,6 @@ import type { FC } from 'react' import type { QuadrantData } from './types' import { useMemo } from 'react' -import { cn } from '@/utils/classnames' import QuadrantCard from './quadrant-card' import { isValidQuadrantData, QUADRANT_CONFIGS } from './types' @@ -28,9 +27,9 @@ const QuadrantMatrix: FC = ({ content }) => { if (!parsedData) { return ( -
+
-
Invalid Quadrant Data
+
Invalid Quadrant Data
Expected JSON format with q1, q2, q3, q4 arrays
@@ -46,7 +45,7 @@ const QuadrantMatrix: FC = ({ content }) => { + parsedData.q4.length return ( -
+
{/* Header */}
@@ -59,78 +58,77 @@ const QuadrantMatrix: FC = ({ content }) => { task {totalTasks !== 1 ? 's' : ''} {' '} - across 4 quadrants + prioritized
-
- I - =Importance - U - =Urgency + {/* Legend */} +
+ + I + {' '} + = Importance + + + U + {' '} + = Urgency +
- {/* Axis Labels */} -
- {/* Importance Label (Top Center) */} -
- - Important + {/* Axis Labels - Horizontal */} +
+
+ + Not Urgent
+
+ + Urgent + +
+
- {/* Main Grid with Urgency Labels */} -
- {/* Left: Not Urgent Label */} -
- - Not Urgent + {/* Main Grid with Row Labels */} +
+ {/* Row Labels - Vertical (rotated 90 degrees) */} +
+
+ + Important
- - {/* Center: 2x2 Grid */} -
-
- {/* Row 1: Important */} - - - - {/* Row 2: Not Important */} - - -
-
- - {/* Right: Urgent Label */} -
- - Urgent +
+ + Not Important
- {/* Not Important Label (Bottom Center) */} -
- - Not Important - + {/* 2x2 Grid */} +
+
+ {/* Row 1: Important */} + + + + {/* Row 2: Not Important */} + + +
diff --git a/web/app/components/base/quadrant-matrix/quadrant-card.tsx b/web/app/components/base/quadrant-matrix/quadrant-card.tsx index 52918289ac..35ca20afa8 100644 --- a/web/app/components/base/quadrant-matrix/quadrant-card.tsx +++ b/web/app/components/base/quadrant-matrix/quadrant-card.tsx @@ -13,7 +13,7 @@ type QuadrantCardProps = { const QuadrantCard: FC = ({ config, tasks, - maxDisplay = 5, + maxDisplay = 3, }) => { const { title, subtitle, bgClass, borderClass, titleClass } = config const displayTasks = tasks.slice(0, maxDisplay) @@ -22,19 +22,26 @@ const QuadrantCard: FC = ({ return (
{/* Header */} -
-
{title}
-
{subtitle}
+
+
+ {title} + {tasks.length > 0 && ( + + {tasks.length} + + )} +
+
{subtitle}
- {/* Task List */} -
+ {/* Task List - scrollable area */} +
{displayTasks.length > 0 ? ( displayTasks.map((task, index) => ( @@ -50,7 +57,7 @@ const QuadrantCard: FC = ({ {/* More indicator */} {remainingCount > 0 && ( -
+
+ {remainingCount} {' '} diff --git a/web/app/components/base/quadrant-matrix/task-item.tsx b/web/app/components/base/quadrant-matrix/task-item.tsx index 5494e58511..403e1f7a97 100644 --- a/web/app/components/base/quadrant-matrix/task-item.tsx +++ b/web/app/components/base/quadrant-matrix/task-item.tsx @@ -3,22 +3,6 @@ import type { FC } from 'react' import type { Task } from './types' import { cn } from '@/utils/classnames' -type ScoreBadgeProps = { - label: string - score: number - colorClass: string -} - -const ScoreBadge: FC = ({ label, score, colorClass }) => { - return ( - - {label} - : - {score} - - ) -} - type TaskItemProps = { task: Task showScores?: boolean @@ -28,47 +12,52 @@ const TaskItem: FC = ({ task, showScores = true }) => { const { name, description, deadline, importance_score, urgency_score, action_advice } = task return ( -
- {/* Task Name */} -
{name}
+
+ {/* Header: Task Name + Scores */} +
+
+ {name} +
+ {showScores && ( +
+ + I: + {importance_score} + + + U: + {urgency_score} + +
+ )} +
- {/* Description (if exists) */} + {/* Description */} {description && (
{description}
)} - {/* Metadata Row */} -
- {/* Deadline Badge */} - {deadline && ( - + {/* Deadline Badge */} + {deadline && ( +
+ {deadline} - )} +
+ )} - {/* Scores (optional) */} - {showScores && ( -
- - -
- )} -
- - {/* Action Advice (if exists) */} + {/* Action Advice */} {action_advice && ( -
- {action_advice} +
+

+ {action_advice} +

)}