New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Page Drafts #570
Comments
Discussion on implementation of page drafts. Looking for input on how drafts should work. Primarily should drafts be draft of a page, or some separate thing that can replace a page. How do we handle page options, will they be tied to drafts, or can page options be editable for page in real time and not drafted. If drafted how would that work. What will be handled by drafts ? How do we publish drafts? What is the terminology we want to use for drafts? Backups, how will this affect backups. Do want to keep draft backups and page backups ? Editing pages, this will be dependent on how drafts work namely the page options. Or do we automatically assume you are editing and draft it when saving, this would keep it fairly the same as it is now. Then if a draft already exists, do we go to it automatically, and label the page with some draft header. And show it along side the page options, which are not draft, or are? |
full disclosure: I have no idea how versioning works in GS now. I would expect the model to follow something similar to Sharepoint, where a draft is actually an unpublished version of a document. In order to publish the draft, a new version number is given to the document, and the draft version is promoted in place of the existing published version. Only one published version of a page can exist at any given time. Versioning is opt-in, to allow lightweight editing without the additional features/bloat (ie, requiring a new version/draft for fixing typos). Metadata required to manage at this level would be: Versioning may also help with storing page options, as well as plugin settings - associate with a given version only (may prove to be complex without a db though!) |
I doubt we will use versioning too complex. I do like the option of disabling it. |
drafts would be a nice addition! some thoughts... personally, i'd like to be able to choose to create a draft after i have started editing a page and not to have to actively thinking about it, before clicking on the edit button. btw, once i've started editing a draft, it's more important to me that i don't publish it by mistake, than having a very easy way to publish it. as long as the options are as simple as they are now, i don't have a need to have them "drafted", too... but if they will be growing in the future, it's not a bad idea to already have a solution ready... nice to have: a way to undo publishing a draft and get back to the previous version (eventually by losing the page's own backup) |
I agree creating a new page should be essentially creating a draft, at the point of saving we could simply offer save or publish or something similar. It would not be something convoluted or change the flow of creation from how it is now. |
What I would use:
These drafts are never available or visible from the front-end (unlike current private/not-in-menu pages). For a draft (revision?) of an existing page, it will be necessary to have slug management, such that when the draft is eventually published, it inherits the existing slug to maintain, for example, inline links. |
Some finalizing draft spec, not much input on drafts so far. drafts will be as simple as possible, no new methods or procedures NOTESdrafts are NOT unpublished pages. The word publish can be confusing here as we do not have a better phrasing for what is actually "make this draft live" opinions welcome ❓ Drafts cannot allow slug modification at this time, this would require slug tracking and would present numerous issues we don't want to solve right now. specs
todo
Input from other issues#188 mvlcek
indicatorsThere is alot of information we might want to convery, but it is not clear how to do so cleanly and simply
see figures below for interface i am experimenting with to show this additional info without modifying the normal appearance and flow of editing pages problemsAre there any possible problems with other fields from publishing changes to them ?
Flowpossible flow with drafts enabled
|
Additional Features
|
Alot of cms, show a toggle between publish and draft, which is ok, it lets you edit both, but I am not sure I like this. |
plumbing workTo make drafts and page management easier, I have reworked all filio operations in core, and rewritten all backup and restore methods. |
Input welcome It is more like some antonyms final I am in favor of published and draft, they probably translate well. |
hooks
filters
|
This makes sense to me, and I'm pretty sure translates to WP pages...etc. I'm thinking private/public...etc is more for access rights or visibility to users, vs draft/published governs visibility at a higher level (Published is always what the system will see/map to) |
FYI, this is fairly stable to play with if anyone wants to test it out. The unchecked items will be a phase 2 probably , maybe even after i merge this into master after thorough testing and of course some feedback. https://github.com/GetSimpleCMS/GetSimpleCMS/tree/feature_570_page_drafts |
|
Made some changes, fixes some bugs, cleaned up page stack css, simplified styles etc. Bugs
New
Made the page stack optional, added default stack mode, 'GSUSEDRAFTS' => true,
// (bool) use page drafts
'GSUSEPAGESTACK' => true,
// (bool) use page stacks for drafts, else qs `nodraft` or `draft` only
'GSDRAFTSTACKDEFAULT' => true,
// (bool) default page stack editing to drafts if true |
There won't be a draft indicator on pages for a while, but you can toggle labels and filter on draft for now.
|
Merged into master |
Please add these drafts constants to gsconfig.php file it would be easier to change its value without any typos. |
gsconfig won't be tweaked until at least alpha release, and then it will be a decision what to include by default. |
It is a bit hard to theme front end draft previews,
|
|
|
|
add save and publish to page actions. |
if autosave enables, else do nothing
Current master seems to include a useful implementation. I would like to see this feature enabled in 3.4. |
here are the pertinent configs, not sure what final defaults will be. I am fairly sure we want
|
Implementing Feature Page Drafts
Ability to draft changes to pages without affecting public or private pages until ready to publish
The text was updated successfully, but these errors were encountered: