When publishing a post, if you set the visibility to "private" in the pre-publish panel, a browser notification appears, asking if you want to immediately publish the post as private. Dismissing the notification reverts the selection, and approving it publishes the post immediately.

This also happens in the document settings sidebar, where it's even more likely that users wouldn't want to immediately publish their post:

I'm not sure if this is by design, but it feels like unexpected behaviour, especially when it's presented in line with the public/password-protected options, both of which don't force an immediate publish. We also skip all of the pre-publish and post-publish checks altogether when using this approach, which means the publishing experience feels markedly different when publishing a private post.
That definitely seems like a bug, or if it's by design that's a very weird design and we should nix it ๐
This is not a bug :). We could argue that's is a weird design but since you can't save a "private draft" for instance, it kind of make sense to publish directly.
There are semantics people attribute to something being a draft versus "published" though. It also seems like a deliberate special case that we doโฆ if a post can technically be both a draft and private, we should allow it. If we are special-case not allowing it that seems a silly special-case. ๐
I think it wasn't clear in my response:
if a post can technically be both a draft and private, we should allow it
This is not possible because it's stored in the same field "post status"
I'd love it was possible to separate "post visibility" from "post publish status" but it's not the case in WP, unfortunately, and this would require a big refactoring and probably a big breaking change to be possible.
Ohhhh, okay. That makes sense and I don't think it's worth the refactor! Sorry, I didn't know that.
Maybe the trick here then is to at least improve the messaging. Something like:
Marking a post as "Private" will immediately publish it, is this okay?
๐คทโโ๏ธ
Yes, sounds like the best thing we can do.
Does it need to save right away? Or can changing a post to Private update the "Publish" button UI, and then the state isn't applied until the post is saved?
If it's not saved right away, it will be a confusing UI as well. What happens when you switch visibility to "private" and click "save draft"? A user will expect the privacy setting to stay on "private"
What happens when you switch visibility to "private" and click "save draft"? A user will expect the privacy setting to stay on "private"
The "Save Draft" button should disappear when post visibility is private?
Save draft disappearing on private makes sense to me.
It's not that simple :) you can't schedule a private post either.
you can't schedule a private post either.
You can set the date on a private post though?
I assume this would change the status to "future" which will be a public post?
I'm resistant here because I'm well aware that these tweaks to how we deal with the post status are very fragile and can break very easily. If someone would like to try doing updates, I'm not against it but be aware that there are a lot of assumptions in different places that can lead to breakage.
I'm afraid this would add a lot of complexity for a small gain.
I'm afraid this would all a lot of complexity for a small gain.
Reading all of this makes me think that just tweaking the wording here is probably fine for now ๐
I'm resistant here because I'm well aware that these tweaks to how we deal with the post status are very fragile and can break very easily. If someone would like to try doing updates, I'm not against it but be aware that there are a lot of assumptions in different places that can lead to breakage.
I understand the fragility angle, certainly. The fragility of the code reflects the complexity of the UX behavior, for what _appears_ to be a simple feature. This can be protected against with good UI flows, test coverage, etc.
I'm afraid this would add a lot of complexity for a small gain.
It's not a "small gain"; it's the difference between a polished, robust, world-class product and everything else. It doesn't need to be fixed immediately, certainly, but it should be done well.
Related https://github.com/WordPress/gutenberg/issues/8151#issuecomment-408268945
Kindly disagree. Fixing this in the wrong way would introduce more fragility and complexity.
The wrong way: Cosmetic updates to the UI depending on the status (not being able to save posts as a draft when the visibility is draft, not being able to schedule posts when the visibility is private)
The good way: Separate the visibility and the publishing status in the REST API (and probably WordPress in general).
Fixing this in the wrong way would introduce more fragility and complexity.
I agree with this.
The wrong way: Cosmetic updates to the UI depending on the status (not being able to save posts as a draft when the visibility is draft, not being able to schedule posts when the visibility is private)
I disagree with this. The UI is an _implementation_ of the REST API, not the other way around. The UI should reflect whatever the desired UX intentions are, and be built on top of a broader REST API abstraction.
Furthermore, I haven't a clue what sort of changes this would include with the REST API. Even if we went down that route, making changes to the REST API based on desired UI behavior would be more fragile, brittle, and prone to accidental breakage. And the UI would still need to be updated anyway.
Furthermore, I haven't a clue what sort of changes this would include with the REST API. Even if we went down that route, making changes to the REST API based on desired UI behavior would be more fragile, brittle, and prone to accidental breakage. And the UI would still need to be updated anyway.
I'm not stating that we should make REST API changes based on UI desires. I'm stating that there's a conceptual issue in WordPress (unrelated with any UI) where "visibility is mixed with status" which makes it possible to have "drafts for public posts", "scheduled public posts" but not "drafts for private posts" or "scheduled private posts".
I'm stating that there's a conceptual issue in WordPress (unrelated with any UI) where "visibility is mixed with status" which makes it possible to have "drafts for public posts", "scheduled public posts" but not "drafts for private posts" or "scheduled private posts".
It's an implementation detail, and a constraint to work with. I think it's unlikely that we'll change this part of the application design.
One other element to note here is that selecting "Private" doesn't actually save the post if you haven't entered a title, and select "Private" from the visibility popover in the document inspector.

