3 ms·
how do you cache heights without rendering? It seems to be a chicken-egg problem, you need to know the heights to test visibility, but without rendering, you ca
by billconan 2y ago
how do you cache heights without rendering? It seems to be a chicken-egg problem, you need to know the heights to test visibility, but without rendering, you can’t know the heights? Or heights are obtained by invisible rendering in a hidden div?
- bloomingkales 2y agoWorking with fixed heights makes virtualized lists more predictable, easier to implement.
- _bittere 2y agoWhile that is true, it's not guaranteed that all notes will be of the same height. Some notes might have more content, some might have less; which is why we need all the fancy JavaScript rendering.
- deleted 2y ago[deleted]
- deleted 2y ago[deleted]
- deleted 2y ago[deleted]
- _bittere 2y agoWhat Seen does is render notes off-screen first, then pack them up in the container. So yes, it does use a hidden div in a way. Some CSS styling does not let you measure the height, which is why Seen uses an off-screen div.
- billconan 2y agoThank you for the tips. the off-screen div can't set display to none right? otherwise the browser will skip rendering?