The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.
TypeScript ai-videocomfyuicreative-toolsgenerative-aiideogramimage-generationimage-to-3dimage-to-videoltx-videominimax-h3nextjsopen-sourceopen-weightsqwen-imagetext-to-imagevideo-generationwan
Color grade: a value resets with one press
Adarsh869a50f165f0
diff --git a/src/components/color-grade-view.tsx b/src/components/color-grade-view.tsxindex a4ade2e2..eff0929f 100644--- a/src/components/color-grade-view.tsx+++ b/src/components/color-grade-view.tsx@@ -565,13 +565,15 @@ function Grader() {<div key={c.key} className="space-y-1.5"><div className="flex items-center justify-between text-[13px]"><span id={`grade-${c.key}`}>{c.label}</span>+ {/* The value resets with one press (a phone has no double-click); at its default it is a plain readout. */}<buttontype="button"- onDoubleClick={() => set(c.key, NEUTRAL[c.key])}- onKeyDown={(e) => (e.key === "Enter" || e.key === "Backspace") && set(c.key, NEUTRAL[c.key])}- title="Double-click to reset"- aria-label={`Reset ${c.label}`}- className={cn("font-mono text-[12px] text-muted-foreground tabular-nums", grade[c.key] !== NEUTRAL[c.key] && "text-brand-text")}+ onClick={() => grade[c.key] !== NEUTRAL[c.key] && set(c.key, NEUTRAL[c.key])}+ onKeyDown={(e) => e.key === "Backspace" && set(c.key, NEUTRAL[c.key])}+ title={grade[c.key] !== NEUTRAL[c.key] ? "Reset" : undefined}+ aria-label={grade[c.key] !== NEUTRAL[c.key] ? `Reset ${c.label}` : `${c.label}: at its default`}+ aria-disabled={grade[c.key] === NEUTRAL[c.key] || undefined}+ className={cn("rounded font-mono text-[12px] text-muted-foreground tabular-nums", grade[c.key] !== NEUTRAL[c.key] ? "cursor-pointer text-brand-text hover:underline" : "cursor-default")}>{c.min < 0 && grade[c.key] > 0 ? "+" : ""}{grade[c.key]}diff --git a/tests/inert-controls.test.ts b/tests/inert-controls.test.tsindex 86474fc4..c316312d 100644--- a/tests/inert-controls.test.ts+++ b/tests/inert-controls.test.ts@@ -122,3 +122,12 @@ describe("Dub, Relight and Swap Studio", () => {expect(s).toContain("const modelId = models.find((m) => m.id === asked && m.offered)?.id ?? models.find((m) => m.offered)?.id");});});++describe("Color grade", () => {+ it("a value resets with one press, and reads as plain text at its default", () => {+ const s = src("src/components/color-grade-view.tsx");+ expect(s).toContain("onClick={() => grade[c.key] !== NEUTRAL[c.key] && set(c.key, NEUTRAL[c.key])}");+ expect(s).not.toContain("Double-click to reset");+ expect(s).toContain("aria-disabled={grade[c.key] === NEUTRAL[c.key] || undefined}");+ });+});