feat(FN-3270): remove task detail status color fallbacks
Removed fallback logic for task status colors in TaskDetailModal, simplifying the component by relying on proper CSS token fallbacks instead of inline JavaScript defaults. Fusion-Task-Id: FN-3270
This commit is contained in:
@@ -117,14 +117,14 @@ function resolveEffectivePlanning(
|
|||||||
function getStepStatusColor(status: string): string {
|
function getStepStatusColor(status: string): string {
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case "done":
|
case "done":
|
||||||
return "var(--color-success, #3fb950)";
|
return "var(--color-success)";
|
||||||
case "in-progress":
|
case "in-progress":
|
||||||
return "var(--todo, #58a6ff)";
|
return "var(--todo)";
|
||||||
case "skipped":
|
case "skipped":
|
||||||
return "var(--text-dim, #484f58)";
|
return "var(--text-dim)";
|
||||||
case "pending":
|
case "pending":
|
||||||
default:
|
default:
|
||||||
return "var(--border, #30363d)";
|
return "var(--border)";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2553,10 +2553,10 @@ describe("TaskDetailModal", () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const segments = container.querySelectorAll(".step-progress-segment");
|
const segments = container.querySelectorAll(".step-progress-segment");
|
||||||
expect((segments[0] as HTMLElement).style.backgroundColor).toBe("var(--color-success, #3fb950)");
|
expect((segments[0] as HTMLElement).style.backgroundColor).toBe("var(--color-success)");
|
||||||
expect((segments[1] as HTMLElement).style.backgroundColor).toBe("var(--todo, #58a6ff)");
|
expect((segments[1] as HTMLElement).style.backgroundColor).toBe("var(--todo)");
|
||||||
expect((segments[2] as HTMLElement).style.backgroundColor).toBe("var(--border, #30363d)");
|
expect((segments[2] as HTMLElement).style.backgroundColor).toBe("var(--border)");
|
||||||
expect((segments[3] as HTMLElement).style.backgroundColor).toBe("var(--text-dim, #484f58)");
|
expect((segments[3] as HTMLElement).style.backgroundColor).toBe("var(--text-dim)");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("displays singular completion label for one-step tasks", () => {
|
it("displays singular completion label for one-step tasks", () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user