craftcms / cms

Build bespoke content experiences with Craft.
https://craftcms.com
Other
3.29k stars 638 forks source link

Where is "save as draft" button ? #5661

Closed LouisCuvelier closed 4 years ago

LouisCuvelier commented 4 years ago

Description

When I create an entry, there is only the button "Save". "Save as draft" only appears when I save the entry for the first time ?

Maybe I'm not understanding the logic. 🤷‍♂️ For the moment, to save a new entry but without publishing it, I have to disable the entry then save it.

As mentioned here #1021, there is an auto-save but where I can see all the drafts ?

Steps to reproduce

  1. Create a new entry
  2. Save
  3. See the button "Save as draft" appear

Additional info

jamiewade commented 4 years ago

When you create an entry for the first time, it is a Draft until you hit the save button. You will see the Draft has been saved because of the green tick:

Screenshot_2020-02-17 Create a new entry (First draft)

To see all of your Drafts, you can go to the Entries page in Craft and choose Drafts from the dropdown:

Screenshot_2020-02-17 Entries - Hand in Hand

Because of Craft's autosave functionality that was introduced in 3.2, if you save a Draft using the keyboard shortcut or the save button, that will then publish the Draft and put it live.

So, to create a new Draft without publishing it, you will need to follow these steps:

And that's it. As I mentioned, don't save the entry as this will take it out of a Draft state and into a live entry state. As you add/change content on the entry, you wil see the green tick icon swap between a loading spinner then back again, which is confirmation your content changes are being saved to the Draft.

Hope that helps!

LouisCuvelier commented 4 years ago

Oh ok, this is clear now. I understand the logic. Thank you for your clarifications !

LouisCuvelier commented 4 years ago

Maybe I'm the only one, but I found that the "draft flow" is not obvious. When I create an entry and it's a draft, the "Save" button should be "Publish", and the button "Save as draft" should be next to it. Like when I edit a published entry.

In my opinion, it's not instinctive to just quit the page without "Save as draft" because I feel that my draft is not saved due to the "Save" button right in the top corner. This is not giving a confident feeling.

brandonkelly commented 4 years ago

When you create a new entry, it doesn’t fully exist until the first time you click “Save”. In fact, unsaved drafts are ephemeral – they will be deleted automatically by garbage collection, per the purgeUnsavedDraftsDuration config setting.

So if you are creating a new entry but you’re not planning to fully publish it right away, then you should mark it as disabled and click Save.

There’s not much point in creating a draft for an unpublished entry – most of drafts’ value comes in working on a revision to an already-publish entry.

narration-sd commented 4 years ago

Sigh. I know you love it when I do this, Brandon @brandonkelly , so I'm going to delete the chain of thoughts above. But in the evening away from things, it started coming back to me how you've said before and actually here, how you think of matters, in 'pre-draft', draft-becomes-actual, current, and 'saved as draft' states.

And so I think I see where the problem lies, thus how to re-state the points I was getting at, I hope then for good use.

You evidence thinking of this area in terms of Craft internal states, while for a person just ready to edit content, there are really only two states: draft, and published. That's true even if there are posting/expiry dates, or if the published entry is disabled -- published is still the published entry, and draft is anything written (and saved-available!) before publishing.

Thus:

I am not going to go farther here, as generally your buttons and actions seem sensible past the point of that new entry initial draft. You do do some added indicative labeling; some of that might be visited in seeing how you may choose about amplifyubg the label of the initial entry's Publish button.

Fini.

I suspect this outline will answer the initial request by @LouisCuvelier , and his later concern again for logic.

Personally I would feel it can make Craft that much more approachable, and easily sensible in use, especially for those content creators we serve. I'm always ready to see and understand your improved idea should you see differently; you know that. Thanks for listening.

brandonkelly commented 4 years ago
  • a newly created entry is a draft, content-wise.
  • your UI even says it's a draft

Well… yes, and that is technically true, but the page title says “Create a new entry”, which should indicate that the entry is still in an unsaved state.

  • therefore it should obey the rules for any edited content, in that moving away should trigger a stopping alert.
  • That's what the 'initial' draft does not at present, so that it's very easy to lose work. My poinr-along-the-way, if not the main point. Continuing...

