-
-
Notifications
You must be signed in to change notification settings - Fork 130
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
Add content-visibility hide mode #497
Add content-visibility hide mode #497
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @krassowski
@meeseeksdev please backport to 1.x |
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon! Remember to remove the If these instructions are inaccurate, feel free to suggest an improvement. |
* Backport PR #497: Add content-visibility hide mode * Patch `CSSStyleDeclaration` to avoid bumping TypeScript version on 1.x
See #496 (comment).
Once support for content-visibility is better across browsers we should make it the default as we have exactly the use case that it was intended for (see point two in specification).
Performance-wise, I re-run the benchmark for three tabs (as in the issue: two test notebooks and launcher) after full integration and it works as expected:
Google Chrome 108
but differently to
scale
, it does not cause unintended issues in Chromium browsers where performance issues in presence of big notebooks are most pronounced, nor does it degrade in performance once there are too many tabs open.Note: the benchmarks above were run with latest dev versions of JupyterLab (4.0alpha) and lumino from this PR, so these account for any potential changes to due windowed notebooks feature (full windowing mode).
Notes on current state in Firefox below. TLDR, we are good to merge IMO.
For anyone trying this out in Firefox: it may appear that it already "works" in Firefox 108 but it does not support
content-visibility
yet (although some basic support was already merged in 3 months ago, possibly pending bug fixes like this one). It "works" because in absence ofcontent-visibility
support it reduces to leaving the tab visible but hidden under the others due to z-index change. It means that we can confidently ship because it is in a way safer than existing scale mode (if user chooses to enable it in a browser which does not supportcontent-visibility
, their workspace will still work; scale breaks things in Chromium browsers). The performance in this case is fine for few tabs (the three test notebooks scenario):But it is worse when there are many notebooks (each 20 code cells):
Interestingly, scale in Firefox is only better for heavy notebooks, not for many small notebooks.