-
Notifications
You must be signed in to change notification settings - Fork 419
Local project share addon #8758
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
base: master
Are you sure you want to change the base?
Local project share addon #8758
Conversation
This is pretty vague. Could you explain the requirements and limitations? |
|
@Samq64 |
Doesn't that defeat the convenience aspect? Not everyone knows how to setup an HTTP server or has Python installed. |
|
Of course, setting up a server is some initial effort, and if this feature isn’t added, that’s completely fine. The main idea behind this addon is to enable sending projects directly to a backend integrated within the SE! runtime. In that case, the user wouldn’t need to do anything besides clicking a button in SE! on the console of their choice to receive the project straight from the Scratch editor. |
|
This feels rather specific (requiring a cooperating application), maybe it could work better as a standalone userscript or browser extension. |
|
Yes, it is quite specific (but I could write the necessary scripts/programs to make setting up a local server as easy as possible to keep it as general as possible, and then link the Code/project in the added addon if allowed). |
Resolves #8757
Changes
This PR adds a small addon that lets you share Scratch projects directly from the editor.
It adds a “Local Share” button to the File menu, which opens a simple modal where you can enter the recipient’s IP address and port. The current project is then exported and sent to another device over HTTP, with a progress indicator shown during the upload.
I tried to keep the addon as general as possible so it can be used in different local network setups. I looked through existing addons and didn’t find anything with similar functionality. If there is overlap with another addon, I’m happy to adapt or adjust this to avoid duplication.
This is my first Scratch Addon, so I mainly followed the structure of existing addons and based the UI on the “Media Recorder” addon. I’m not fully sure if everything is done in the best possible way, but it works and follows existing patterns as closely as I could.
Reason for changes
The original idea behind this feature was to make it easier to send projects directly from the Scratch editor to ScratchEverywhere!
(https://github.com/ScratchEverywhere/ScratchEverywhere)
Without this, transferring projects often requires a separate app (for example FTP) or manually copying files via an SD card. This addon is mostly a convenience / nice-to-have feature that removes a few of those steps.
The feature does not necessarily have to be added, as I will also integrate it directly into the SE! editor.
(https://editor.scratchbox.dev/editor.html).
However, it would be really nice if this functionality were also available through Scratch Addons for general use.
Tests
Tested in Chrome and Firefox.
(In Forefox, however, you have to disable
security.mixed_content.block_active_contentfor HTTP requests.)I’m keeping this as a draft PR for now so I can get feedback on improvements, better ways to handle things, or anything I might have missed. Open to criticism and suggestions!