Skip to content

Conversation

@AdRiley
Copy link
Member

@AdRiley AdRiley commented Jan 15, 2026

Pull Request Description

Closes #14587

  • Adds right click menu for multiple components
image
  • Adds submenus for alignment buttons
image image
  • Right click off components, de-selects and opens workflow menu
image

Important Notes

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    TypeScript,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • Unit tests have been written where possible.
  • If meaningful changes were made to logic or tests affecting Enso Cloud integration in the libraries,
    or the Snowflake database integration, a run of the Extra Tests has been scheduled.
    • If applicable, it is suggested to paste a link to a successful run of the Extra Tests.

@AdRiley AdRiley changed the title Wip/adr/add group context menu Add right click menu for multiple components Jan 16, 2026
@AdRiley AdRiley marked this pull request as ready for review January 16, 2026 09:09
Comment on lines +503 to +511
<DropdownMenu
v-if="nodeSelection.selected.size > 1"
v-model:open="alignmentMenuOpenModel"
class="alignmentSubmenu"
placement="right-start"
title="Align"
@pointerenter="handleAlignmentMenuEnter"
@pointerleave="handleAlignmentMenuLeave"
>
Copy link
Contributor

Choose a reason for hiding this comment

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

We use here a heavily customized DropDownMenu, which is misnamed (it's not dropping down anymore), with :deep selectors to style it. For me these are signs this should be a separate component, not DropdownMenu. It may be based of MenuEntry regarding styling. It could also take some logic from GraphNode.

Comment on lines +524 to +537
<div
class="alignmentSubmenuPanel"
@pointerenter="handleAlignmentMenuEnter"
@pointerleave="handleAlignmentMenuLeave"
>
<MenuPanel class="alignmentMenu">
<MenuEntry
v-for="action in alignmentMenuActions"
:key="action"
:action="action"
@click="closeAllMenus"
/>
</MenuPanel>
</div>
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems like an instance of ActionMenu

Comment on lines +442 to +446
function closeAllMenus() {
// Close both menus
alignmentMenuOpen.value = false
contextMenuTrigger.value?.close()
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be both menus opened by once anytime?

We usually handle such things using Interactions - an example in https://github.com/enso-org/enso/blob/develop/app/gui/src/project-view/components/DropdownMenu.vue#L28-36

Comment on lines +31 to +36
const {
menuOpen: alignmentMenuOpen,
menuOpenModel: alignmentMenuOpenModel,
handleMenuEnter: handleAlignmentMenuEnter,
handleMenuLeave: handleAlignmentMenuLeave,
} = useHoverMenu()
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this logic be a part of every "DropDownMenu"?

Comment on lines +107 to +110
/** Whether the menu is currently open */
menuOpen: menuOpen as Ref<boolean>,
/** Two-way binding model for v-model:open that respects hover state */
menuOpenModel,
Copy link
Contributor

Choose a reason for hiding this comment

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

It's not quite clear to me, when reading menuOpen may differ from reading menuOpenModel

clearMenuCloseTimeout()
})

return {
Copy link
Contributor

Choose a reason for hiding this comment

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

As a rule, we return proxyRefs from composables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Context menu for group of components

3 participants