Saving as draft overwrites previous version #1113
Replies: 5 comments
-
Hey @abaco — thank you for bringing this up! So, if you have If you do not have autosave enabled, and only have drafts enabled, we create a new draft version each time a draft is saved as you are expecting. However, we do see the value in potentially adding a feature to always create new autosave drafts even with autosave enabled. This wouldn't be too hard to do, but it would be a new feature. What do you think? Given the above, I will convert this to a Discussion for now, and then if we all mutually decide that it is worthwhile to add to the core, we'll get it done! |
Beta Was this translation helpful? Give feedback.
-
Thank you @jmikrut, what you describe makes totally sense. However there are still a couple of little things that seem off to me. I started looking into this because the server errors out whenever I save a draft on top of a published version. In this case a published document had
This is alarming enough. The error says that a version of the published document, with However, reverting to the published version works fine. This is confusing IMO, it's a UX issue. I'd like to be able to use the versions UI to compare the current draft to the previous published versions, including the currently published version, and revert to that from there. Instead the current published version seems to be gone, and the latest saved version is identical to the current draft, which is useless. To be clear, the data is there and I can revert to previous versions, it's just confusing. |
Beta Was this translation helpful? Give feedback.
-
I'm still poking around and I think there's something wrong with how versions are saved. Consider a collection with drafts enabled, no autosave. The following happens (on version 1.1.0):
Note that by version I mean what is returned by That looks inconsistent to me. Why is the first draft dropped? Why is a version saved for each subsequent draft, at the moment of saving that same draft (thus duplicating the data)? |
Beta Was this translation helpful? Give feedback.
-
Back to the question of whether to save every draft, even with autosave enabled, I think it would be very useful to have fine-grained control on what to save and how long to keep it. A few examples of what I have in mind:
And so on. This would required a gazillion configuration parameters! But then I realized such logic can be implemented in This of course is only possible is there's a way to save all the versions to begin with. So I think it would be good to allow every draft version to be saved. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Bug Report
Saving a document as draft overwrites the previous version in some cases.
Expected Behavior
The previous versions are always preserved.
Current Behavior
The latest version is overwritten by the new content.
Steps to Reproduce
Please see my fork for reproductions.
Beta Was this translation helpful? Give feedback.
All reactions