Use content-visibility
with contain-intrinsic-size
for size caching in windowed notebooks
#16327
Labels
Milestone
Problem
The full windowing mode implementation is difficult to maintain when accounting for scrolling and cell output height changes interactions, and estimation of cell height. Because we calculate the total size of the container ourselves, the scrolling logic needs to account for many things which browser already can do way better and smoother.
As seen in #16326 the current implementation is problematic if the cell output content re-renders in response to visibility change; because in principle:
it could resolve such issues.
Proposed Solution
Limit height caching beyond initial estimation - offload all of this to the browser by using
content-visibility
andcontain-intrinsic-size
.Additional context
This aligns neatly with a potential solution to overcome the limitations of using native search in the full windowed notebooks (#16328) by using
hidden: until-found
which has an equivalent effect tocontent-visibility: hidden
.As of May 2024 the browser support is not sufficient to ship such an implementation - Firefox and Safari only provide partial support for
content-visibility
(https://developer.mozilla.org/en-US/docs/Web/CSS/content-visibility).The text was updated successfully, but these errors were encountered: