codepod-io / codepod

Codepod IDE: Scalable Interactive Coding
https://codepod.io
MIT License
75 stars 15 forks source link

[UI] Fix export import after pr 467 #470

Closed senwang86 closed 1 year ago

senwang86 commented 1 year ago

Summary

Test

Screenshot 2023-08-24 at 9 49 26 PM
lihebi commented 1 year ago

To-do:

  • Tune the pod size based on <img> size

The image size should be adapted to the pod size, not vice versa. That was the case: if you plot a matplotlib figure on codepod.io, the figure adapts to fit the pod. It broke at some point.

  • Fix "Raw JSON" export function

A side note: as we discussed before, this should be done on the frontend. But more broadly speaking, we need to get a hold on this. This feature is meant to preserve a lossless data of a repo. Since we are using yjs, we need to store yjs content.

lihebi commented 1 year ago

The PR looks great, thanks!

senwang86 commented 1 year ago

The image size should be adapted to the pod size, not vice versa. That was the case: if you plot a matplotlib figure on codepod.io, the figure adapts to fit the pod. It broke at some point.

Agree, the matplotlib figure can be adjusted correctly. While the web images seems not, need some debug later.

A side note: as we discussed before, this should be done on the frontend. But more broadly speaking, we need to get a hold on this. This feature is meant to preserve a lossless data of a repo. Since we are using yjs, we need to store yjs content.

Yes, I am aware of this and will discuss the implementation later sometime. Just to put it in the to-do list.

lihebi commented 1 year ago

Agree, the matplotlib figure can be adjusted correctly.

Matplotlib figures are not adjusting now. I think it’s broken by #436