Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.42k stars 1.99k forks source link

Unable to move page to draft on an unlaunched Coming Soon site #49358

Closed tbradsha closed 3 years ago

tbradsha commented 3 years ago

Steps to reproduce the behavior

  1. Create a new site. Do not launch it.
  2. Create a new page or post. Publish it in any status (public, private, or password-protected).

There should be a way to set a page or post to draft again prior to launch, but there isn't without going to WP Admin. This is also the case with existing posts/pages that are already published.

Note that if one launches, then switches back to Coming Soon, the "Switch to Draft" option remains present.

Context

I discovered this during a chat with 27312544-hc, and confirmed it on a new site on my end.

Browser / OS version

Multiple browsers on macOS 11.1.

Is this specific to the applied theme?

Multiple themes.

Does this happen on simple or atomic sites or both?

Only Simple sites.

Level of impact (Does it block purchases? Does it affect more than just one site?)

It affects all unlaunched Simple sites.

Screenshot / Video: If applicable, add screenshots to help explain your problem.

Copons commented 3 years ago

Pinging @Automattic/luna as this might be related to #49004.

I can reproduce the issue following the steps provided. I defer to you to know if the missing "Switch to Draft" button on Coming Soon sites is intentional (it looks like it is, but I have no familiarity with this area).

On top of this, I'd like to point out (as mentioned by the OP), that while "new" Coming Soon sites have the Launch button and lack the Draft one, "reverted" to Coming Soon sites don't. To clarify:

This seems less intentional to me than the missing draft button. 🤔

tbradsha commented 3 years ago

There's at minimum a major semantic difference between private and draft, so it'd be good to always allow drafts.

Copons commented 3 years ago

I agree that we should keep the switch to draft function on any site status.

BTW when I said it was hidden intentionally, I forgot to point out where:

https://github.com/Automattic/wp-calypso/blob/795c89aa165ddd92a3e33388aaa00bf696bb7d60/apps/editing-toolkit/editing-toolkit-plugin/editor-site-launch/src/launch-button/styles.scss#L2-L5

yansern commented 3 years ago

I'm trying to track down the historical reasons behind hiding the draft button. It was first introduced in this PR back in June 2020 but it wasn't explained why. https://github.com/Automattic/wp-calypso/pull/42933/files

I agree that we should keep the switch to draft function on any site status.

I don't see a reason why a post can't be draft when the site is not launched (unless the purpose is less confusion for new users, but if that's the case, it would be tricky to determine when or when not to show the draft button).

So yes, let's open a PR to remove those CSS.