fix(emcn): drop the brand highlight from popover menus by waleedlatif1 · Pull Request #6506 · simstudioai/sim · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(emcn): drop the brand highlight from popover menus
Context menus opted into a palette of their own — `variant='secondary'` for a
brand-blue row highlight and `colorScheme='inverted'` for a dark card — so the
canvas, block, toolbar, terminal, sidebar, and preview menus looked nothing like
the menus everywhere else in the product.

Removes both overrides so they inherit the same surface, border, and
`--surface-active` highlight the terminal's overflow menu already uses, and drops
the brand state from the Popover itself along with the `variant` prop that only
ever selected it. One fewer way to style a menu.
  • Loading branch information
waleedlatif1 committed Aug 10, 2026
commit 93ff06b40fab8f399325d148aeaea95ceb652cd7
6 changes: 3 additions & 3 deletions apps/sim/app/playground/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,7 @@ export function BlockMenu({
}

return (
<Popover
open={isOpen}
onOpenChange={(open) => !open && onClose()}
variant='secondary'
size='sm'
colorScheme='inverted'
>
<Popover open={isOpen} onOpenChange={(open) => !open && onClose()} size='sm'>
<PopoverAnchor
style={{
position: 'fixed',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,7 @@ export function CanvasMenu({
hasBlocks = false,
}: CanvasMenuProps) {
return (
<Popover
open={isOpen}
onOpenChange={(open) => !open && onClose()}
variant='secondary'
size='sm'
colorScheme='inverted'
>
<Popover open={isOpen} onOpenChange={(open) => !open && onClose()} size='sm'>
<PopoverAnchor
style={{
position: 'fixed',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,7 @@ export function Chat() {

<div className='flex flex-shrink-0 items-center gap-2'>
{/* More menu with actions */}
<Popover variant='default' size='sm' open={moreMenuOpen} onOpenChange={setMoreMenuOpen}>
<Popover size='sm' open={moreMenuOpen} onOpenChange={setMoreMenuOpen}>
<PopoverTrigger asChild>
<Button
variant='ghost'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,7 @@ export function ToolbarItemContextMenu({
showViewDocumentation = false,
}: ToolbarItemContextMenuProps) {
return (
<Popover
open={isOpen}
onOpenChange={(open) => !open && onClose()}
variant='secondary'
size='sm'
colorScheme='inverted'
>
<Popover open={isOpen} onOpenChange={(open) => !open && onClose()} size='sm'>
<PopoverAnchor
style={{
position: 'fixed',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,7 @@ export const LogRowContextMenu = memo(function LogRowContextMenu({
const isStatusFiltered = entry ? filters.statuses.has(entryStatus) : false

return (
<Popover
open={isOpen}
onOpenChange={(open) => !open && onClose()}
variant='secondary'
size='sm'
colorScheme='inverted'
>
<Popover open={isOpen} onOpenChange={(open) => !open && onClose()} size='sm'>
<PopoverAnchor
style={{
position: 'fixed',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,7 @@ export const OutputContextMenu = memo(function OutputContextMenu({
hasSelection,
}: OutputContextMenuProps) {
return (
<Popover
open={isOpen}
onOpenChange={(open) => !open && onClose()}
variant='secondary'
size='sm'
colorScheme='inverted'
>
<Popover open={isOpen} onOpenChange={(open) => !open && onClose()} size='sm'>
<PopoverAnchor
style={{
position: 'fixed',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,7 @@ export const WorkflowControls = memo(function WorkflowControls() {
onContextMenu={handleContextMenu}
>
{/* Canvas Mode Selector */}
<Popover
open={isCanvasModeOpen}
onOpenChange={setIsCanvasModeOpen}
variant='secondary'
size='sm'
>
<Popover open={isCanvasModeOpen} onOpenChange={setIsCanvasModeOpen} size='sm'>
<Tooltip.Root>
<PopoverTrigger asChild>
<div className='flex cursor-pointer items-center gap-1'>
Expand Down Expand Up @@ -197,9 +192,7 @@ export const WorkflowControls = memo(function WorkflowControls() {
<Popover
open={contextMenu !== null}
onOpenChange={(open) => !open && setContextMenu(null)}
variant='secondary'
size='sm'
colorScheme='inverted'
>
<PopoverAnchor
style={{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,7 @@ export function PreviewContextMenu({
if (typeof document === 'undefined') return null

return createPortal(
<Popover
open={isOpen}
onOpenChange={(open) => !open && onClose()}
variant='secondary'
size='sm'
colorScheme='inverted'
>
<Popover open={isOpen} onOpenChange={(open) => !open && onClose()} size='sm'>
<PopoverAnchor
style={{
position: 'fixed',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,7 @@ export function EmptyAreaContextMenu({
disableCreateFolder = false,
}: EmptyAreaContextMenuProps) {
return (
<Popover
open={isOpen}
onOpenChange={(open) => !open && onClose()}
variant='secondary'
size='sm'
colorScheme='inverted'
>
<Popover open={isOpen} onOpenChange={(open) => !open && onClose()} size='sm'>
<PopoverAnchor
style={{
position: 'fixed',
Expand Down
45 changes: 8 additions & 37 deletions packages/emcn/src/components/popover/popover.tsx
Loading