Actually since it’s a draft and drafts get autosaved, the consistent behavior is to not show an unload confirmation. If you accidentally leave the page, your content will still be recoverable for a while from the Entries index page, by selecting “Drafts” in the status menu.

  • since it's a draft, the initial draft should indeed have a Save button.
  • that Save button should...save it. As a draft. As any other later draft. The button can say Save, or as you've done elsewhere, add a bit to make clear, thus be labelled Save as Draft. If you agree that would help. I kind of think it would, but it's not my decision.
  • the saving action makes the draft 'real' for Craft, so it can be found by its title and opened again. It's a draft in the sense that any in-editing-process document is.

I agree that it was counterintuitive for the “Save” button on the draft to publish the entry. So I’ve just relabeled that button as “Create” instead (f96e6f3288ffa528b854c186a903cf3f7b995344), so it’s more clear what happens when you click it.

Changing the behavior so it saves the entry as a “real” draft doesn’t make a ton of sense. To do that, we would still need to save a real entry first, populating it with a title and probably whatever other content you’ve already entered, and then also create a new draft for that entry. If that’s in fact what you want to do, then you can get to that state easily enough by clicking “Create” followed by “Save as a draft”.

narration-sd commented 4 years ago

Hmm, hmm. I like 'Create' -- that opens new avenues, with better semantics. I've just been trying it out via your latest dev.

Scenario: So, I write some info into the fresh (says its a draft, saved as) form. I want to leave and come back, finish it later. No buttons or submenus say how I can do this. If I back-button to Entries, nothing shows. Yes, I could find it in Drafts, if I had a thought of that.

Secondary attentions: I note that there had been a Create and add another submenu button. But then I would have published my non-filled-in-or-finished draft. Also, if I find the draft I managed to silently 'leave' (not Create), go back in, it's the Create button again, still same meaning(s), but less clear somehow as I'm clearly in a draft again.

I won't be around much today, Brandon, so let's see if I can make a quick run at moving even better, starting with what we now have from your good move.

Last thought is for the perhaps findable backed-out Draft.

But this overall last thought-and-consequences does seem to illuminate further how much good it would do to make Drafts fully visible, always protected citizens. Which by forced-to-Create in the sense offered above, would be guarded always to have titles.

A smile...always

(saved off a screenshot, don't think we'll need it)

brandonkelly commented 4 years ago

Craft 3.4.6 is out now with the change to the submit button label.

@narration-sd I kinda feel like you didn’t read/address this point:

Changing the behavior so it saves the entry as a “real” draft doesn’t make a ton of sense. To do that, we would still need to save a real entry first, populating it with a title and probably whatever other content you’ve already entered, and then also create a new draft for that entry. If that’s in fact what you want to do, then you can get to that state easily enough by clicking “Create” followed by “Save as a draft”.

narration-sd commented 4 years ago

Hey, @brandonkelly, could be, if it means save as draft converts it to one, with no posted.

Out of office, will have a look evening when home & when eyes un-dilated... Cheers

On Tue, Feb 18, 2020, 13:43 Brandon Kelly notifications@github.com wrote:

Craft 3.4.6 is out now with the change to the submit button label.

@narration-sd https://github.com/narration-sd I kinda feel like you didn’t read/address this point:

Changing the behavior so it saves the entry as a “real” draft doesn’t make a ton of sense. To do that, we would still need to save a real entry first, populating it with a title and probably whatever other content you’ve already entered, and then also create a new draft for that entry. If that’s in fact what you want to do, then you can get to that state easily enough by clicking “Create” followed by “Save as a draft”.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/craftcms/cms/issues/5661?email_source=notifications&email_token=AAB4RCJ6EZXB22CX5B4OZZTRDRI6TA5CNFSM4KWOGUHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMFKTBI#issuecomment-587901317, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB4RCILL5ST7RV24AOLLCDRDRI6TANCNFSM4KWOGUHA .

narration-sd commented 4 years ago

Brandon @brandonkelly , I did have a look with regards your text last night, just had not eyes-capable-of-screen back to look past that save-as-draft didn't answer how I saw things. And in fact, that's what your quote really says, that it doesn't intend to.

But this delay did give me a chance to reflect, and so I think our difference of view may be as follows:

So I guess it's up to you if you'd like to make the transition. If so, I suspect the Create Draft - Publish arrangement I proposed would suit this, or indeed something else you made of its intents.

I do well realize the trickiness in the implementation behind what appears on the screen -- the intermediate steps of what seems an initial draft becoming a real one. I felt that instituting the alert for leaving, now at the written-into-pre-Draft/seems-a-draft stage would handle this. You'd never lose work unintentionally, and as well would avoid matters like the no-title/no-findee/404 error I turned up.