One other element to note here is that selecting "Private" doesn't actually save the post if you haven't entered a title, and select "Private" from the visibility popover in the document inspector.
Related #6556
I want to be able to set the default post visibility to private for certain post types. This used to work in the classic editor but I guess that wont be an easy thing to implement after scimming through this discussion?
I spent a lot of time on this constrain and offering a good UX when working on the Calypso editor before. cc @folletto.
It's also what lead to the "revert to draft" option, as a way to try to deal with these as binaries (published and unpublished). It's definitely tricky.
Yeah I've flashbacks of it โ unfortunately I wasn't able to find previous references of it that I can extract for clarity.
As noted, the issue is that private is a post state, not an attribute. In the WordPress database, it means both _published_ and _private_. Similarly, scheduled is also a post state.

This is a design decision that was taken a long time ago, and I believe needs to be addressed at some point (hopefully 5.1? ๐). Unfortunately it's deep inside the workings of WordPress so it requires someone doing a deep dive and updating the database with a new column โ or another approach that allows for splitting post state and post visibility.
Right now we can only "work around" this conceptual limitation. I think the warning message does already a good job: even if it's incredibly unexpected, it also spells clearly the outcome of the action.
โ
For the time being, I agree the best option is to improve the messaging. I tweaked further the proposal above explaining better why.
Private posts are published but visible only to admins and editors.
Do you want to publish privately?
I'd also consider in tweaking the secondary text in the dropdown:
Private
Published but visibile only to admins and editors
@folletto @mtias I'm confused: why does the private value get applied right away?
I think the expected behavior is that the "Publish" button text is updated to say "Publish Privately" (or similar wording), and the "Save Draft" button disappears.
Here's the UX in the Classic Editor:

I'd expect Gutenberg to behave similarly to that. A user should be able to change a post to private without immediately applying those changes.
@danielbachhuber because it is still a pretty bad UX. Changing the status to private means that the post is set to be published as soon as you click "update", which is not at all evident, specially since that becomes the only way to save your changes from then on. If you want to continue to make changes to the post, you are also likely to want them saved which would mean you'll press "update" anyways (but now the consequences of the action are less evident).
Furthermore, after "updating" such a post, switching it back to "public" means the post is actually published to everyone, which is not at all intuitive and can lead to data leaks since the chain of actions was: "Set visibility to private" -> "Update the post after a few changes" -> "Switch the post back to public" โ a user is likely to assume this is still a draft, but in this chain of operations the post has been published. The fact changing a "visibility" setting is also changing the post status is not evident, so it's better to make sure the user is ready to commit to that.
because it is still a pretty bad UX. Changing the status to private means that the post is set to be published as soon as you click "update", which is not at all evident, specially since that becomes the only way to save your changes from then on.
Even though it's pretty bad UX, it's still:
alert() popup. I'd be surprised if we used alert() _anywhere_ in core.We're already forcing users to learn the block paradigm. We want to minimize the total number of interfaces they need to relearn.
I think this is what @danielbachhuber is suggesting.

