react.dev icon indicating copy to clipboard operation
react.dev copied to clipboard

fix: sandbox preview height

Open akulsr0 opened this issue 3 years ago • 3 comments

Before

before

After

after

akulsr0 avatar Jul 10 '22 06:07 akulsr0

Size Changes

📦 Next.js Bundle Analysis

This analysis was generated by the next.js bundle analysis action 🤖

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 84.68 KB (🟡 +17 B)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

github-actions[bot] avatar Jul 10 '22 06:07 github-actions[bot]

@harish-sethuraman The last sandbox (in thinking in react) is already having scroll in sandbox preview in current beta website? What is the expected output in this case?

akulsr0 avatar Jul 10 '22 07:07 akulsr0

We have explicit height here because the sandpack's output window are killed when they move out of the screen. so the height of iframe becomes 0 how ever when we use fit content the height is shrinking and then the content move upwards. But we dont want this to happen. So we are explicitly setting the height to be 40vh.

PS: please do not mention in every comment. It doesn't help anyways. you can rather just add comment.

harish-sethuraman avatar Jul 10 '22 07:07 harish-sethuraman

I'll close this PR for now.

lunaleaps avatar Oct 05 '23 17:10 lunaleaps