Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The basics
The details
This PR improves performance of flyouts. Previously, flyouts were reflowing/repositioning their contents in response to every event fired by the flyout workspace; this was particularly problematic during populating the flyout, when blocks being added/removed could cause this to happen hundreds of times. Scrolling the flyout also triggered continuous relayouts due to viewport change events. Reflowing is now only triggered in response to block change events, which can legitimately require it when e.g. the user types into a field in a block in the flyout and the flyout needs to resize to accomodate the block's new dimensions.
Additionally, the flyout was also listening to all events from the main/target workspace, and running a handler to check for and disable blocks over the maximum allowed instances threshold. This has been updated to only run on block create/deletes, since these are the only events than can result in a block exceeding/falling back under this threshold.