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

fix: right click on request opens far to the right #8181 #8234

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

iamtimleonard
Copy link

This addresses and closes #8181.

The current behavior when right clicking on a request or request group is for the context menu to always open at the far right side of the panel:
Screen Shot 2024-12-05 at 4 36 30 PM

This fix allows the context menu to open at the location of the cursor, if needed:
Screen Shot 2024-12-05 at 4 36 50 PM

contextMenuPosition catches the location of the user's cursor onContextMenu and passes it down to RequestGroupActionsDropdown or RequestActionsDropdown. setContextMenuPosition also needs to be passed down to those components to reset contextMenuPosition onOpenChange (eg the user instead clicks on the icon to open the dropdown).

The x and y positions are then dynamically applied to the dropdown if needed.

It isn't the prettiest solution but it gets the job done. I wasn't sure how to test this, so let me know if that is a requirement.

@CLAassistant
Copy link

CLAassistant commented Dec 5, 2024

CLA assistant check
All committers have signed the CLA.

@filfreire filfreire force-pushed the fix/right-clicking-on-a-request branch from b8d9303 to 82201ca Compare December 6, 2024 09:07
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.

Right clicking on a request opens the context menu far away on the right
2 participants