I published a notebook, then wanted to change something. I did my edits, and I assumed they were automatically saved because there’s no “Save” button. But when I came back to the notebook, all my edits were gone.
It looks like I needed to click “Edit” before I started changing things to have the opportunity to click “Publish” again and save my changes. That wasn’t obvious, and I had to redo a bunch of work.
I had this problem too, but I was able to save my live changes by clicking Fork, which persisted the changes to a new document.
I’ve been feeling like I want to copy/paste multiple cells to other documents. This would’ve helped me merge my changes back to the original document, but as for now, I’m forced to just continue working in my fork.
Yep, this is definitely a rough spot in our current usability.
The system that’s happening here is that, when you publish a notebook, you freeze a published version at that point - so you can link people to
/@me/foo and they’ll see the work you intended to share, and if you want to improve on that notebook, you can edit it at
/d/fduf98... as long as you want, only sharing those edits once you click publish again.
There’s also a workflow where you can tinker with cells of published documents, and save those changes by hitting
Fork - this is meant to be useful for other people’s documents primarily, so that when you click through to someone’s cool notebook via Twitter, you can try some variations.
Honestly, I get stumped by this workflow quite a bit as well, forgetting to click Edit before diving in to some changes. It should definitely be better.
I just lost many hours of work due to this issue. Please consider at the least having a dialog confirming you have unsaved changes before substantial edits are lost. Closing the tab or navigating to a new page should trigger this confirmation, or it should be autosaved as a forked draft automatically.
We’re sorry for your lost work! I’ve written a short explainer that describes how saving works in Observable and we will continue to look for ways we can make this more intuitive and robust.
Thanks, @mbostock. The two issues I see right now are:
- It would really help if the app didn’t let you lose work without confirmation, and
- Once you start changing things, if you forgot to click “Edit” first, there’s no way (that I can see) to apply your changes to the original notebook like you meant to.
Okay, a big update!
We’ve changed the behavior: now when you edit your own notebooks, your changes are saved automatically, regardless of whether you’ve published the notebook yet. Now you don’t have to remember to click the Edit button before you edit—in fact, we’ve removed the Edit button entirely. As before, you can click the Publish button when you want your latest version to go live.
This change does not affect editing other people’s notebooks: your edits to other people’s notebooks are still discarded when you leave or reload, and the only way to save them is to click the Fork button. We think this is desirable: it lets you use other people’s notebooks as ephemeral scratchpads for experimentation, or to understand their code by tinkering, while ensuring that you see the exact notebook that the author published on reload.
Thanks for the improvement – and no worries, recreating lost work always seems to improve the quality
Just to clarify, let me know if I’m understanding the new process:
- now I can go into my own published notebook and make some edits
- even if I don’t hit “Publish,” my changes are persisted (even if I close the tab)
- I can reenter at any time and add onto my edits since last publication
- when I’m ready, I can hit “Publish” and all my edits will go live
(if I want to discard edits, I can always fork them into a new notebook)
Is that correct? Thanks for all the hard work and thought you’ve put into this!
Yep, that’s almost correct. The only thing I’d clarify is the last (parenthetical) point: there isn’t currently a way to discard your saved edits per se. You can simply never publish again after making changes, and no one besides you would ever see those changes, but you’d still see them and for now there’s no way to revert to an earlier version.
In the future we plan on having a way for you to see and restore from the version history. I imagine you’d also be able to fork from an earlier version if you wanted to branch off in a different direction.
+1 to the updated edit/publish behavior. I got the previous behavior but still kept forgetting to click “edit” when I actually wanted to make permanent changes.
Thanks so much. Notebooks are incredibly fun and useful.
Hi! I’m at the other side of the same problem: I published my notebook, and then keep on making changes (justs tests) which I would like to discard and just go back to my last published version.
So I’m waiting the restore button @mbostock mentioned.
(no pressure, I have done it manually). I also noticed that while I had changes unpublished, I was no able to fork the notebook. Once they are published, forking works again.
Anyway, the notebooks are great, thanks for the work!
Thanks for the feedback, @mjxicola. Forking your own drafts should be fixed imminently—we have a pull request pending with a fix and I expect we will deploy it tomorrow.