-
-
Notifications
You must be signed in to change notification settings - Fork 87
Description
Rationale
The Blog stores and displays only the last version that was stored. So there is no way of knowing what changed or to go back to a specific state. Therefore, it would be helpful to have versions of blog post, each time the blog post is stored.
Challenges & Technical Requirements
Right now we allow to expose the internal Id as part of the URL of a blog post. If a user updates a blog post, the Id should not change (the slug can, but that is just for SEO and not necessary for the internal routing anyway). Therefore the Entity model has to be revisited to fulfill this requirement. Also the dashboards for tracking what blog post was clicked, relies 100% on the Id.
We can leverage the Update method to create a new BlogPost with an updated Version, so we can always get the latest for non-admin users and can extend the CreateNewBlogPost.razor component to deal
- With versioning itself (get the latest and restore a state)
- Make a diff between two versions (TItle, Short Description, Content, ...)
If a user has multple version (let's say 1 til 5) and restore 3, the question is can he go back to 5 afterwards? I assume as long as he doesn't diverge another time from 3, that is fine, otherwise we have to deal with branching which is way more complicated.