att / rcloud

Collaborative data analysis and visualization
http://rcloud.social
MIT License
430 stars 142 forks source link

cells should go into edit mode when visible #2691

Closed gordonwoodhull closed 4 years ago

gordonwoodhull commented 4 years ago

As far as I can remember, edit mode is just a performance hack because we couldn't spawn that many ace editor windows without stalling the browser.

It causes a lot of glitches with font rendering and clicks not landing quite where they were aimed.

Maybe the performance would be okay if the cost were spread out? I am experimenting on a branch with a lazy-load mechanism, and it is promising. At the start of session, and whenever there is a scroll event, On a 100ms interval, when scrolling has stopped, we'll check which cells are in view, and activate those. The edit mode button will be removed.

Note that the static view is still needed in order to fill in the right amount of vertical space and show a placeholder during the ~50ms it takes each cell to activate (as well as for read-only mode).

Opening this issue in case anyone can think of drawbacks to this approach.

This will make #2682 even more important, because we don't want ghost cursors in every cell.

gordonwoodhull commented 4 years ago

Demo in the above commit needs