Hope this is clear enough, and then you can reflect also...

LouisCuvelier commented 4 years ago

@narration-sd you're just reading my mind about this subject.

I agree that it was counterintuitive for the “Save” button on the draft to publish the entry. So I’ve just relabeled that button as “Create” instead (f96e6f3), so it’s more clear what happens when you click it.

To me "Create" doesn't seem very clear and is confusing. Is it "Publish" ? Is it "Save" ? What does it mean ? (From an editor's point of view).

As a real use case, a friend of mine wrote some content for me. He didn't understand the "Save" button for a draft. He would not understand neither "Create". I'm using Craft since a year now and, me too, I was like "Wtf ? I don't want to publish it ? What should I do ?". Instinctively, I finished by disabling the entry and save it.

It is unsettling and not reassuring to have two different ways of saving entries :

  1. Auto-save for drafts. If I quit the page it's ok.
  2. No auto-save for published entries. If I quit I'm f****ed.

For a long time, the Craft's UI taught us to click the save button to not losing our content. Now, it's unnecessary for drafts. It loses people.

So, I think that "Save as draft" and "Publish" combo is much more understandable. Why ? "Save as draft" already exists in the UI. It's something that the user is used to. And "Publish" is clearly saying the purpose of the action : "My draft will be live".

therefore it should obey the rules for any edited content, in that moving away should trigger a stopping alert.

Because of auto-save, a stopping alert doesn't seem relevant. It would be an extra bonus.

I hope that I'm clear 😅

narration-sd commented 4 years ago

Just a quick reply, @LouisCuvelier , to say you are very clear - dans le soir, en anglais :)

A point -- the stopping alert looks necessary on a fresh entry, so that you actually save the draft, with a title also as required. After that, I think your view seems correct, that it isn't needed.

Gone again, so Brandon can have his thinking about this...

narration-sd commented 4 years ago

...though I meant to say at the beginning, Drafts are a very nice achievement, would want you to know, @brandonkelly .

Which I fully appreciate, having tracked along to wire other software with them, as they were created.

The change in view from how things were, just opens the opportunity for us to get them fully smooth -- and with all their advantages.

wsydney76 commented 4 years ago

We also found that this draft work flow can be confusing, so ended up with adding a custom module to each project that changes the button texts and adding some hints.

image

image

image

The texts are project specific, whatever the client understands best, e.g. 'Current' is the term used in the header drop down, 'finish your work' is a term used in other tools the client is familiar with.

/Mel

RitterKnightCreative commented 4 years ago

To me "Create" doesn't seem very clear and is confusing. Is it "Publish" ? Is it "Save" ? What does it mean ? (From an editor's point of view).

Yeh I think the button should be renamed from "Create" to "Publish". After an entry is published, it should then read "Save" (which is does now).

If a draft is not yet published (ie live), "Create" is a bad verb. It doesn't imply that the entry someone is working on will be published. However, if I try to save a brand new entry without a title, for example, in Craft's error message, it does complain the draft can't be published—which implies Craft already "created" something.... a slight continuity disconnect.

Screen Shot 2020-02-20 at 3 01 24 PM

So, it seems at the very least, Craft should be more consistent in its terminology throughout.

Also, on a brand new entry, Craft is saving my work but if I hit the back button, I can navigate away without it complaining. I'm not sure if that's good or bad. As mentioned above, Drafts are definitely saved and you can access if you know where to look for them. However, it would be nice if there was some discoverability there... even if it's just in the dialog box. "Really navigate away from this page? (Your draft is still being saved though, you can find it in the Drafts section" or whatever.)

JoeyNK commented 4 years ago

@brandonkelly I have been testing craft now for about 8 months as we intend to use it on multiple sites. We use it as a headless API. I use to be able to query drafts via Element-API by simply including the draftId in the query criteria but today, I have realised that Craft no longer returns a particular draft (searched for by draftId) of a published article. It only returns the published version even if the draftId is part of the query criteria.

Is this something that has been disabled or I'm I doing something wrong?

brandonkelly commented 4 years ago

Hey @JoeyNK, that seems unrelated to this issue; can you email us at support@craftcms.com ?

leevigraham commented 4 years ago

@wsydney76 Can you share the code for "Possibly conflicting draft"? I just posted this https://github.com/craftcms/cms/issues/6176 which I think addresses the same issue.

