Skip to content

Components: Add context-menu opening and point anchors for Menu #4383

Open

Description

@JasonVMo

Goal

Add context-menu presentation to the agentic Menu: opening a Menu from a secondary click or a keyboard context-menu invocation, anchored at the invocation point or element. This scope was deferred from the first Menu delivery by owner decision on 2026-10-16. Part of #4274. Trigger-anchored Menu, MenuButton, and Popover delivery remain #4232, #4231, and #4236; do not duplicate them.

Observed baseline — 2026-10-16

  • The modern native-core Callout (/macos and /windows previews) already accepts view, owner-relative rect, and owner-relative point anchors (packages/agentic/native-core/src/components/callout/Callout.types.ts). No agentic component exposes point anchoring, and no component detects secondary-click or context-menu-key input.
  • The legacy Win32 Callout accepts an anchorRect in DIPs relative to the React surface origin (packages/agentic/native-core/src/legacy/callout/Callout.types.ts). Point anchoring on the prebuilt Office host is unverified.
  • The first Menu delivery (Components: Generate Menu #4232) anchors to its trigger view only.

Acceptance

  • Review a Menu contract amendment covering context-menu opening sources (secondary click, the platform context-menu key or shortcut, and assistive-technology show-menu actions), point versus element anchoring, placement with flip and clamping around a point, entry focus, focus return to the invoking element, and dismissal.
  • Qualify secondary-click and context-menu-key delivery on macOS Paper and Fabric, Windows Fabric, and Win32. Record unsupported paths explicitly; do not emulate secondary input with primary presses.
  • Expose point anchoring through the public Menu API (and Popover, if approved) only after native point anchoring is qualified on every platform, including Win32, with RTL, display scaling, multiple monitors, and scrolled anchors (coordinate with Components: Complete Callout geometry, lifecycle, and assistive-technology qualification #4375).
  • Ship on all desktop endpoints together (macOS Paper and Fabric, Windows Fabric, Win32), matching the platform policy for the Menu family.
  • Add stories with top-level wdio cases and record per-endpoint executed, passed, failed, and skipped counts; skips are not passes.

Evidence

  • Deferred during Popover, Menu, MenuButton, and Dropdown implementation planning against main e2092f9df3fd4fafc141c696ca0e49e690d69cd1.
  • The pinned Flex Menu guidance includes context-menu opening; the Components: Generate Menu #4232 contract should record it as deferred scope linked here rather than as an unsupported promise.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions