This feature gives content creators of sites containing live documents a seamless ability to collaborate on changes to a private draft version of a page before making the changes live. After the draft is complete, users with access known as moderators can then publish the draft allowing the changes to go live on the original page.
Drafts are in essence copies of original pages. Drafts can be permissioned separately allowing fine grained control of who can see and modify the draft. Publishing requires write access to the original page and creates one or more new revisions on the original page with the changes from the draft. Changes to the original page can still be performed while a draft exists by users with access.
These are the use cases we will purposely not be solving in this iteration of draft pages.
The drafts module will be built atop the MindTouch platform, utilizing two new API features (import/export, "delete" a page/file revision). The module will be sold as a part of the MindTouch Enterprise package. After the drafts module is installed in MindTouch, part of the set-up will entail setting up the /drafts/ root-level hierarchy, which may be permissioned without BROWSE, so it does not show up search results or nav pane - essentially the page exist, but using permissions it can be made non-discoverable.
The UI module will piggyback off of PHP hooks to inject custom views: view draft, edit draft, confirm publish, and find drafts. Custom work will be required to implement drafts into skinning, without making changes to the skinning engine.
From a end-user standpoint, the UI should give the impression that much like talk: pages, drafts exist as a 1:1 relationship to a page. The UI should mentally link these concepts visually in the skin (Figure 1). Each draft page has both a view & edit state - when in view state, the skin should maintain a visual cue of its different state. (Figure 2)

Figure 1: Default toolbar view of MindTouch with drafts enabled - "Draft page" appears

Figure 2: Default when you click "Draft page" - it is the view mode of drafts.
Visual indicators indicate an informational message as well as a title icon.
On systems which have installed drafts, users will be able to view the draft always by hitting a 'draft' link. For non-moderators, "edit page" will automatically load the draft for editing (as opposed to simply being disabled) - upon saving, the page will redirect to the draft view mode (with an explicit notice of it being appended to a queue of changes awaiting moderation) - see figure 3. For moderators, 'edit page' will maintain its original behavior - to edit a draft, moderators will have to explicitly go to the draft page and edit this page.

Figure 3: Edit mode of a system with drafts, for non-moderators

Figure 4: Upon successful save of a draft - redirects back to live version with a message
When a draft is edited, users will have an option of sending a notification to the moderator that this copy is ready for review and publishing - this notification does not lock the page - it simply is an email notification. Moderators will be able to also discover drafts through a specialized "Recent Drafts" view, which will show all drafts updated in reverse chronological order.
On the view draft page, a "publish" link will appear in the toolbar for moderators - see figure 5. This will take the moderator to a confirmation view, which they will review the final view of the page, with a list of attributions or revisions (which one is utilized will be determined by the underlying spec) which the moderator will check or uncheck before sending the draft to the live copy.

Figure 5: Moderator's publish button in view mode of draft
Upon publish, the files, tags, properties, will all be written back to the live copy. Attribution will be granted to the users who contributed to the draft and will appear in recent changes/revision history of the original page.
The following use cases describe how users and moderators create, edit, groom, and publish drafts
The preset location /drafts/{pageid} where {pageid} is the id of the original page is used for storage of draft pages.
Approach 1
Approach 2
Publish head revision for each attributed user
Publish head revision only (This approach is not implemented)
Publish all non-hidden revisions (This approach is not implemented)
The draft page should look and feel as much as the original. A step of the draft creation process is to copy the head revision of all attached files from the original page to the new draft page. Any file links to the attachments on the original page will be changed to links of the corresponding images on the draft page. Copying these attachments has the following benefits:
The downside of this is that creating a draft in some cases may become a much more time consuming and intensive operation when many or large attachments exist.
Only head revision of new or updated attachments on the draft are moved back to the original page upon publish.
Attachments on a draft that were copied from the original page are only moved back if they have more than one revision to not copy over attachments that were not modified.
Attachments created on a draft are copied over to the original page upon publish.
Attachments that were copied to the draft during creation and then subsequently deleted will be deleted from the original page upon draft publish.
Drafts are indexed like any other page but may be hidden from search results throught the use of permissions. Users that do not have BROWSE access to the drafts will not see them appear in search results.
Changes to the drafts such as page edits, file attachments, comment postings, etc will show up in recent changes and feeds as they would for any other page.
Tags from the original page are copied to the draft when the draft is created. Upon publish, any new tags on the draft are copied to the original and any tags deleted on the draft that originated from the original page are removed from the original as well.
Page and file properties are copied from the original page to the draft when the draft is created. Upon publish, any new page and file properties on the draft are copied to the original and any properties deleted on the draft that originated from the original page are removed from the original as well.
Comments in the original page will not be included in created drafts.
Comments saved to a draft page will not be copied to the original page as part of a publish.
Users may subscribe to changes of a draft page but no subscriptions are given automatically. The notification list of the original page is not copied to a draft. If a user subscribes to a draft that gets published and then recreated, since it's a new page the user will not be subscribed to the new draft.
Creating a draft of an original page containing subpages will only make a draft of the original page itself and not its subpages.
Users may be allowed to make subpages under the draft page. These pages will not be included in the publish and will be deleted along with the draft after publish.
The draft's display title is copied from the original page upon draft creation if the title has been set. Likewise, upon publish the latest display title of the draft is copied to the original page.
If a language is set or changed on the draft, it will be set accordingly on the original page upon publish.
A moderator has the ability to lock a page from being edited using the permission system or to only allow it to be edited by specific users. This may become useful for controversial content that is experiencing a lot of malicious edits.
An administrator must be able to hide a page/file revision from the page/file history. A hidden page/file revision creates a gap in the page/file history and may not be retrieved via the API without admin access. In other words, the content is gone for all practical purposes but the metadata for it is still available (original editor, timestamp).
Additional motivation: the ability to hide a page/file revision has come up to remove spam content from the site and has broader applicability.
The API must provide a feature to copy a given page revision to another location. The page copy includes the page content, files, and properties as of that revision. If the copied revision is the head revision, it will also copy the current tags of the page and title (since tags and title don't have revisions). A page copy operation is essentially an export/import operation but optimized to operate within the same site.
Additional motivation: the ability to copy a page (usually head) to another location has broader applicability; it may also be used to create a better page revert since it would also revert content, properties, and files.
All a user to subscribe to a set of pages based on a search query. The resulting feed is similar to the existing site feed or sub-tree feed, but only includes pages returned by the search queries.
| File | Version | Size | Modified | |
|---|---|---|---|---|
| ||||
| ||||
| ||||
| ||||
| ||||
Copyright © 2011 MindTouch, Inc. Powered by
also, i could maybe see some conflicts here - could a user assume since this notification system is in place that moderators won't publish unless the user notifies them? b/c i can see moderators not wanting to assume users will notify them and may just publish drafts whenever. (btw, i'm going to add all of my comments up here at one time so sorry if there are a lot of comments from me at once!)
I'm in the process of updating this spec page to make it reflect the implemented reality and make it easier to understand. Please don't hesitate to point out any other rough spots.