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

Save and load missing on demos #7

Closed
GoogleCodeExporter opened this issue Mar 25, 2015 · 13 comments
Closed

Save and load missing on demos #7

GoogleCodeExporter opened this issue Mar 25, 2015 · 13 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Solve the maze https://blockly-demo.appspot.com/blockly/demos/maze/index.html
2. Try to save
3. Try to load

I created a Chrome extension that enables saving and loading on all the blockly 
demos. It'd be nice if the examples on appspot supported save/load without an 
extension.

https://github.com/bootstraponline/save_load_blockly_demos

Original issue reported on code.google.com by m...@bootstraponline.com on 2 Jun 2012 at 8:31

@GoogleCodeExporter
Copy link
Author

Additionally, all work is lost if a user hits the back button and possible 
other actions like going to another page, then coming back.  Users should never 
lose work by leaving a page.  They should be offered a choice to save or when 
they return, the page should be restored, or both.

Original comment by salmo...@gmail.com on 12 Jun 2012 at 1:03

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

I tried to install this extension to my Chrome but it says 
"CRX_MAGIC_NUMBER_INVALID". I wonder if it is a problem with my system or 
Chrome.

Original comment by iron...@gmail.com on 13 Jun 2012 at 7:55

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

Are you using Chrome 19? What operating system are you using? It installs fine 
for me.

You could try downloading a ZIP of the repository and then going to Extensions, 
Developer Mode, and clicking Load unpacked extension.

Original comment by m...@bootstraponline.com on 13 Jun 2012 at 4:54

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

integrated extension into code demo 
http://www.gasolin.idv.tw/public/blockly/demos/code/index.html

Plan to use local storage to save current work though

Original comment by gasolin on 14 Jun 2012 at 12:28

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

That's cool. Consider using FileSaver.js to support saving to a file on more 
browsers.
https://github.com/eligrey/FileSaver.js

To make the load button look nice on non-modern browsers is a bit more work.
http://www.quirksmode.org/dom/inputfile.html

You might want to add an onunload event to confirm the user intends to leave 
the page.

Original comment by m...@bootstraponline.com on 14 Jun 2012 at 4:39

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

Experimental version at 
http://www.gasolin.idv.tw/public/blockly/demos/code/index.html

Using FileSaver.js and BlobBuilder.js to support saving to a file on more 
browsers (tested on Chrome and firefox), and remove the JQuery dependency.

Will commit if there are no obvious issues.

Original comment by gasolin on 15 Jun 2012 at 2:22

  • Changed state: Accepted
  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

The code looks great. You might want to remove the following comment as window 
is not required.

"Run on loadInput.click() from window.realClick."
https://github.com/bootstraponline/save_load_blockly_demos/commit/ae043a227a75cc
e39576c203378cb599592f2ce7

Original comment by m...@bootstraponline.com on 15 Jun 2012 at 4:25

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

Hi,

I recommend that following changes:

Change "Clean" button to "New" and add "Do you want to save changes?"

"New" is a more standard english name for the function.

A warning dialog should be provided is any work is not saved that shows the 
following:

Do you want to save changes? 
Save Discard Cancel

Original comment by salmo...@gmail.com on 15 Jun 2012 at 7:15

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

committed in r246

salmodan's request has been ticketed to Issue 40

Original comment by gasolin on 16 Jun 2012 at 7:37

  • Changed state: Fixed
  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

@GoogleCodeExporter
Copy link
Author

Is it possible to add save/load to the Maze demo? So far it only seems enabled 
on the code demo.

Original comment by m...@bootstraponline.com on 2 Jul 2012 at 11:21

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

gasolin, could you update to the latest FileSaver.js and Blob.js? The 
BlobBuilder API is deprecated and is being replaced with the new Blob API, so 
you'll want to update it for future compatibility once BlobBuilder is removed 
from browsers.

Original comment by iSe...@gmail.com on 24 Jan 2013 at 4:26

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

Also, I should note that the latest FileSaver.js also supports IE10 so you can 
now support IE10 if you already did in all of your other code.

Original comment by iSe...@gmail.com on 24 Jan 2013 at 4:28

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

roger that, since blockly itself encourge to use cloud storage but not support 
local storage any more, I keep update local storage implementation at

https://github.com/gasolin/BlocklyDuino/tree/master/blockly/apps/blocklyduino


Original comment by gasolin on 27 Jan 2013 at 3:28

  • Added labels: ****
  • Removed labels: ****

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant