Skip to content

refactor: Remove block and workspace drag surfaces#6758

Merged
gonfunko merged 9 commits into
RaspberryPiFoundation:developfrom
gonfunko:dragging
Jan 20, 2023
Merged

refactor: Remove block and workspace drag surfaces#6758
gonfunko merged 9 commits into
RaspberryPiFoundation:developfrom
gonfunko:dragging

Conversation

@gonfunko
Copy link
Copy Markdown
Contributor

The basics

  • I branched from develop
  • My pull request is against develop
  • My code follows the style guide
  • I ran npm run format and npm run lint

The details

Resolves

#6160, #781, #5759

Proposed Changes

This PR removes block and workspace drag surfaces in favor of directly translating the relevant SVGs.

Reason for Changes

Performance for both panning the workspace and dragging blocks, particularly when large block stacks are involved, is substantially improved on Chrome, essentially unchanged on Firefox (where it was already excellent) ands slightly reduced on Safari, yet still much better than it was on Chrome before this change.

In addition to generally improved performance, this also removes a good bit of code, improving future maintainability.

Test Coverage

Verified that tests are passing and manually tested in Chrome, Firefox and Safari.

@gonfunko gonfunko requested a review from a team as a code owner January 11, 2023 23:17
@gonfunko gonfunko requested a review from BeksOmega January 11, 2023 23:17
@BeksOmega
Copy link
Copy Markdown
Contributor

@gonfunko Are you cool waiting to merge this until after the release next week? or do you want it to go in? Personally I would rather have longer to test it if possible.

@gonfunko
Copy link
Copy Markdown
Contributor Author

@gonfunko Are you cool waiting to merge this until after the release next week? or do you want it to go in? Personally I would rather have longer to test it if possible.

Yes, absolutely was not expecting this to land in the imminent release.

Copy link
Copy Markdown
Contributor

@BeksOmega BeksOmega left a comment

Choose a reason for hiding this comment

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

Generally LGTM! One nit, and then we need to decide whether this is a breaking change or not.

Comment thread core/blockly.ts
Comment thread core/block_svg.ts Outdated
Comment thread core/blockly.ts
@gonfunko gonfunko added the breaking change Used to mark a PR or issue that changes our public APIs. label Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change Used to mark a PR or issue that changes our public APIs. PR: refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants