You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We do correctly re-introduce each plot to the UI after a reload, but we lose the thumbnail in the history filmstrip; it just shows a blank square.
Not necessary for Alpha since that is desktop-only and reloading won't be too common there, but needs to be fixed for acceptable behavior in browser-based versions of Positron.
The text was updated successfully, but these errors were encountered:
The reason this happens is that there isn't currently such a thing as a thumbnail; we literally use the same image that was initially rendered -- so the only way to get a thumbnail is to generate a full-size image. Generating images can be very expensive, so we don't want to demand that the language runtime churn out a half-dozen or more of them at the same time we are reconnecting and trying to hook up the rest of the UI.
@petetronic pointed out that one way to fix this might be to imitate what we did for the Help pane: have the plots served at an HTTP endpoint, and set the browser headers such that the browser itself could cache the plots and therefore the thumbnails.
Another approach would be to effectively use a screen-capture to copy the plot thumbnail and save the data as base64 encoded PNG in VS Code's storage service. We could do this by drawing the image into a canvas and using toDataURL: https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toDataURL
To reproduce:
This is the result:
We do correctly re-introduce each plot to the UI after a reload, but we lose the thumbnail in the history filmstrip; it just shows a blank square.
Not necessary for Alpha since that is desktop-only and reloading won't be too common there, but needs to be fixed for acceptable behavior in browser-based versions of Positron.
The text was updated successfully, but these errors were encountered: