-
Notifications
You must be signed in to change notification settings - Fork 193
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
Contextmenu updates #782
Merged
Merged
Contextmenu updates #782
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. longtouch timer in mouseDown sends a contextmenu PointerEvent with x,y coordinates 2. handleContextMenu should allow wiggle room for the longtouch contextmenu event 3. Clear the longtouch timeout if mousemove detects we've dragged away from the target 4. Mark isDragging false when actually invoking the context menu, so we ignore mouseups 5. Add longTouchDuration and longTouchTimeout to instance data
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #782 +/- ##
==========================================
+ Coverage 75.01% 75.47% +0.46%
==========================================
Files 141 141
Lines 11610 11619 +9
Branches 2161 2165 +4
==========================================
+ Hits 8709 8770 +61
+ Misses 2597 2549 -48
+ Partials 304 300 -4 ☔ View full report in Codecov by Sentry. |
dkoes
approved these changes
Apr 6, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains updates for Context Menu functionality:
userContextMenuHandler
clickSelection
events, you may not agree with this change)testcontextmenu
test covering all of the aboveMinor: Renamed
contextMenuEnabledAtoms
tocontextMenuEnabledObjects
The test ended up being complicated, especially because glcheck looks at a single canvas, and also because there are differences in how glcheck and jest simulate the page. The test can definitely be improved or clarified, but it is working.
Also: the commit history for this isn't as clean as I would have preferred. You may wish to do "Squash and Merge"
I can also clean it up if you prefer.