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: support dragging comments in the gesture #7977

Merged
merged 2 commits into from
Apr 2, 2024

Conversation

BeksOmega
Copy link
Collaborator

The basics

The details

Resolves

Fixes N/A

Proposed Changes

Makes it so the gesture handles starting drags on comments. The code for starting drags is going to get refactored an unified in a bit, but I wanted to be able to test the comment dragging before then.

Test Coverage

Manually tested, and drags to occur!

Documentation

N/A

Additional Information

N/A

@github-actions github-actions bot added the PR: feature Adds a feature label Mar 29, 2024
@BeksOmega BeksOmega force-pushed the feat/gesture-drag-comments branch from 5426568 to 76d6f03 Compare April 1, 2024 17:27
@BeksOmega BeksOmega marked this pull request as ready for review April 1, 2024 21:11
@BeksOmega BeksOmega requested a review from a team as a code owner April 1, 2024 21:11
core/gesture.ts Outdated
@@ -427,6 +454,27 @@ export class Gesture {
this.dragger.onDrag(e, this.currentDragDeltaXY);
}

/** Start dragging the selected bubble. */
Copy link
Collaborator

Choose a reason for hiding this comment

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

bubble -> comment

core/gesture.ts Outdated
}
if (!this.startWorkspace_) {
throw new Error(
'Cannot update dragging the bubble because the start ' +
Copy link
Collaborator

Choose a reason for hiding this comment

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

bubble -> comment

core/gesture.ts Outdated
handleCommentStart(e: PointerEvent, comment: RenderedWorkspaceComment) {
if (this.gestureHasStarted) {
throw Error(
'Tried to call gesture.handleBubbleStart, ' +
Copy link
Collaborator

Choose a reason for hiding this comment

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

handleBubbleStart -> handleCommentStart

Copy link
Collaborator

@rachel-fenichel rachel-fenichel left a comment

Choose a reason for hiding this comment

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

LGTM after you fix the naming issues in comments and warnings.

@BeksOmega BeksOmega enabled auto-merge (squash) April 2, 2024 20:06
@BeksOmega BeksOmega merged commit f7bdfa2 into google:rc/v11.0.0 Apr 2, 2024
6 checks passed
johnnesky pushed a commit to johnnesky/blockly that referenced this pull request Apr 13, 2024
* feat: add dragging of comments in gesture

* chore: fix naming problems
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: feature Adds a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants