Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

💻 Adding a button for Microbit #5249

Merged
merged 14 commits into from
Mar 13, 2024
Merged

💻 Adding a button for Microbit #5249

merged 14 commits into from
Mar 13, 2024

Conversation

rmagedon97
Copy link
Collaborator

@rmagedon97 rmagedon97 commented Mar 11, 2024

Adding a button that that transpiles the Hedy code to Micro-python code and then sends it to the user for downloading.
The button is in class=hidden with id=saveMicrobitFilesContainer in templates/incl/editor-and-output.html
When the button is clicked sets the Microbit boolean to true and transpiles user code. The user code is saved in the Micro-bit folder. Then the saved code is converted to .hex and it is send to the user for downloading. At the end both files are deleted.

Created @app.route for generating and downloading the files in app.py

How to test

Follow these steps to verify this PR works as intended:
Set the button to not be hidden.
Click on the Run Micro bit button and a hex file should be downloaded automatically. Then the file can be uploaded here to check if the code is correct or directly saved to a Microbit via USB.

Checklist
Done? Check if you have it all in place using this list: (mark with x if done)

  • Contains one of the PR categories in the name
  • Describes changes in the format above
  • Links to an existing issue or discussion
  • Has a "How to test" section

If you're unsure about any of these, don't hesitate to ask. We're here to help!

rmagedon97 and others added 6 commits March 11, 2024 18:04
Adding a button that will take the user input and will generate a Micro-python code then will convert that code to hex and send it to the user for downloading.
@rmagedon97 rmagedon97 changed the title Adding a button for Microbit 💻 Adding a button for Microbit Mar 11, 2024
@rmagedon97 rmagedon97 self-assigned this Mar 11, 2024
Copy link
Contributor

@hasan-sh hasan-sh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!!

Copy link
Contributor

mergify bot commented Mar 13, 2024

Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork).

@rmagedon97
Copy link
Collaborator Author

rmagedon97 commented Mar 13, 2024

Looks good!!

Hello @hasan-sh,
Thank you for approving.
It seems there is an issue with static/js/appbundle.js.map.

Should i fix the conflict and push again?

@hasan-sh
Copy link
Contributor

Looks good!!

Hello @hasan-sh, Thank you for approving. It seems there is an issue with static/js/appbundle.js.map.

Should i fix the conflict and push again?

Yes you can!

Copy link
Contributor

mergify bot commented Mar 13, 2024

Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit b45ba6a into main Mar 13, 2024
12 checks passed
@mergify mergify bot deleted the Microbit-button branch March 13, 2024 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants