Skip to content

60 ux improvement implement safe triangle for nested menu navigation - #714

Merged
NJevric merged 4 commits into
masterfrom
60-ux-improvement-implement-safe-triangle-for-nested-menu-navigation
Nov 16, 2026
Merged

NJevric merged 4 commits into
masterfrom
60-ux-improvement-implement-safe-triangle-for-nested-menu-navigation

Conversation

@NJevric

@NJevric NJevric commented Nov 16, 2026

Copy link
Copy Markdown
Member

What does this PR do?

Adds a "safe triangle" to TieredMenu, ContextMenu, Menubar and MegaMenu. Moving the mouse diagonally from a parent item towards its open submenu no longer switches to the sibling items the pointer passes over on the way. This follows the approach from Amazon's mega dropdown.

How it works:

  • The new SafeTriangle util in @openvue/core/utils builds a safe area from the point where the pointer left the active item to the open submenu's box. It works for submenus opening to the right, to the left (flipped or RTL) and below (Menubar, MegaMenu).
  • While the pointer moves inside that area, switching to a sibling is held back. The switch happens once the pointer rests for 300ms or leaves the area over the sibling. It is dropped if the pointer reaches the submenu.
  • Only mouse input counts. Touch and pen behave as before.
  • Pressing a key or clicking an item cancels a held-back hover.
  • The pointermove listener is only attached while a submenu is open and is removed on close and unmount.

No props, events, slots or pass-through keys changed. If the submenu element can't be found (for example its id is overridden through pt), the menu falls back to the old instant switching.

Related issue

Closes #60

Checklist

  • Tests added or updated for the change
  • pnpm run lint and pnpm run format pass
  • Changelog entry added under ## [Unreleased] in CHANGELOG.md (skip for internal refactors, tests, CI, and docs typos)

@NJevric NJevric self-assigned this Nov 16, 2026
@NJevric NJevric linked an issue Nov 16, 2026 that may be closed by this pull request
@vercel

vercel Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
openvolt Ready Ready Preview Nov 16, 2026 9:51pm UTC
openvue-showcase Ready Ready Preview Nov 16, 2026 9:51pm UTC

Request Review

@NJevric
NJevric merged commit d9ba15f into master Nov 16, 2026
11 checks passed

This branch was successfully deployed

1 active deployment
Preview – openvue-showcase — 6bc7237a Deployed Nov 16, 2026 by vercel[bot]
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.

UX Improvement: Implement "Safe Triangle" for nested menu navigation

1 participant