ocadotechnology / rapid-router

A Blockly and python based educational game aimed at students age 5-14.
https://www.codeforlife.education
Other
56 stars 62 forks source link

Start block isn't generated at the top-left of the window #1563

Closed faucomte97 closed 5 months ago

faucomte97 commented 5 months ago

Describe the bug When a Rapid Router level is loaded, the Start block is generated at an (x,y) position on the Blockly canvas. This "spawning" position seems to vary from level to level. For example, in level 61, it spawns much lower than the top of the canvas.

Screenshot from 2024-01-04 14-12-04

This is fine in this case, considering that the canvas is big and there is plenty of space for the user to create their program - although it might be an issue on smaller screen sizes.

But, in level 88 for example, the canvas window is smaller because there is the Python window below the Blockly window, and the Start block spawns right at the bottom edge of the window.

Screenshot from 2024-01-04 14-12-41

Because of this, the user has to move the Start block or drag the canvas in order to start creating their program.

These are only 2 examples but there might be other instances where this issue is also present and possibly even levels where the Start block spawns outside of the visible canvas area (especially in Episode 10).

Expected behaviour The Start block should always spawn at the same position in the canvas, no matter the level. A position like (100,100) would probably be good, as (0,0) would just make the block stick to the top-left edges of the canvas, so it would be nice to have some margins on either side.

harith-hacky03 commented 5 months ago

I am eager to fix it . Can you please assign it to me?

faucomte97 commented 5 months ago

Hi @harith-hacky03, glad to see you're interested in one of our tasks!

You can go ahead and start working on it.

Then, in order for us to be able to review / merge in your work, could you please read through our Contributing Agreement and follow the steps at the bottom to become a verified contributor.

Thanks!

harith-hacky03 commented 5 months ago

@faucomte97 Yeah i am comfortable with it . Can you check my PR if any changes is needed feel free to inform me . Thank you.

faucomte97 commented 5 months ago

@harith-hacky03, great news! Please could you follow the steps at the bottom of the Agreement, in the "Become a contributor" section. Once we've added your email to the list of contributors I can start reviewing your PR đŸ™‚

harith-hacky03 commented 5 months ago

@faucomte97 Yep i done everything but i dont get any confirmation mail

faucomte97 commented 5 months ago

Sorry @harith-hacky03 but I cannot see any new PR in the codeforlife-workspace repo which adds your email at the bottom of the contributors list?

AbdelrahmanDeghedy commented 5 months ago

Created this MR with a fix.

lauracumming commented 5 months ago

Looks good to me