renciso218 / blockly

Automatically exported from code.google.com/p/blockly
0 stars 0 forks source link

Save and load missing on demos #7

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
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 commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
committed in r246

salmodan's request has been ticketed to Issue 40

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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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