From 373884ddc067dc81cd6471da168423199d31ada0 Mon Sep 17 00:00:00 2001 From: Vance Ingalls Date: Thu, 20 Aug 2026 12:22:21 -0700 Subject: [PATCH] feat(studio): wrap FX parameter names instead of truncating them MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The reverb details column read "How big the sp…", "How soft the wa…", "How much origi…" — three rows whose visible text was nearly the same four words. These names are whole questions, so 86px of truncation removes the part that tells them apart, and a `title` only answers one row at a time on hover. Same treatment the timeline gutter names got in 46ca2f3e5: `truncate` + `title={param.label}` becomes `break-words leading-tight`, and the title goes — wrapping answers the whole column at rest. The row keeps `title={param.hint}`; the name and the explanation are different questions, and the hint was never what got cut. Applied to both FxParamRow shapes (numeric and enum) and to the carve module's "Listen to", which sits in the same column — one truncating row beside wrapping ones reads as a rendering bug. Measured in the running studio on a reverb node: four rows at 25/25/24/25px, two lines where the name needs them, one where it does not, no ellipsis. The two tests that asserted the old title now assert the wrap (full text present, `break-words` set, `truncate` absent, no `title`, hint still on the row). 171 tests across the three FX suites pass. --- .../editor/propertyPanelFxCarveModule.tsx | 7 +++--- .../editor/propertyPanelFxControls.test.tsx | 17 +++++++++----- .../editor/propertyPanelFxControls.tsx | 23 ++++++++----------- 3 files changed, 24 insertions(+), 23 deletions(-) diff --git a/packages/studio/src/components/editor/propertyPanelFxCarveModule.tsx b/packages/studio/src/components/editor/propertyPanelFxCarveModule.tsx index 9f6d896d6..9cf2b3b81 100644 --- a/packages/studio/src/components/editor/propertyPanelFxCarveModule.tsx +++ b/packages/studio/src/components/editor/propertyPanelFxCarveModule.tsx @@ -336,10 +336,9 @@ function CarveSourceRow({ }) { return (
- + {/* Wraps like every other name in this column (see FxParamRow) — one + truncating row beside wrapping ones reads as a rendering bug. */} + Listen to {soleVoice ? ( diff --git a/packages/studio/src/components/editor/propertyPanelFxControls.test.tsx b/packages/studio/src/components/editor/propertyPanelFxControls.test.tsx index 68e35c8e8..ef9eed4c8 100644 --- a/packages/studio/src/components/editor/propertyPanelFxControls.test.tsx +++ b/packages/studio/src/components/editor/propertyPanelFxControls.test.tsx @@ -131,14 +131,19 @@ describe("FxParamRow label tooltip", () => { hint: "How long before the echo comes back.", }; - it("titles the label with the full name, and leaves the hint on the row", () => { + it("wraps the full name rather than truncating it, and leaves the hint on the row", () => { const host = document.createElement("div"); document.body.append(host); act(() => { createRoot(host).render(); }); const label = host.querySelector(".hf-fx-label"); - expect(label?.getAttribute("title")).toBe("Gap between repeats"); + // The whole name is present and allowed to wrap. No `title`: a tooltip + // answers one row on hover, wrapping answers the column at rest. + expect(label?.textContent).toBe("Gap between repeats"); + expect(label?.className).toContain("break-words"); + expect(label?.className).not.toContain("truncate"); + expect(label?.getAttribute("title")).toBeNull(); // The hint stays where it was: the two are different questions, and the // name is not a substitute for the explanation either. expect(host.querySelector(".hf-fx-row")?.getAttribute("title")).toBe( @@ -146,15 +151,15 @@ describe("FxParamRow label tooltip", () => { ); }); - it("titles it even with no hint to fall back on", () => { + it("wraps it the same way with no hint to fall back on", () => { const host = document.createElement("div"); document.body.append(host); const { hint: _hint, ...noHint } = LONG; act(() => { createRoot(host).render(); }); - expect(host.querySelector(".hf-fx-label")?.getAttribute("title")).toBe( - "Gap between repeats", - ); + const label = host.querySelector(".hf-fx-label"); + expect(label?.textContent).toBe("Gap between repeats"); + expect(label?.getAttribute("title")).toBeNull(); }); }); diff --git a/packages/studio/src/components/editor/propertyPanelFxControls.tsx b/packages/studio/src/components/editor/propertyPanelFxControls.tsx index 6895b0787..ae0fffbb7 100644 --- a/packages/studio/src/components/editor/propertyPanelFxControls.tsx +++ b/packages/studio/src/components/editor/propertyPanelFxControls.tsx @@ -188,15 +188,14 @@ export function FxParamRow({ if (param.kind === "enum") { return (