Skip to content

refactor(site): migrate VS Code button menus off MUI - #27730

Merged
jakehwll merged 1 commit into
mainfrom
jakehwll/vscode-button-demui
Aug 3, 2026
Merged

refactor(site): migrate VS Code button menus off MUI#27730
jakehwll merged 1 commit into
mainfrom
jakehwll/vscode-button-demui

Conversation

@jakehwll

@jakehwll jakehwll commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Replace MUI Menu/MenuItem (and the Emotion css prop) in VSCodeDesktopButton and VSCodeDevContainerButton with the shared shadcn DropdownMenu.

The variant selector keeps the split-button layout, sizes the menu to the button group via an inline-flex anchor (so width is not the full parent), and uses collisionPadding so the menu stays inset from the viewport edge.

Replace MUI `Menu`/`MenuItem` (and the Emotion `css` prop) in `VSCodeDesktopButton` and `VSCodeDevContainerButton` with the shared shadcn `DropdownMenu`.

The variant selector keeps the split-button layout, sizes the menu to the button group via an `inline-flex` anchor (so width is not the full parent), and uses `collisionPadding` so the menu stays inset from the viewport edge.
@jakehwll
jakehwll requested review from DanielleMaywood and aqandrew and removed request for aqandrew August 1, 2026 03:52
@jakehwll
jakehwll requested a review from aqandrew August 1, 2026 03:52

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 95427700d9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +58 to +60
<DropdownMenu
open={isVariantMenuOpen}
anchorEl={menuAnchorRef.current}
onClose={() => setIsVariantMenuOpen(false)}
css={{
"& .MuiMenu-paper": {
width: menuAnchorRef.current?.clientWidth,
},
}}
onOpenChange={setIsVariantMenuOpen}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Add an interaction story for the desktop variant menu

When both VS Code variants are enabled, this replaces the menu's trigger, keyboard navigation, selection, and closing behavior, but VSCodeDesktopButton.stories.tsx still only renders the component and has no play function. Add a story interaction that opens the dropdown, selects a variant, and verifies the resulting visible state so regressions in this migration are exercised.

AGENTS.md reference: site/AGENTS.md:L9-L10

Useful? React with 👍 / 👎.

Comment on lines +62 to +64
<DropdownMenu
open={isVariantMenuOpen}
anchorEl={menuAnchorRef.current}
onClose={() => setIsVariantMenuOpen(false)}
css={{
"& .MuiMenu-paper": {
width: menuAnchorRef.current?.clientWidth,
},
}}
onOpenChange={setIsVariantMenuOpen}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Add an interaction story for the dev-container variant menu

When both VS Code variants are enabled, this independently replaces the dev-container menu's interaction behavior, but VSCodeDevContainerButton.stories.tsx has no play function and therefore never opens or selects from this dropdown. Add a story interaction that opens the menu, selects a variant, and verifies the updated visible state.

AGENTS.md reference: site/AGENTS.md:L9-L10

Useful? React with 👍 / 👎.

@jakehwll
jakehwll merged commit 0028fea into main Aug 3, 2026
48 of 49 checks passed
@jakehwll
jakehwll deleted the jakehwll/vscode-button-demui branch August 3, 2026 09:10
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants