microsoft / pxt-microbit

A Blocks / JavaScript code editor for the micro:bit built on Microsoft MakeCode
https://makecode.microbit.org
Other
727 stars 638 forks source link

The simulator in the full documentation page is cut off #5262

Open Sheila111 opened 1 year ago

Sheila111 commented 1 year ago

Describe the bug The simulator in the full documentation page is cut off

Steps to reproduce the behavior

  1. Navigate to https://makecode.microbit.org/beta#
  2. Games---->Magic Button Trick----->Show Instructions
  3. Scroll down the documentation to step1 and click Run

Actual behavior The simulator in the full documentation page is cut off

Expect behavior The simulator in the full documentation page shows completely

Screenshot image

Additional context 1.OS: Windows11 2.makecode.microbit.org version: 6.0.8 3.Microsoft MakeCode version: 9.0.6

microbit-matt-hillsdon commented 1 year ago

I think there's a general problem with the simulator embed and this documentation bug is just one case.

If you:

  1. Share a project
  2. Copy the simulator embed code
  3. Paste into a HTML file

Then you see a similar cut off simulator.

Looking at the HTML, the padding-based aspect ratio box for the iframe itself looks right, but the aspect ratio box around the nested sim iframe looks wrong.

In v6 MakeCode you get:

image

in v5, which works, you get this, which matches the iframe ratio:

image
v-katherine commented 8 months ago

This bug also reproduced in below documentation page: Games->Salute->Show Instructions, Games->Karel the LED->Show Instructions, Games->Crashy bird->Show Instructions,

Radio Games->Fireflies->Show Instructions, Radio Games->Red Light Green Light->Show Instructions, Radio Games->Voting Machine->Show Instructions, Radio Games->Rock Paper Scissors Teams->Show Instructions,Radio Games->Micro: Coin->Show Instructions, Radio Games->Infection->Show Instructions, Radio Games->Best Friends->Show Instructions,

Fashion->Name badge->Show Instructions

Music->Jonny's Bird->Show Instructions

Toys->Robot Unicorn->Show Instructions, Toys->Rotary Dial Radio Hack->Show Instructions

Science->Timing Gates->Show Instructions

The below web page also reproduced this issue: https://makecode.microbit.org/projects/soil-moisture/code