Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor context menus #2302

Merged
merged 21 commits into from
Aug 22, 2022
Merged

refactor context menus #2302

merged 21 commits into from
Aug 22, 2022

Conversation

shanberg
Copy link
Collaborator

Major

  • Context menus can now have multiple contributors (block, page, etc.)
  • Only one context menu is ever mounted

Minor

  • Left-clicking block anchors opens the menu again
  • Scrolling closes the menu
  • Only one menu can appear on the screen

@vercel
Copy link

vercel bot commented Aug 22, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
athens ✅ Ready (Inspect) Visit Preview Aug 22, 2022 at 11:01PM (UTC)

@@ -362,7 +362,7 @@
reactions (and reactions-enabled?
(block-reaction/props->reactions properties))
menu (r/as-element
[:> MenuList {:class "anchor"}
Copy link
Collaborator

Choose a reason for hiding this comment

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

The menu items need to have an .anchor class as a parent, otherwise, multiple block selection gets cleared when trying to click one of the buttons. #2296

@@ -362,7 +362,18 @@
reactions (and reactions-enabled?
(block-reaction/props->reactions properties))
menu (r/as-element
[:<>
[:> MenuGroup {:className ".anchor"}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copying multiple block refs or text from multiple selected blocks only copies from one. Class name might need to be anchor, not .anchor.

@shanberg shanberg merged commit b9d3e48 into athensresearch:main Aug 22, 2022
@shanberg shanberg deleted the context-menu-2 branch August 22, 2022 23:08
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.

2 participants