Skip to content

Commit 63dcec6

Browse files
committed
fix: show both menus in the VSCodeParity Menu story, drop the trigger button
The captured screenshot only showed our DropdownMenu, missing the VscodeContextMenu reference next to it. Switching to defaultOpen with an invisible trigger anchor renders both from the start, matching the reference's always-open show prop, and removes the unneeded visible "Menu" button from the comparison.
1 parent 4b878ae commit 63dcec6

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

packages/ui/src/vscode-parity.stories.tsx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import { ProgressBar } from "./components/ProgressBar/ProgressBar";
2424
import { SearchInput } from "./components/SearchInput/SearchInput";
2525
import { Spinner } from "./components/Spinner/Spinner";
2626
import { StatusPill } from "./components/StatusPill/StatusPill";
27-
import { openMenu, PIXEL_ALL_THEMES } from "./storybook";
27+
import { PIXEL_ALL_THEMES } from "./storybook";
2828

2929
import type { Meta, StoryObj } from "@storybook/react-vite";
3030

@@ -177,8 +177,7 @@ const Parity = (): React.JSX.Element => (
177177
</div>
178178
);
179179

180-
/* The reference menu renders inline; ours is a real portalled DropdownMenu,
181-
so the play function opens it under its trigger. */
180+
/* defaultOpen + an invisible trigger mirror the reference's `show`. */
182181
const MenuParity = (): React.JSX.Element => (
183182
<div
184183
style={{
@@ -189,9 +188,9 @@ const MenuParity = (): React.JSX.Element => (
189188
fontSize: "13px",
190189
}}
191190
>
192-
<DropdownMenu>
191+
<DropdownMenu defaultOpen>
193192
<DropdownMenuTrigger asChild>
194-
<Button variant="secondary">Menu</Button>
193+
<span />
195194
</DropdownMenuTrigger>
196195
<DropdownMenuContent>
197196
<DropdownMenuItem>Start workspace</DropdownMenuItem>
@@ -228,7 +227,4 @@ export const SideBySide: Story = {};
228227

229228
export const Menu: Story = {
230229
render: () => <MenuParity />,
231-
play: async ({ canvasElement }) => {
232-
await openMenu(canvasElement, "Menu");
233-
},
234230
};

0 commit comments

Comments
 (0)