Redesigns the Quick Add composer's priority selector to icon-only glyph buttons and relocates GitHub tracking beside attach, backed by a new shared priorityIndicator helper. - Add packages/dashboard/app/utils/priorityIndicator.tsx as the single source of ArrowUp/ArrowDown/Flag/TriangleAlert priority glyphs, shared by QuickEntryBox and TaskForm - Rework QuickEntryBox.tsx to render icon-only priority/Fast controls and move GitHub tracking + Priority into the .quick-entry-primary-group, with matching QuickEntryBox.css layout updates - Update TaskForm.tsx to reuse the new priorityIndicator helper instead of duplicating icon/label logic - Update quick-entry height-parity/trigger-height tests and QuickEntryBox/TaskForm/NewTaskModal tests for the new icon-only layout - Add priorityIndicator.test.tsx covering the shared helper - Update docs/dashboard-guide.md and add changeset fn-7805-quick-add-priority-indicators.md (patch, feature) Files changed: .../fn-7805-quick-add-priority-indicators.md | 7 + docs/dashboard-guide.md | 3 +- .../quick-entry-action-row-height-parity.test.tsx | 13 +- .../quick-entry-workflow-trigger-height.test.tsx | 10 +- .../dashboard/app/components/QuickEntryBox.css | 19 +- .../dashboard/app/components/QuickEntryBox.tsx | 197 +++++++++++---------- packages/dashboard/app/components/TaskForm.tsx | 33 ++-- .../app/components/__tests__/NewTaskModal.test.tsx | 3 + .../components/__tests__/QuickEntryBox.test.tsx | 113 ++++++++---- .../app/components/__tests__/TaskForm.test.tsx | 3 + .../app/utils/__tests__/priorityIndicator.test.tsx | 21 +++ packages/dashboard/app/utils/priorityIndicator.tsx | 30 ++++ 12 files changed, 300 insertions(+), 152 deletions(-) Fusion-Task-Id: FN-7805 Fusion-Task-Lineage: 404fe8d6-0851-44cb-b31d-f47896aaaaba Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
31 lines
1.1 KiB
TypeScript
31 lines
1.1 KiB
TypeScript
import { ArrowDown, ArrowUp, Flag, TriangleAlert, type LucideIcon } from "lucide-react";
|
|
import type { TaskPriority } from "@fusion/core";
|
|
|
|
export interface PriorityIndicator {
|
|
icon: LucideIcon;
|
|
label: string;
|
|
}
|
|
|
|
/*
|
|
FNXC:QuickAddPriorityIndicator 2026-07-10-12:00:
|
|
Quick-add and New Task priority affordances must share one glyph language: ArrowUp means high, ArrowDown means low, Flag means normal, and TriangleAlert means urgent. Keep this helper as the single source so icon-only priority buttons do not drift across composer surfaces.
|
|
*/
|
|
const PRIORITY_INDICATORS: Record<TaskPriority, PriorityIndicator> = {
|
|
low: { icon: ArrowDown, label: "Low" },
|
|
normal: { icon: Flag, label: "Normal" },
|
|
high: { icon: ArrowUp, label: "High" },
|
|
urgent: { icon: TriangleAlert, label: "Urgent" },
|
|
};
|
|
|
|
export function priorityIndicator(priority: TaskPriority): PriorityIndicator {
|
|
return PRIORITY_INDICATORS[priority];
|
|
}
|
|
|
|
export function getPriorityIcon(priority: TaskPriority): LucideIcon {
|
|
return priorityIndicator(priority).icon;
|
|
}
|
|
|
|
export function getPriorityLabel(priority: TaskPriority): string {
|
|
return priorityIndicator(priority).label;
|
|
}
|