Save draft button removed. Publish button makes it clear that you will be publishing the post if you click it.
After clicking the publish button, you still have to go through the "double check your settings prompt" and it allows another opportunity to change the verbiage of the button to make sure people know the post will be private.

I think it's way more confusing to have a post get published by clicking on something _other_ than the publish button. That button should be the one and only way to make your post live.
@earnjam could you start a patch for this approach? I think it might work alright.
Yep, Iโll try to put something together tonight.
The only thing that is a tiny bit confusing is the post is considered dirty once you change the visibility, so even if it autosaves, then if you try to navigate away from the post it will warn you about unsaved changes. But the visibility is the only thing that wouldn't have been saved in that case.
This is not really a bug and the alternative has drawbacks too. Let's take the time to refine this properly.
I don't want to rush it either, but my only concern with a delay is that we'd then be changing the publishing workflow of core, not a plugin. A good bit different scale.
I have this same issue or very very similar in WordPress.com on 5.0.3
https://imgur.com/uV3Fj53
Hello;
Since I began using WordPress over 6 years ago, I would always start out writing my posts in Private mode. They would stay private until I was ready to publish.
Now, with Gutenberg, when saving my posts as I go along while in Private mode it keeps switching to Public mode.
Has this issue been resolved?
@warrentab Not yet. I have a pull request open (#12023) that solves the issue, but I need to refresh it because there have been some updates that have occurred while I was waiting on design feedback.
Thank you, sir. I guess I will be kept in the loop about this?
Warren
On Tue, Apr 9, 2019 at 4:26 PM William Earnhardt notifications@github.com
wrote:
@warrentab https://github.com/warrentab Not yet. I have a pull request
open (#12023 https://github.com/WordPress/gutenberg/pull/12023) that
solves the issue, but I need to refresh it because there have been some
updates that have occurred while I was waiting on design feedback.โ
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/WordPress/gutenberg/issues/9396#issuecomment-481421337,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIO8-Vg1yWJa_Ewz1itkBglritVvl3nlks5vfPdcgaJpZM4WPYYH
.
Excellent! Glad to hear of this fix.
Happens less to me now since I use draft mode as a workaround.
Private is more useful since I can signal fellow editor and admin about new
proposals. They show in place whereas draft has no root.
Christian.
On Tue, Apr 9, 2019, 16:28 warrentab notifications@github.com wrote:
Thank you, sir. I guess I will be kept in the loop about this?
Warren
On Tue, Apr 9, 2019 at 4:26 PM William Earnhardt
>
wrote:@warrentab https://github.com/warrentab Not yet. I have a pull request
open (#12023 https://github.com/WordPress/gutenberg/pull/12023) that
solves the issue, but I need to refresh it because there have been some
updates that have occurred while I was waiting on design feedback.โ
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<
https://github.com/WordPress/gutenberg/issues/9396#issuecomment-481421337
,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AIO8-Vg1yWJa_Ewz1itkBglritVvl3nlks5vfPdcgaJpZM4WPYYH.
โ
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/WordPress/gutenberg/issues/9396#issuecomment-481422112,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AL2tW7oD5BpknhOQNl0P4BuXSTYNLe9aks5vfPfegaJpZM4WPYYH
.
Most helpful comment
I'd love it was possible to separate "post visibility" from "post publish status" but it's not the case in WP, unfortunately, and this would require a big refactoring and probably a big breaking change to be possible.