wsydney76 commented 4 years ago

@leevigraham Sure, don't have access to the final version right now, but this one should already work:

https://github.com/wsydney76/craft-drafts-module

@ Werner Sorry to have brought your old man's retired account back to life :-)

/Mel

mmikkel commented 4 years ago

Changing the behavior so it saves the entry as a “real” draft doesn’t make a ton of sense. To do that, we would still need to save a real entry first, populating it with a title and probably whatever other content you’ve already entered, and then also create a new draft for that entry. If that’s in fact what you want to do, then you can get to that state easily enough by clicking “Create” followed by “Save as a draft”.

That's not a solution, at least not an intuitive one :)

From the perspective of a lot of content editors, what they often want to do when creating a new entry is to save their work, without publishing it. Currently, there's no intuitive way to accomplish that.

The initial auto-draft that Craft creates doesn't meet the use case. It's ephemeral (hence it's not really "saved"), and also doesn't offer the reassurance that some content editors need in manually clicking a "Save" button.

Disabling the entry before hitting the "Create" button kinda works, but it's not intuitive at all that what the user needs to do, is to "disable and create", rather than to simply "save as draft" (or "save the draft"). Add to that the fact that a disabled entry and an actual draft is not the same thing.

I think that regardless of how drafts and auto-drafts work behind the scenes, it'd be great if there was a way to improve AX in this area.

brandonkelly commented 4 years ago

That makes a lot of sense @mmikkel.

RitterKnightCreative commented 4 years ago

If you take a page from, say, WordPress, the default action there is Publish but there's another (text only) option to Save draft or Preview.

Screen Shot 2020-08-12 at 3 47 56 PM

Inside Craft, I could see something similar, using the dropdown button:

Screen Shot 2020-08-12 at 3 50 34 PM

leevigraham commented 4 years ago

My custom module UI:

image image
brandonkelly commented 4 years ago

I’ve just resolved this for Craft 3.6. Going forward, when you click the “New entry” button, the entry will start out life as an “unpublished draft” rather than an “unsaved draft”. Unlike the former concept, unpublished drafts aren’t ephemeral. They will continue to exist until explicitly published or deleted. And their primary action is to be saved, rather than “created”.

Pictures are worth a thousand words, so here’s how the editing experience compares between 3.5 and 3.6 when clicking “New entry”…

A comparison of the actions available to unsaved/unpublished drafts in Craft 3.5 vs 3.6

Normal drafts have gained an explicit “Save draft” button as well (saves and takes you back to the entry index), plus “Save and continue editing” (triggers an autosave), and “Publish and add another” actions. Again, 3.5 vs 3.6:

A comparison of the actions available to normal drafts in Craft 3.5 vs 3.6

You might notice that the actions available to unpublished drafts are identical to normal drafts, which is intended. The only difference is that in the case of an unpublished draft, there’s no source entry yet, up until someone publishes it.

brandonkelly commented 3 years ago

Craft 3.6 RC2 is out now with this change.

brandonkelly commented 3 years ago

Craft 3.6 has now been officially released ✨

RitterKnightCreative commented 3 years ago

@brandonkelly Not to drudge up an old issue here but is there a UX reason why after pressing Save on a published entry Craft sends you back to the Entries screen? Craft doesn't do this when a draft is not yet published—it takes you to the published entry's screen.

I just had a client the other day make changes to the "live" published version of an entry. She did everything right, including pressing the Save button. However, because that entry was already published, the client thought she had made a mistake since she was now seeing the "export" button on the bottom of the entries window after pressing Save. She apparently had missed the "entry saved" notification on the top. However, the entry was saved and her changes published.

I know it's always been this way but I've felt it's always been a workaround.

To that end, I wonder about changing the "Save" button to a "publish changes" button on current / live documents? That would at least make it clear what's going on.

brandonkelly commented 3 years ago

Craft doesn't do this when a draft is not yet published—it takes you to the published entry's screen.

@RitterKnightCreative If you are editing an unpublished draft and click the “Save draft” button, it will in fact take you back to the Entries index page, like all other Save buttons.

To that end, I wonder about changing the "Save" button to a "publish changes" button on current / live documents? That would at least make it clear what's going on.

We currently reserve the word “Publish” to refer to the act of converting a draft into a published entry. Not completely opposed to expanding on that, but it would be something we’d need to discuss a bit. Feel free to post a new issue about it.