Save Item as Future Revision (Draft of Published Item) #2975
Replies: 30 comments 90 replies
-
Based on a chat with @rijkvanzanten...
|
Beta Was this translation helpful? Give feedback.
-
Following a discussion with @rijkvanzanten I wanted to share our use case. Directus offers apparently (just read the doc, not yet tested) a way to manage permissions so that people Editors cannot save edits on Basically, we want to have the time to update content from our platform without impacting what is currently published and visible by all. Let's take a first concrete and theoretical example: a Terms and Conditions page from a website. This Terms and Conditions content is manage in Directus and published to the website, therefore visible to all. My initial (and basic) assumption when I played around to find a way was that we could, for any object like What I had imaged doing at first if Directus cannot make it happen is to have two environment, the staging Directus for our staging front end as well, and the Prod directus, for our Prod front end. Noone can edit directly in Prod, but have roles set up in Staging, and webhooks so that only takes 'Published` content into our Prod instance... but that also has some possible challenges. I'm fairly new to Directus, so not sure how it's built, but what if we have for each collection a secondary (hidden) collection where we only store the latest published version. Everytime we save an item as
Sorry for the long post, happy to discuss further! |
Beta Was this translation helpful? Give feedback.
-
One advantage of my initial idea to use two environments:
Nevertheless, having native publication flow, that would allow to edit content that is published, without changing the published version until it is republished is still critical for a CMS. Also able to unpublished (remove from being live) it while still editing it. Do you have an idea of the roadmap for such a feature? |
Beta Was this translation helpful? Give feedback.
-
I have a similar usecase as jojo. I would argue that using separate environments for this is meh. Traditionally we would use staging for the development side, and then in prod, a publication flow for the content. the revision approach sounds promising. having the current live copy of the data in the actual item table and the future, current working copy in some proprietary is not an issue for me, since I can't imagine a usecase where I would want to write data using sql but manually publish them later. I think the dual table approach would be the simplest one from my point of view. yes, its kinda staging, but its would be strictly staging for content changes, not for collection setup changes. as such its simpler and could be nicely integrated into the UI. I think I would hide the published tables by default and add a buttons to an item to view/compare to the current published version. |
Beta Was this translation helpful? Give feedback.
-
Saw this discussion popping up again, I think the discussion went way off track in terms of what the actual feature request was about. I think it shouldn't be overthought, as the title says 'Drafts of Published Items' - and that's it. Saving a revision without updating the parent item, so that people can have a publishing workflow. I'm wondering; are there people here who consider sponsoring this feature, I might be willing to put in some money to have this feature baked in Directus. |
Beta Was this translation helpful? Give feedback.
-
Found this will searching for discussions around auto-save. I found one discussion from 2015 for a previous version of Directus and this. Thoughts on extending this feature to being able to auto-save future versions in the case of browser crash, forgetting to save and leaving for several hours, etc.? It would seem like this would be trivial to be able to at least turn on if desired if this idea of future drafts existed behind the scenes. |
Beta Was this translation helpful? Give feedback.
-
Moderation could get tricky with multiple futures. I would suggest the future revision screen show all prior changes yet to take place in its' "updates made" section. I'd like to call it "suggested edits" which is less guaranteed. "Future drafts" may be misunderstood to be scheduled drafts. Consider the following use case: wiki and wiki-like sites where the site accepts and moderates more untrusted user edits. Per-user drafts where users can (optionally) only see their own drafts. This would also require a better moderation tool where the "updates made" section would need to be visible with a single click to ease moderation at scale. |
Beta Was this translation helpful? Give feedback.
-
Just wanted to keep the conversation going here. We're looking for a way to preview changes for a gatsby website built with directus, where you can preview the changes before deploying. For our use-case, what @krazyjakee was suggesting sounds like the best solution. |
Beta Was this translation helpful? Give feedback.
-
I am not sure how much of this helps with the various use cases, but ready to go into details... A number of instances have admins pre-make templates and relationships for many collections that contributors can "copy to collection" or "create from template"...it helped solve many content moderation issues.
|
Beta Was this translation helpful? Give feedback.
-
Just here refreshing the discussion in 2022. |
Beta Was this translation helpful? Give feedback.
-
Sorry for the long post .. But I always found it puzzling that most CMS'es only rely on a published/draft status per item, and don't have a concept similar to branching in git. With branching you would be able to easily stage multiple changes (say for example everything related to a new product launch, or a new marketing campaign), (p)review them together and publish (merge) them in 1 step. I could only find 1 example of a cms that implements this fully: https://cloudcms.com What I would like to support is a workflow like this:
I think I have an idea of how this can be implemented in directus. Please let me know if you think this a feasible approach (I plan on working on a POC for this in the next couple of weeks). The way I think this could be implemented is by
This would have no issues with making changes to child items, as for the outside world the parent would still have the same id. So when you delete / add a child that is simply stored as new item in this branch and it's parent would still be the object belonging to the main branch. ^^ I have not tested this, and I am new to the directus codebase; however it seems doable to implement this in To make this a bit more clear consider the following example blog posts collection:
When I create a new branch and change the hello world post and remove the last post
retrieving all items in this collection for the main branch is as simple as filtering on
retrieving all items in this collection for the new branch would return a result like this:
|
Beta Was this translation helpful? Give feedback.
-
Is there any official way to handle this problem right now? I'm looking for a modern replacement of a mediawiki site I'm currently taking care of and versioning it a must have and directus doesn't seem to have that. I'm really confused to see that directus and many other CMS such as strapi all seem to have this draft publish system that works as a boolean visibility switch, which is extremely bare bone. |
Beta Was this translation helpful? Give feedback.
-
What about using xstate on the revision object? This would allow for future revision, draft, pending review or anything we want and I assume should work fairly well with the current system? If the state machine was configurable by the user, we could even imagine complex editorial workflows. |
Beta Was this translation helpful? Give feedback.
-
I appreciate the discussion on this feature. I also appreciate the desire to implement a high quality solution rather than rush to implement something that adds unnecessary complexity and/or only satisfies a subset of desired use cases. That being said, I think it is a valuable feature worth the time, effort, and consideration. We are in the same situation as some of the others above. This is the only feature blocking us from implementing directus. I don't know the inner workings of directus enough to comment on the internal architecture but I'll add my desires / opinions.
All while allowing the ability to require elevated permissions for the transition from A->B and from C->D. And I've up arrowed this feature as I hope everyone else has 😉 |
Beta Was this translation helpful? Give feedback.
-
my simple solution for this problem:
I know that this idea is flawed and in some cases not possible (joins to those items still return the "live"-data) but it works in my use-case |
Beta Was this translation helpful? Give feedback.
-
Do you guys think flows could be used to implement a workaround now? |
Beta Was this translation helpful? Give feedback.
-
My excuses for reviving the old thread, but what's the status of this? We also need such functionality for preview/prod website... |
Beta Was this translation helpful? Give feedback.
-
HygraphCMS integration of this is pretty nifty. You can tag changes for a future release and then publish that release at a specific date. Best implementation I've seen so far. PayloadCMS allow you to update the content and schedule it for a later date. The content status is marked as draft but the live version (published) is still being push to api queries. It's a little more basic than Hygraph but they're like the only 2 implementations I've seen of this feature. |
Beta Was this translation helpful? Give feedback.
-
Same as @max-mayorov here and @racquetmaster here 🙋♂️This feature would add major value to the product. It is also mandotory for us to switch to Directus. @benhaynes : Any update on the development or is there a roadmap for this? Do we know if some client already sponsered such a thing? Thanks in advance! |
Beta Was this translation helpful? Give feedback.
-
Lots of people looking for this capability makes it sound like a good sponsorship crowd sourcing item. Is it worth making this discussion an issue and putting it on Issuehunt with a stated $ goal to get development going? |
Beta Was this translation helpful? Give feedback.
-
just my 2 cents as a workaround:
got to last "published" content -> change published_at -> make changes to content -> upper right, 3 dots, save as copy... API query: order by published_at desc and status _eq published, limit 1 Revert szenario: change last published to draft Benefit: you will have revisions on each published content - and "version" history by the primary key /page/xyz |
Beta Was this translation helpful? Give feedback.
-
@rijkvanzanten in your recent e-mail "Hop in there" you link to the top upvoted feature requests from the last 30 days, making it look like those are more interesting to you than long standing issues like this one (which is not even visible in the resulting list) with more than an order of magnitude more upvotes. This looks a bit worrying to me, as the communitys most requested features lose visibility. |
Beta Was this translation helpful? Give feedback.
-
This is much needed for sites that require constant changes and tests. Looking forward to it! Is there a way this can be sped up? |
Beta Was this translation helpful? Give feedback.
-
Heya! Thanks for opening this feature request! This feature request has received over 15 votes from the community. This means we'll move this feature request to the Under Review state! The Core team will schedule a meeting to review this request as soon as possible. The discussion will then be approved or denied. You may or may not be invited to join this meeting with the core team. For more information, see our Feature Request Process. |
Beta Was this translation helpful? Give feedback.
-
SummaryAllow items to be changed, but not committed to the database yet. This allows editors to make and save changes, but not have those changes published yet. This unlocks more content-specific editing workflows. Basic exampleWhen changes on an item are made, these changes can be “soft-saved” to a new “branch”, which then allows the editor to continue working on the changes in the item, without committing to saving (”publishing”) the item to the database yet. MotivationThis allows content teams to enrich their workflows by allowing editors to make and preview changes, without publishing them yet. Without allowing saving future revisions, there’s currently no good way to achieve a similar workflow. The closest workaround is setting up a duplicate table with a flow or custom hook that will keep content in sync from one table to another, but this is non-trivial to achieve for such a common use case. Detailed designApp UsabilityOn the item detail page, users will be able to create a new “Branch” from the current item. When you switch from the “Main” branch to a new branch changes made will be saved to When a user is ready to commit the item to the main branch, and the user has permissions to update the main branch, a secondary save action will allow the user to preview all the changes that will be applied to the main branch, and commit the changes to the main branch. API PreviewingIn order to enable previewing of edits in a branch, a new query parameter or endpoint will be designed that allows the user to pull in a given revision for an item. Requirements ListMust haves:
Should haves:
Could haves:
Will not have (at this time):
DrawbacksComments and Shares might have to be adjusted to be branch-specific. AlternativesInstead of saving just the delta to Directus Revisions, a secondary “cloned” table could be considered, however there’s some downsides to that approach:
Adoption strategyThis would be an opt-in additional feature; there’s no breaking changes or migration path necessary. Unresolved questions
|
Beta Was this translation helpful? Give feedback.
-
I see no mention above of the ability to set a publish date (or should I say "scheduled merge" 😄) for a branch? |
Beta Was this translation helpful? Give feedback.
-
Would branches site-wide (all or nothing) or content item only?For example, which would be the organization method for the branches and the "commit" system?
OR
The usefulness of either would depend on the scope of the updates. If you want to update multiple content items at one time having a site-wide "release everything at once" branch would be best. If you want to update just a single content item at a time, then the content/branch method would be best. If a marketer wants to go in and modify 4 pages all at once with a new rebranded logo or product name, having a site-wide branch would work nicely. If a marketer wants to just create a simple change on a specific page, then a content-specific branch would be nicer. Branch tags might be a way to sub categorize branches. Using tags you can commit "anything in this branch with tag xyz" or "just this content item inside this branch". Branch Tags?Branch tags might be very useful in general. You could have tags such as "revisions" or "a/b tests", tags (for example). This will help the moderators to know which branch was made for what purpose and to allow scripts to find tests by looking for branches with matching tags. If branches are setup in the Systems Collections content model folder, the site builder should be able to add fields manually - directus style. Or tags could be baked into the feature. A/B Testing Revisions via Branches!!!This revision feature would also be an excellent tool for doing A/B Testing... The system would display revision X and revision Y and record/report the results (page1?branch=A vs page1?branch=B). I believe a content-specific analysis would be helpful here, but to create a bunch of branches for each content item you want to A/B test would potentially be very cumbersome (BranchA1, BranchB1, BranchA2, BranchB2, etc...). A site-wide A and B branch with the ability to focus your analysis on individual content items might be easier for the content moderator to handle. I recognize this is outside of the scope of the "future-revisions" system in general - but it is exciting to consider. |
Beta Was this translation helpful? Give feedback.
-
Is it possible to have the new branch switched to the main one? ("set as main" button) |
Beta Was this translation helpful? Give feedback.
-
Appreciate all the discussion and proposals in here! I've been looking for a lightweight alternative CMS to wikis and similar knowledgebase systems and Directus with this feature could possibly be the best option (I can provide a full list of my requirements if desired). Please let me share the following use case: Base role users are able to log in the Directus and view existing content. They can choose to provide updates to it or create new content. All such changes then get into "pending review" or similar status. During this, the previous original version of the content is still available, while the updated version has to be first approved by other users with relevant role(s). Once approved, the updated content is merged as new current version. From my understanding of everything in here and in the blog post, this could be feasible with some extra work. The main concern, as also discussed in the related Discord channel, is the understanding of the merge concept to non-tech people and UX in general (see jesperwe's message). Are there any other obstacles that I am missing? Did anyone consider any similar use case? Thanks! |
Beta Was this translation helpful? Give feedback.
-
This has been released in 10.7! 🥳 |
Beta Was this translation helpful? Give feedback.
-
Currently you can...
I propose that we allow:
Then we can use the same rollback/revert... but to advance to a future state. This essentially lets you stage future changes to an item, and should be as simple as saving a revision without updating the actual item. We'd want to update some language (eg: "revert" to "advance" when in the future), and when you actually revert/advance, that should be stored in activity (something happened) but we don't need to save the revision again (would be a duplicate).
Questions:
Beta Was this translation helpful? Give feedback.
All reactions