Skip to content

Commit 35794ce

Browse files
committed
fix(calm-suite): label save items plainly under a layout-scoped section header
The two save items read as duplicates ("CALM JSON — with layout" / "Save As… (new file)"). Move the "what you get" into the section header and let the items be the familiar pair: JSON w/ CALM Suite Layout Save ⌘S Save as... ⇧⌘S Labels only; onsave/onsaveas unchanged. Studio 498 tests; build clean. Claude-Session: https://claude.ai/code/session_01QDBBQRnkBcihrZRt24L41b Signed-off-by: Eddie Knight <knight@linux.com>
1 parent a88828f commit 35794ce

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

calm-suite/calm-studio/apps/studio/src/lib/toolbar/Toolbar.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -287,14 +287,14 @@
287287

288288
{#if showExportMenu}
289289
<div class="export-menu" role="menu" aria-label="Save and export options">
290-
<div class="export-menu-label">Save (keeps your layout)</div>
290+
<div class="export-menu-label">JSON w/ CALM Suite Layout</div>
291291
<button
292292
type="button"
293293
class="export-menu-item"
294294
role="menuitem"
295295
onclick={() => handleExportOption(onsave)}
296296
>
297-
<span>CALM JSON — with layout</span>
297+
<span>Save</span>
298298
<span class="menu-shortcut">⌘S</span>
299299
</button>
300300
<button
@@ -303,7 +303,7 @@
303303
role="menuitem"
304304
onclick={() => handleExportOption(onsaveas)}
305305
>
306-
<span>Save As… (new file)</span>
306+
<span>Save as...</span>
307307
<span class="menu-shortcut">⇧⌘S</span>
308308
</button>
309309
<div class="export-menu-divider" role="separator"></div>

calm-suite/calm-studio/apps/studio/src/tests/components/Toolbar.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,19 +79,19 @@ describe('Toolbar — button callbacks', () => {
7979
expect(onopen).toHaveBeenCalledOnce();
8080
});
8181

82-
it('calls onsave from the "with layout" item in the Save / Export menu', async () => {
82+
it('calls onsave from the Save item in the Save / Export menu', async () => {
8383
const onsave = vi.fn();
8484
const { getByRole, getByText } = render(Toolbar, { props: makeToolbarProps({ onsave }) });
8585
await fireEvent.click(getByRole('button', { name: /save or export diagram/i }));
86-
await fireEvent.click(getByText('CALM JSON — with layout'));
86+
await fireEvent.click(getByText('Save'));
8787
expect(onsave).toHaveBeenCalledOnce();
8888
});
8989

90-
it('calls onsaveas from the "Save As" item in the menu', async () => {
90+
it('calls onsaveas from the "Save as..." item in the menu', async () => {
9191
const onsaveas = vi.fn();
9292
const { getByRole, getByText } = render(Toolbar, { props: makeToolbarProps({ onsaveas }) });
9393
await fireEvent.click(getByRole('button', { name: /save or export diagram/i }));
94-
await fireEvent.click(getByText(/Save As/));
94+
await fireEvent.click(getByText('Save as...'));
9595
expect(onsaveas).toHaveBeenCalledOnce();
9696
});
9797

0 commit comments

Comments
 (0)