att / rcloud

Collaborative data analysis and visualization
http://rcloud.social
MIT License
430 stars 142 forks source link

save prompt/history in RCS #224

Open s-u opened 10 years ago

s-u commented 10 years ago

There is no way to save the console cell (last new R cell) without running it. The top save button is disabled while editing in the console cell and there is no save button for the cell alone.

gordonwoodhull commented 10 years ago

It is always saved, to the browser. It isn't part of the notebook until it's executed. Suggestions welcome but are you losing anything?

gordonwoodhull commented 10 years ago

This seems to cause endless confusion, I'm having a lot of trouble explaining it to the QA folks as well. @s-u, did this explanation help at all?

s-u commented 10 years ago

Thanks, the explanation is clear to me but it doesn't address the issue, because that change is lost if I close the browser and/or open it on another machine which is IMHO counter-intuitive in RCloud.

gordonwoodhull commented 10 years ago

If you close the browser and reopen the same browser, you should still encounter the same command prompt when you reopen it. If you don't that's a bug under the current defined behavior.

If you want to open the same notebook on another machine and find the same unexecuted command prompt on that machine, then we will have to change the behavior to use not browser local storage but perhaps rcs or even the notebook. It's not hard to do that, but we should define what we're doing here.

One of the bugs reported by QA seems to expect the command history to be stored in the notebook. Let's just decide what we're doing here and be done with it.

s-u commented 10 years ago

I'd argue for notebook or RCS. If notebook is fast enough good, otherwise RCS.

gordonwoodhull commented 10 years ago

This is updated every keystroke. It would not only be too slow but also would create a lot of extra noise in the notebook. I am open to putting it into RCS.

s-u commented 10 years ago

This doesn't need to be every keystroke -- part of autosave and/or on quit?

gordonwoodhull commented 10 years ago

Hmm, use browser local storage as now to update the history, and then back it out to rcs on save (and quit saves now)..

That could work.

s-u commented 10 years ago

Great, sounds like a plan :)