10000 feat: merge branch `osd` into `develop` by maribethb · Pull Request #8173 · google/blockly · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: merge branch osd into develop #8173

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

Merged
merged 18 commits into from
May 23, 2024
Merged

Conversation

maribethb
Copy link
Contributor
@maribethb maribethb commented May 23, 2024

The basics

The details

Resolves

Fixes #6848 & many others already marked closed

Proposed Changes

  • Merges the osd branch into develop
  • Reverts the first commit from that branch, "Revert "chore(deps): update webdriverio to 8.16 and stop using selenium-standalone" (revert: "chore(deps): update webdriverio to 8.16 and stop using seleni… #7520)" because this fix was later fixed by updating webdriverio again, so there's no need to downgrade [this revert was done during the merge]
  • Reverts "feat: Paste block in viewport / near cursor (feat: Paste block in viewport / near cursor #7521)" and updates the cut and paste commands to what they are in develop. This is due to these methods and some related APIs having been changed in develop before this was merged.
  • Reapplies the changes from feat: Paste block in viewport / near cursor #7521 and fix: pasting with nothing selected #7561 taking into account the changes that were made in v11 for dragging and workspace comments.
    • The original PR adds getRelativeToSurfaceXY to the IMovable interface. However, doing so would have been have been a breaking change since this interface is public. Additionally, it seems no longer necessary as this interface appears to be totally unused now within Blockly. The precondition function for copy checks that the selected object isDraggable 10000 , and the IDraggable interface includes getRelativeToSurfaceXY. Therefore, no changes to any interfaces were required.
    • The original PR incorrectly used the coordinates of the selected object when pasting, but no selection is required when pasting as all the data needed has already been saved. This was fixed in fix: pasting with nothing selected #7561 and I've used that fix here as well as including the improvement to use contains instead of doing manual coordinate math.
    • The original fixes passed the saved copyCoords when they were within the viewport. Instead, I chose not to pass any coordinates and let the paster choose the location. This has the same effect in practice but may be better in the future depending on the paster.
    • I also accounted for the fact that copyCoords might be null, and I don't return early if that's the case, I just let the paster handle the location as before. In practice, I don't think they ever will be null with the current set of copyable objects, but since getRelativeToSurfaceXY is only required by the IDraggable interface and not the ICopyable interface, this seemed prudent.

Reason for Changes

Merging in fixes from contributors.

Test Coverage

I have hand-checked each of the commits to ensure they are still relevant & intended. Aside from the two mentioned above, these changes are all relevant, intended, plus straightforward. The paste behavior has been checked carefully, including looking for symptoms of #8099, after reapplying #7521. Tested both block & workspace comment pasting within viewport & after scrolling.

Documentation

Additional Information

As an aside, it's interesting to note that the preconditionFn for copy requires that the selected item be both copyable and draggable. The preconditionFn for cut does not check that the selected item be draggable, but the actual callback does return false if the object isn't draggable. Fixing that seemed outside the scope of this PR though.

This PR should be merged, not squashed

maribethb and others added 16 commits September 22, 2023 11:47
* minor: update return type of widgetCreate_

Signed-off-by: Akanksha Kushwaha <cmakanksha@gmail.com>

* minor: remove 'as HTMLInputElement' cast

Signed-off-by: Akanksha Kushwaha <cmakanksha@gmail.com>

* minor: update return type and cast

Signed-off-by: Akanksha Kushwaha <cmakanksha@gmail.com>

---------

Signed-off-by: Akanksha Kushwaha <cmakanksha@gmail.com>
fix: move delete keyboard shortcut in-progress gesture check to precondition google#6274
* removed internal from horizontal and vertical flyout

* feat : made the method isDragTowardWorkspace non private

* feat : made the method isDragTowardWorkspace non private

---------

Co-authored-by: Ramya Non-IU <ramyaram2092@outlook.com>
* fix: Paste block in viewport / near cursor

* Fix: formatting fix with prettier

* fix import path for Coordinate

* fix import path for coordinate

* paste so that the block's center is at the viewport center
* Removed underscore from isLabel_ in flyout_button.ts

* chore: rename isLabel_ to isFlyoutLabel in flyout_button.ts

* fix: format

---------

Co-authored-by: sayali-kandarkar <skandark@andrew.cmu.edu>
…oogle#7191 (google#7517)

* addition of the .gitattributes file

* Update .gitattributes
)

* Feat: Added an API to programmatically scroll the workspace

Feat: Added an API to programmatically scroll the workspace

* Feat: Added an API to programmatically scroll the workspace
…oogle#7522 (google#7537)

* google#7522 edits -- collaborated with Hinal Patel, Swedhaa Sri Elango, & Yuchi Hsieh

* google#7522 edits: collaborated with Hinal Patel, Swedhaa Sri Elango, & Yuchi Hsieh

* fix: non-nullable check for block variable and removed ! in layout_ google#7522

* fix: non-nullable check for block variable and removed ! in layout_
…oogle#7536)

* Fix: 7523 - non-nullable check for block variable and removed !

* Fix: non nullable check for block variable

* fix: fixed styling issue

* fix: updated block variable nullable condition

* Updated nullable condition for block variable
* fix: pasting with nothing selected

* fix: import

* chore: format
@github-actions github-actions bot added the PR: feature Adds a feature label May 23, 2024
@github-actions github-actions bot added PR: feature Adds a feature and removed PR: feature Adds a feature labels May 23, 2024
@maribethb maribethb marked this pull request as ready for review May 23, 2024 23:30
@maribethb maribethb requested a review from a team as a code owner May 23, 2024 23:30
@maribethb maribethb requested a review from rachel-fenichel May 23, 2024 23:30
@github-actions github-actions bot added PR: feature Adds a feature and removed PR: feature Adds a feature labels May 23, 2024
@@ -0,0 +1 @@
* text=auto
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this be included?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, this is the fix for #7191

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.

One question and then lgtm. Thanks for sorting this out!

@maribethb maribethb merged commit 98958f3 into google:develop May 23, 2024
11 checks passed
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.

Paste block in viewport / near cursor
0