Skip to content

Make icon bubble use the rendering queue #7068

@maribethb

Description

@maribethb

Check for duplicates

  • I have searched for similar issues before opening a new one.

Problem

Icon rendering currently has a special case carved out for it where it will cause an immediate render. This is because when a mutator bubble is shown with setVisible the bubble needs to know where the block is in order to show the bubble in the correct location.

The special case carved out for mutators is ugly, and not performant, because it doesn't wait for the next animation frame or use the render queue, it forces an immediate re-render.

Request

Change setVisible to wait for the afterQueuedRenders promise before making the bubble actually visible. setVisible should also return a promise in case external developers (or the tests) need to wait on the promise before using the results of setVisible such as access to the mutator workspace. Note that this is a breaking change, but one that we think is acceptable because it would eliminate the special case for icons and make rendering more predictable and consistent. However, because this is a breaking change, a PR should only be submitted at times we've already agreed to do a breaking change next (like this quarter)

Note also there are a large number of tests in core that need to be updated to wait on the promise before checking that the bubble is positioned correctly.

Alternatives considered

No response

Additional context

#7024 for the start of this implementation, but backed out because the tests need to be fixed and we didn't want to hold up the rest of the change on this since Beka is busy.

Metadata

Metadata

Assignees

Labels

issue: feature requestDescribes a new feature and why it should be added

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions