Freeze size of heavy nodes when resizing panels#812
Draft
krassowski wants to merge 7 commits intojupyterlab:mainfrom
Draft
Freeze size of heavy nodes when resizing panels#812krassowski wants to merge 7 commits intojupyterlab:mainfrom
krassowski wants to merge 7 commits intojupyterlab:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Trigger condition
longtaskorlong-animation-framebut it comes after user already saw a freeze for a few seconds; I think this is not the right approach - the Performance API was designed primarily as a measurement tool, not to make the rendering system reactive.Freeze implementation
contain: strictalone is not enough because it tells the layout engine that when considering layout of parents it can use the size as given inwidth/heightbut the browser still needs to relay all the text nodes inside the widget, which is more expensiveminWidth/maxWidthon the widgets with many children; it works but it is still not as fast as it could be; we know that it could be faster because resizing the same panels top-down is super smooth (without tricks) since we enabled strict containment. I believe that the difference is that the leaf layout, including text reflow, is never touched in top-down resize because the content is just scrolled rather than re-laidcontent-visibility: autoto DOM children of heavy widgets, I am yet to confirm if this is warranted in the final formFreezing the width means that the
Widgetin panels which haveoverflow: autoenabled get scrollbars, which you can see on the recordings below.Throttled/delayed updates
Before
Screencast.From.2026-04-21.15-21-43.webm
After (active on pointer down, no long animation frame detection)
Screencast.From.2026-04-21.15-11-26.webm
After (activates only after long frame/task detection)
Screencast.From.2026-04-21.14-52-24.webm