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

Make menu bar entries clickable by dragging from the header button and releasing on the entry #2164

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

a-khushal
Copy link

Closes #1912 (header bar and widgets sub-issue).

@Keavon
Copy link
Member

Keavon commented Dec 26, 2024

!build

Copy link

📦 Build Complete for f5a6725
https://f16deb7d.graphite.pages.dev

@Keavon
Copy link
Member

Keavon commented Dec 26, 2024

Your implementation removes the ability to click on the menus without them disappearing again immediately.

@a-khushal
Copy link
Author

Can you please explain about the expected behaviour

@Keavon
Copy link
Member

Keavon commented Dec 26, 2024

The expected behavior should be the same as with any other software application that has a menu bar, e.g. VS Code. Give that a try and experiment a bit.

@Keavon Keavon marked this pull request as draft December 28, 2024 11:06
@Keavon Keavon changed the title feat: implement mousedown drag-to-select behavior for menu bar entries Make menu bar entries clickable by dragging from the header button and releasing on the entry Dec 28, 2024
@a-khushal
Copy link
Author

@Keavon, can you please check now, I have pushed changes to the same branch.
I have implemented features similar to VS code's menubar:

  • select a menu entry by dragging from the header and releasing on that entry
  • right click on menu header to close the menu

@Keavon
Copy link
Member

Keavon commented Jan 1, 2025

!build

Copy link

github-actions bot commented Jan 1, 2025

📦 Build Complete for 4f256e7
https://382330fa.graphite.pages.dev

@Keavon
Copy link
Member

Keavon commented Jan 1, 2025

This breaks when holding down the mouse and moving left/right from one menu bar button to another, like from "File" to "Edit". It then requires several more clicks to regain a non-broken state so the menus work correct. Reference VS Code again for how you should be able to switch left and right between menus while click-and-release or click-and-hold ing.

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.

Make all dragging actions abortable with right click
2 participants