When user uploads project file, project will auto-save before loading#4134
Conversation
9aaa899 to
566ec2a
Compare
paulkaplan
left a comment
There was a problem hiding this comment.
Travis tests are failing
|
@benjiwheeler I noticed that this causes a regression where the project title does not get updated in the standalone editor. If possible, I think we should get this in without introducing a regression. This will, for instance, break the Scratch Desktop functionality |
|
I was trying to keep this change focused to fixing this one issue and not the title-switching one; I can't keep the current functionality. But let me try fixing that too, here -- it's probably not so hard. |
|
@benjiwheeler yeah, it's just it is hard to revert PRs that break one thing in favor of another. We have to fix both before either goes in I think, so let's just include both here |
paulkaplan
left a comment
There was a problem hiding this comment.
Yay! Looks good now. Let's get this to staging for some 👀👀👀👀 /cc @BryceLTaylor
|
Just waiting for tests to pass, then will merge |
Resolves
Proposed Changes
project-statereducer to handle file uploadsb-file-uploaderso that it syncs withproject-statestate machineNote that the titles still aren't set right; we could add that here or do it as a follow on. But, at least now the old project's title isn't overwritten.
Basic functionality: uploading a project saves current project first

The original project is indeed saved correctly:

Uploading a second project file, with no page reload (so keeping the same

FileReaderobject), works correctly:trying to upload an invalid file fails without taking you away from your current project:

Reason for Changes
current project wasn't being saved before uploading project and saving as new project
Test Coverage
Adjusted and added project state reducer tests
Browser Coverage
Check the OS/browser combinations tested (At least 2)
Mac
Windows
Chromebook
iPad
Android Tablet