Skip to content

Add submenuTrigger option for dropdown items - #548

Merged
gschier merged 2 commits into
mainfrom
feat/dropdown-submenu-trigger
Aug 15, 2026
Merged

Add submenuTrigger option for dropdown items#548
gschier merged 2 commits into
mainfrom
feat/dropdown-submenu-trigger

Conversation

@gschier

@gschier gschier commented Aug 15, 2026

Copy link
Copy Markdown
Member

Adds submenuTrigger: "row" | "button" to dropdown items.

  • "row" (default) is existing behavior, so nothing changes for current menus
  • "button" keeps the row selectable via onSelect and renders an ellipsis button on the right that opens the submenu on click (or ArrowRight)

Also makes keepOpenOnSelect on a submenu item close only that submenu instead of the whole menu, since its items usually no longer describe the row after the action runs.

Needed by #338, which uses it for per-item pin/remove actions in the filter history menu.

Adds an opt-in "button" submenu trigger, where the row stays selectable and a
dedicated ellipsis button on the right opens the submenu. Also makes
keepOpenOnSelect on a submenu item close only that submenu, keeping the parent
menu open.
@greptile-apps

greptile-apps Bot commented Aug 15, 2026

Copy link
Copy Markdown

Greptile Summary

Adds configurable row- or button-triggered dropdown submenus while preserving selectable parent rows.

  • Adds a dedicated ellipsis trigger for button-triggered submenus.
  • Supports ArrowRight keyboard opening and submenu-local closure after selection.
  • Prevents hovering the owning row from dismissing its active submenu.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
apps/yaak-client/components/core/Dropdown.tsx Implements button-triggered submenu rendering, keyboard behavior, selection handling, and the corrected hover-dismissal condition.

Reviews (2): Last reviewed commit: "Don't dismiss a submenu when hovering th..." | Re-trigger Greptile

Comment thread apps/yaak-client/components/core/Dropdown.tsx
@gschier
gschier merged commit dc79318 into main Aug 15, 2026
6 checks passed
@gschier
gschier deleted the feat/dropdown-submenu-trigger branch August 15, 2026 05:40
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.

1 participant