-
Notifications
You must be signed in to change notification settings - Fork 3.8k
fix: switch most remaining render calls to queueRender #7024
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
Changes from all commits
f5df0d8
83c82aa
574aba6
03c67e7
48a40a7
4e5e52c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1000,6 +1000,8 @@ export class BlockSvg extends Block implements IASTNodeLocationSvg, | |
| this.comment = null; // For backwards compatibility. | ||
| } | ||
| if (this.rendered) { | ||
| // Icons must force an immediate render so that bubbles can be opened | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we instead maybe add the comment icon in the otherwise: nit: (here and below) immediately typo
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wrt your comment about But now that I'm thinking about this again, I'm going to investigate this one more time. I was trying to solve for the use case of: I thought that for this to correctly position the bubble, the
So that when But thinking about it again, if we use the render queueing it should look like:
This should still be correct. But it was causing some unit tests to fail, so I need to remember why that was. |
||
| // immedately at the correct position. | ||
| this.render(); | ||
| // Adding or removing a comment icon will cause the block to change shape. | ||
| this.bumpNeighbours(); | ||
|
|
@@ -1078,6 +1080,8 @@ export class BlockSvg extends Block implements IASTNodeLocationSvg, | |
| } | ||
| } | ||
| if (changedState && this.rendered) { | ||
| // Icons must force an immediate render so that bubbles can be opened | ||
| // immedately at the correct position. | ||
| this.render(); | ||
| // Adding or removing a warning icon will cause the block to change shape. | ||
| this.bumpNeighbours(); | ||
|
|
@@ -1099,6 +1103,8 @@ export class BlockSvg extends Block implements IASTNodeLocationSvg, | |
| mutator.createIcon(); | ||
| } | ||
| if (this.rendered) { | ||
| // Icons must force an immediate render so that bubbles can be opened | ||
| // immedately at the correct position. | ||
| this.render(); | ||
| // Adding or removing a mutator icon will cause the block to change shape. | ||
| this.bumpNeighbours(); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.