-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Publish flow: ensure setting date to the past sets the status to draft #62151
Comments
In this PR I mention that there are still some nuances due to the many different possible flows.
Status and publish date are quite connected, but because they are different props we already have some side effects to update one when the other changes and we should see to refine holistically. That is because by handling a use case might cause other problems and the example for this specific case is:
Having said that, with a temporary inconsistency created by the user, if they save, the status will be updated properly to reflect what it should be. I thought the direction is try to be a bit less 'smart' when trying to guess user intentions and not be too eager to update other props automatically. Refining and unifying the publish flow has still lots of work and this is mostly due to the big complexity there. I'd suggest try to explore how we can do this holistically (when/how to be smart and auto update) and not try this for 6.6. I'm happy to hear others' thoughts too for this one. |
I think this is another great example of why Status and Publish date should be combined in a single UI for unpublished posts. That UI should not allow incompatible date + status to be applied. Status updates should feel like more definitive actions, whether it's publishing, scheduling, or unpublishing. There's a Figma here with some longer-term concepts around these flows. Feedback very welcome! With separate controls we open the door to all kinds of shenanigans, and (as Nik already mentioned) must include additional logic to conditionally update values in the background. This is confusing to use, and adds more code, lose/lose.
This is what happens in wp-admin 'quick edit' experience and seems acceptable to me. A user choosing to schedule a post then selecting a date in the past is probably an edge case. Though it's worth noting in this flow the status is updated from |
Very much agreed here.
I hear you and don't want to switch things up too much either. With that said, I worry a bit about changing the flow for folks when it's the key part of using WordPress (publishing content) when these issues haven't been solved. |
I feel this flow is in an acceptable spot for 6.6. The exact same problem has existed in wp-admin for years: you can quick-edit a scheduled post and set a publish date in the past. If you do this then the status automatically switches to published behind the scenes. It's definitely not ideal, but I have to question how often we expect users to intentionally do this? The decision was made early in the 6.6 cycle to align publish flows around the site editor due to it's better handling of multi-entity saving. If we reverted this work to align with the post editor I fear we'll be creating a lot of headaches for ourselves down the road. It doesn't seem worth it to cater to what is arguably an edge case. |
In testing this PR for 6.6 #62070 I noticed that I could set the status to scheduled but then pick a date in the past and the scheduled status wouldn't update. I think the status should be "draft" since it's not yet published but curious for @WordPress/gutenberg-design feedback.
To replicate, set status to "Scheduled" then change the Publish date to the past or now. Notice the status remains as "Scheduled" while the Schedule/Publish button changes:
three.bugs.mov
^Note this shows two bugs I'm opening to give a full view of the current flow. cc @ntsekouras
The text was updated successfully, but these errors were encountered: