Skip to content

FE-1132: Add RightClickMenu to DS#8950

Merged
alex-e-leon merged 2 commits into
mainfrom
FE-1132-right-click-menu
Jul 6, 2026
Merged

FE-1132: Add RightClickMenu to DS#8950
alex-e-leon merged 2 commits into
mainfrom
FE-1132-right-click-menu

Conversation

@alex-e-leon

Copy link
Copy Markdown
Contributor

🌟 What is the purpose of this PR?

Adds a right click menu component to the DS

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

This PR:

  • does not modify any publishable blocks or libraries, or modifications do not need publishing

📜 Does this require a change to the docs?

The changes in this PR:

  • are internal and do not require a docs change

@vercel

vercel Bot commented Jul 3, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
hash Ready Ready Preview, Comment Jul 6, 2026 1:35pm
hashdotdesign-tokens Ready Ready Preview, Comment Jul 6, 2026 1:35pm
petrinaut Ready Ready Preview, Comment Jul 6, 2026 1:35pm

@cursor

cursor Bot commented Jul 3, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
UI-only DS additions and animation styling tweaks with no auth, data, or API changes; minor visual difference for existing Menu/Select surfaces.

Overview
Adds a RightClickMenu design-system component that opens the same grouped MenuItem / SelectableList UI on right-click (or long-press) over wrapped children, with configurable position, portal rendering, keyboard loop selection, and a Ladle story.

collectSelectedIds is exported from menu so the context menu can mirror Menu selection highlighting. RightClickMenu is re-exported from the package entry.

SelectableList styling now picks a component recipe variant: Select keeps scale-based popoverIn / popoverOut; Menu (including right-click) uses opacity-only fadeIn / fadeOut. popoverIn / popoverOut keyframes in the preset use a slightly subtler scale (0.98 vs 0.96).

Reviewed by Cursor Bugbot for commit 852e089. Bugbot is set up for automated code reviews on this repo. Configure here.

@lunelson lunelson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Two things jump out at me

  1. you can't do it in a single press-release cycle, i.e. mouse-down, drag to the position of the item you want, release to select (as normal context menus can do)
  2. I'm not a fan of zoom transitions on drop-down menus, I would use position only, or no transition at all

@alex-e-leon

Copy link
Copy Markdown
Contributor Author

Two things jump out at me

  1. you can't do it in a single press-release cycle, i.e. mouse-down, drag to the position of the item you want, release to select (as normal context menus can do)
  2. I'm not a fan of zoom transitions on drop-down menus, I would use position only, or no transition at all

@lunelson - thanks for the feedback. Agree with you about the menu animation, I've updated it so that Menu only has a subtle fade in/out animation instead.

Re the right click issue, agree with you again, but this behaviour is actually driven by ark-ui - to fix it I'd need to override/re-implement the behaviour, which took claude ~150 loc. Claude also mentioned that right click behaves the way we expect it on windows + linux, and that this is an OSX only issue. I haven't/can't test to see if thats correct, but assuming it is, I think all things considered its not worth fixing this for now.

@alex-e-leon alex-e-leon added this pull request to the merge queue Jul 6, 2026
Merged via the queue into main with commit ea0db51 Jul 6, 2026
48 checks passed
@alex-e-leon alex-e-leon deleted the FE-1132-right-click-menu branch July 6, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/apps > hash.design Affects the `hash.design` design site (app) area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team

Development

Successfully merging this pull request may close these issues.

2 participants