Better feedback when saving project files from browser

Issue #399 resolved
xixicarry created an issue

The last problem is also an interaction problem, MIcroBlocks will initially save two format files when saving the program, one is the program file in.ubp format and the other is the file in.crswap format. In fact, the program has not been completely saved at this time, and some teachers and I have reflected this problem, including myself. Once I was in a hurry to pack up the computer and leave the company, I just modified the MIcroBlocks program click to save, the next second to close the browser. When the program was reopened, it was empty. Therefore, I would also like to suggest that after saving the program successfully, a pop-up message "Save success!" is displayed.

I hope to hear from you and wish you all the best!

Comments (4)

  1. John Maloney repo owner

    Thank you for reporting this. I guess the .CRSWAP file is created by the Chrome browser as a temporary file, then renamed when the file write operation is finished.

    I will investigate. Unfortunately, I'm not sure sure the browser has mechanism to inform the client code (i.e. MicroBlocks) when the file has actually been written to the disk. Maybe we could "fake it" by waiting a few seconds before informing the user that the save operation is complete.

  2. John Maloney repo owner

    Unfortunately, I don't think there is any way for MicroBlocks to detect when a file has been completely saved by the browser. After clicking the "save" button, it is wise to wait until the file save dialog box disappears and then a few more seconds before powering down or sleeping the computer.

  3. Log in to comment