Skip to content

Commit 43c4e69

Browse files
vanceingallsclaude
andauthored
feat(studio): make presets the primary path into the FX rack (#3274)
Presets button becomes the stacked primary control (bold, filled outline); Add-effect demoted to a small trailing link ("+ effect"). Button onClick bodies and audition-revert logic are unchanged. Co-authored-by: Claude Sonnet 5 <[email protected]>
1 parent 556fe93 commit 43c4e69

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

‎packages/studio/src/components/editor/propertyPanelAudioFxGroup.test.tsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ describe("AudioFxGroup dynamic carve", () => {
469469
});
470470
document.getElementById("bed")?.setAttribute("src", "bed.wav");
471471
act(() => byTextButton(host, "Audio FX")?.click());
472-
act(() => byTextButton(host, "Add effect")?.click());
472+
act(() => byTextButton(host, "+ effect")?.click());
473473
await act(async () => {
474474
byTextButton(host, "Even Out Levels")?.click();
475475
await new Promise((r) => setTimeout(r, 0));
@@ -581,7 +581,7 @@ describe("AudioFxGroup dynamic carve", () => {
581581
const { release, decoded } = stubGatedDecode();
582582
const { host, onSetAttributeLive } = mount({ "fx-chain": CHAIN });
583583
document.getElementById("bed")?.setAttribute("src", "bed.wav");
584-
act(() => byTextButton(host, "Add effect")?.click());
584+
act(() => byTextButton(host, "+ effect")?.click());
585585
const level = byTextButton(host, "Even Out Levels");
586586
expect(level, "the levelling button was not offered").toBeTruthy();
587587
act(() => level?.focus());
@@ -611,7 +611,7 @@ describe("AudioFxGroup dynamic carve", () => {
611611
const { release, decoded } = stubGatedDecode();
612612
const { host, onSetAttributeLive } = mount({ "fx-chain": CHAIN });
613613
document.getElementById("bed")?.setAttribute("src", "bed.wav");
614-
act(() => byTextButton(host, "Add effect")?.click());
614+
act(() => byTextButton(host, "+ effect")?.click());
615615
act(() => byTextButton(host, "Even Out Levels")?.focus());
616616
// Straight to a neighbour, without ever leaving the shelf.
617617
act(() =>

‎packages/studio/src/components/editor/propertyPanelFxSection.test.tsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,7 @@ describe("FxSection chain", () => {
875875

876876
click(host.querySelector(".hf-fx-add"));
877877
expect(host.querySelector(".hf-fx-add-menu")).toBeNull();
878-
expect(byText(host, "button", "Add effect")).toBeTruthy();
878+
expect(byText(host, "button", "+ effect")).toBeTruthy();
879879
});
880880

881881
it("opens one menu in place of the other", () => {
@@ -1046,7 +1046,7 @@ describe("FxSection chain", () => {
10461046

10471047
it("auditions an effect the add menu is offering", () => {
10481048
const { host, onChainPreview, onChainChange } = mount({ chain: chainOf("peaking") });
1049-
click(byText(host, "button", "Add effect"));
1049+
click(byText(host, "button", "+ effect"));
10501050
enter(byText(host, "button", EFFECT_COPY.reverb?.title ?? ""));
10511051

10521052
const heard = onChainPreview.mock.calls.at(-1)?.[0] as HfAudioFxChain;
@@ -1063,7 +1063,7 @@ describe("FxSection chain", () => {
10631063
onLevel: vi.fn(),
10641064
onAuditionLevel,
10651065
});
1066-
click(byText(host, "button", "Add effect"));
1066+
click(byText(host, "button", "+ effect"));
10671067
enter(byText(host, "button", "Even Out Levels"));
10681068
expect(onAuditionLevel).toHaveBeenLastCalledWith(true);
10691069
leave(host, ".hf-fx-add-menu");

‎packages/studio/src/components/editor/propertyPanelFxSection.tsx‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -511,10 +511,10 @@ export function FxSection({
511511
opened one and changed their mind had no way back: picking something
512512
was the only thing that set these false, so the only exits were adding
513513
an effect they did not want or deselecting the clip. */}
514-
<div className="flex gap-1">
514+
<div className="flex flex-col gap-1">
515515
<button
516516
type="button"
517-
className="hf-fx-preset w-full rounded-[4px] border border-dashed border-panel-border-input py-1 text-[11px] text-panel-text-2 hover:text-panel-text-0 disabled:opacity-40"
517+
className="hf-fx-preset w-full rounded-[4px] border border-panel-text-0 py-1.5 text-[11px] font-semibold text-panel-text-0 disabled:opacity-40"
518518
aria-expanded={picking}
519519
disabled={disabled}
520520
onClick={() => {
@@ -530,7 +530,7 @@ export function FxSection({
530530
</button>
531531
<button
532532
type="button"
533-
className="hf-fx-add w-full rounded-[4px] border border-dashed border-panel-border-input py-1 text-[11px] text-panel-text-2 hover:text-panel-text-0 disabled:opacity-40"
533+
className="hf-fx-add self-end px-1 text-[10px] text-panel-text-2 hover:text-panel-text-0 disabled:opacity-40"
534534
aria-expanded={adding}
535535
disabled={disabled}
536536
onClick={() => {
@@ -542,7 +542,7 @@ export function FxSection({
542542
setPicking(false);
543543
}}
544544
>
545-
{adding ? "Close" : "Add effect"}
545+
{adding ? "Close" : "+ effect"}
546546
</button>
547547
</div>
548548
</div>

0 commit comments

Comments
 (0)