-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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: Paste block in viewport / near cursor #7521
feat: Paste block in viewport / near cursor #7521
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Welcome! It looks like this is your first pull request in Blockly, so here are a couple of tips:
-
You can find tips about contributing to Blockly and how to
validate your changes on our
developer site. -
All contributors must sign the Google Contributor License
Agreement (CLA). If the google-cla bot leaves a comment on this
PR, make sure you follow the instructions. -
We use conventional commits
to make versioning the package easier. Make sure your commit
message is in the proper format
or learn how to fix it. -
If any of the other checks on this PR fail, you can click on
them to learn why. It might be that your change caused a test
failure, or that you need to double-check the
style guide.
Thank you for opening this PR! A member of the Blockly team will review it soon.
Thanks for contributing! I'm working on reviewing, and I've approved the workflows to run. |
core/interfaces/i_movable.ts
Outdated
@@ -4,6 +4,8 @@ | |||
* SPDX-License-Identifier: Apache-2.0 | |||
*/ | |||
|
|||
import {Coordinate} from '../utils'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import from '../utils/coordinate.js'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the comment. I have changed accordingly and pushed it.
core/shortcut_items.ts
Outdated
@@ -12,6 +12,7 @@ import * as common from './common.js'; | |||
import {Gesture} from './gesture.js'; | |||
import {ICopyData, isCopyable} from './interfaces/i_copyable.js'; | |||
import {KeyboardShortcut, ShortcutRegistry} from './shortcut_registry.js'; | |||
import {Coordinate} from './utils.js'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import from './utils/coordinate.js'
I've added a few small comments. Once you fix those, you should be good to go! I'll keep an eye on this to keep approving the checks as you push changes. |
Thanks for the merge @rachel-fenichel . Happy to have contributed on my first issue |
It looks like this was merged into the |
This reverts commit c37f4b8.
The basics
The details
Resolves
Fixes #6848
Proposed Changes
When copying a block, blocky pastes the block near the original block. With this change, it will paste the new block either in the middle of the view or near where the cursor is.
Reason for Changes
Test Coverage
Documentation
The method getRelativeToSurfaceXY(): Coordinate is added to the IMovable interface
Additional Information