3 ms·
One alternate I’ve been thinking about lately to virtualization is the HTML canvas? I believe this is how flutter works. It scrolls buttery smooth. You can styl
by catchmeifyoucan 6y ago
One alternate I’ve been thinking about lately to virtualization is the HTML canvas? I believe this is how flutter works. It scrolls buttery smooth. You can stylize elements. And also restrain to a certain viewport. There may be a few ambiguities, soo might do some research to make the text look good, but just a thought
- saagarjha 6y agoThis seems like it would be terrible user experience wise.
- no_wizard 6y agoIt’s an accessibility nightmare to do it all in canvas, the text isn’t even registered appropriately when you do it this way for screen readers for example
- no_wizard 6y agoJust to add on to this, since I can't edit, here's the Mozilla Developer Network entry that speaks to the accessibility challenges with canvas, for future reference in case someone stumbles upon this: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas#accessibility_concerns https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ca...
- catchmeifyoucan 6y agoCouldn't you overlay html elements on top of the canvas elements? You don't necessarily have to use canvas text. Each canvas element can tell you the size of each rect, so for each of the 50k log lines, you'd have an element in the canvas. When scrolling, the html elements can fade. As the rect scrolls into view, it draws the html div over itself, since each rect is uniquely associated with a line of text. It was a thought with some of the previous work I had done with canvas.