8000 feat!: modify icons to use the rendering queue by BeksOmega · Pull Request #7743 · google/blockly · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat!: modify icons to use the rendering queue #7743

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 1 commit into from
Jan 8, 2024

Conversation

BeksOmega
Copy link
Collaborator
@BeksOmega BeksOmega commented Jan 3, 2024

The basics

The details

Resolves

Fixes #7068

Proposed Changes

Makes it so the icons' setBubbleVisible methods wait for the current render to complete before showing their bubbles.

Reason for Changes

This way we know the location information is updated so the bubbles will show up in the right spot, but we're also not triggering an immediate render, which is bad for performance.

Test Coverage

Updated tests to use promises.

Documentation

Need to check docs on custom icons. Also needs changes in the release notes.

Additional Information

N/A

Breaking changes / To fix

If you are calling setBubbleVisible and then accessing the contents of the open bubble, you now need to wait for the promise returned by setBubbleVisible to resolve before accessing the contents.

function openBubbleAndDoStuff(block) {
  const icon = block.getIcon(Blockly.icons.IconType.MUTATOR);
  icon.setBubbleVisible(true);
  icon.getWorkspace().doStuff();
}

Becomes

async function openBubbleAndDoStuff(block) {
  const icon = block.getIcon(Blockly.icons.IconType.MUTATOR);
  await icon.setBubbleVisible(true);
  icon.getWorkspace().doStuff();
}

@BeksOmega BeksOmega requested a review from a team as a code owner January 3, 2024 23:55
@BeksOmega BeksOmega requested a review from NeilFraser January 3, 2024 23:55
@github-actions github-actions bot added breaking change Used to mark a PR or issue that changes our public APIs. PR: feature Adds a feature labels Jan 3, 2024
@BeksOmega BeksOmega marked this pull request as draft January 3, 2024 23:55
@BeksOmega BeksOmega mentioned this pull request Jan 4, 2024
1 task
@maribethb maribethb self-requested a review January 8, 2024 18:52
@maribethb maribethb self-assigned this Jan 8, 2024
Copy link
Contributor
@maribethb maribethb left a comment

Choose a reason for hiding this comment

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

Could you go ahead and add the info to this PR description about what users will need to fix to accommodate this breaking change? I'm not sure if the auto-release notes will figure out how to link to this PR directly or not, but I'll assume everything in the v11 branch will get linked.

@github-actions github-actions bot added breaking change Used to mark a PR or issue that changes our public APIs. PR: feature Adds a feature and removed PR: feature Adds a feature breaking change Used to mark a PR or issue that changes our public APIs. labels Jan 8, 2024
@BeksOmega BeksOmega marked this pull request as ready for review January 8, 2024 22:06
@BeksOmega BeksOmega requested review from maribethb and removed request for NeilFraser January 8, 2024 22:07
@BeksOmega BeksOmega changed the base branch from rc/v11.0.0 to v11-breaks January 8, 2024 22:07
@github-actions github-actions bot added breaking change Used to mark a PR or issue that changes our public APIs. PR: feature Adds a feature and removed PR: feature Adds a feature breaking change Used to mark a PR or issue that changes our public APIs. labels Jan 8, 2024
@BeksOmega BeksOmega merged commit 72087ad into google:v11-breaks Jan 8, 2024
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: feature Adds a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0