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: Add support for centering on a block itself vs its stack. #6810

Merged
merged 2 commits into from
Feb 1, 2023

Conversation

gonfunko
Copy link
Contributor

@gonfunko gonfunko commented Feb 1, 2023

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

#5432

Proposed Changes

Adds an optional argument to centerOnBlock() that, if set to true, will center the workspace on the block itself, rather than the default behavior of centering on that block's stack.

@gonfunko gonfunko requested a review from a team as a code owner February 1, 2023 22:30
@gonfunko gonfunko requested a review from BeksOmega February 1, 2023 22:30
@github-actions github-actions bot added the PR: feature Adds a feature label Feb 1, 2023
Copy link
Collaborator

@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.

LGTM!

Was looking to see if we had any relevant tests for this code, and it seems our only test is actually broken (it calls zoomToFit instead of centerOnBlock):

test('centerOnBlock', function() {

This doesn't actually test the code you wrote :P But would you mind cleaning it up rq? If not that's cool, I can grab it!

@gonfunko
Copy link
Contributor Author

gonfunko commented Feb 1, 2023

Done!

@gonfunko gonfunko merged commit c1b2ddb into google:develop Feb 1, 2023
@gonfunko gonfunko deleted the center-block branch February 1, 2023 22:47
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