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

feat: allow ContextMenu.svelte to open on all sides #6080

Merged
merged 13 commits into from
Jan 30, 2025

Conversation

ndom91
Copy link
Contributor

@ndom91 ndom91 commented Jan 24, 2025

🧢 Changes

  • Add side prop ('left' | 'right' | 'top' | 'bottom') to ContextMenu.svelte
  • Updated viewport intersection implementation

Sidebar Btn ContextMenu is currently set to right + bottom alignment in this PR.
image

The design has it aligned right + top so it grows down from the top edge of the trigger button, but we have too many items in the menu atm so it would exit the viewport at the bottom and then be autocorrected to another orientation.

Another follow-up PR to this one is to enable multi-level context menus like in the design, which will fix this issue:

image

☕️ Reasoning

Copy link

vercel bot commented Jan 24, 2025

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

Name Status Preview Comments Updated (UTC)
gitbutler-components ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 29, 2025 2:01pm
gitbutler-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 29, 2025 2:01pm

@vercel vercel bot temporarily deployed to Preview – gitbutler-web January 28, 2025 10:45 Inactive
@ndom91 ndom91 force-pushed the feat-contextMenu-add-left-right-side-options branch from 7a9f40c to 65ea43c Compare January 28, 2025 10:46
@vercel vercel bot temporarily deployed to Preview – gitbutler-web January 28, 2025 10:46 Inactive
@ndom91 ndom91 changed the title feat: ContextMenu.svelte left/right opening support feat: allow ContextMenu.svelte to open on all sides Jan 28, 2025
@ndom91 ndom91 merged commit 88862b5 into master Jan 30, 2025
19 checks passed
@ndom91 ndom91 deleted the feat-contextMenu-add-left-right-side-options branch January 30, 2025 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants