scratchfoundation / scratch-gui

Graphical User Interface for creating and running Scratch 3.0 projects.
https://scratchfoundation.github.io/scratch-gui/develop/
GNU Affero General Public License v3.0
4.49k stars 3.6k forks source link

Add a button to download the project if web player fails to load #9605

Open pumpkinhasapatch opened 5 months ago

pumpkinhasapatch commented 5 months ago

Expected Behavior

When opening a Scratch project in a browser that has disabled or does not support all the features Scratch needs to work, show a button or link to download the project files as .sb3 to use in external software like Scratch Desktop.

Actual Behavior

Project shows a blank white image in the project player, and a "Your Browser Does Not Support WebGL", "Your Browser is not Supported" or similar error message when clicking the See Inside button that covers all other menus and elements on the page.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Go to any Scratch project "https://scratch.mit.edu/projects/104" on the Scratch website on a web browser that does not support WebGL (see below)
  2. Click on "See Inside"
  3. See the "Your Browser Does Not Support WebGL" error
  4. File menu and other elements are obscured by the error and blue background with no way to download or use the project

System Details

Operating System: Fedora Linux 40 (Workstation Edition) Browser: LibreWolf (Firefox) 126.0.1-1

I use LibreWolf as my default desktop web browser, a fork of Firefox with some settings and features changed for better security. This desktop web browser disables WebGL and canvas images by default, so it causes issues with the Scratch project player and editor. This might also cause issues with mobile devices, iPads or older browsers.

I would like to download Scratch projects through this browser and open them in Scratch Desktop or another application that can properly run them.

Screenshots image

If I remove the error modal using developer tools, I can still use the Scratch project editor but with no Stage to run the project. It is possible to download the project normally through the File menu in the top-left corner. It would be nice to move the "Save to your computer" button to be accessible from the error modal so we can still use the project from the Scratch app if the web version fails to load for some reason. Screenshot from 2024-06-05 21-54-53

UCYT5040 commented 3 months ago

@chrisgarrity I can work on this if it is ready for a PR. I would add a "Save project to your computer" button to the left of the back button.