Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix: Publishing UX for contributors #6729
This PR addresses #6725 which reports the incorrect post publishing UX for contributors who doesn't have publishing capability.
How has this been tested?
This PR was tested by verifying the following:
This was tested in WP 4.9.5, Gutenberg 2.8.0, Apache server with PHP 7.2.0 and MySQL 5.6.34. According to initial tests, the code doesn’t seem to affect any other areas.
Types of changes
For the toggle button, this just enforces a condition to check if the user is a contributor or not with the
This PR will be amended later to use
Thank you @danielbachhuber
I can work on this if everyone prefers, but as per the comments here and here, @youknowriad and @jasmussen recommends that we make the publish toggle button say "Publish..." for contributors as well. In that case, wouldn't the pre-publish-panel be required for contributors?
Looks like @karmatosed agrees (she left a
Sounds like the pre-publish-panel is required for contributors and we should be displaying it.
I think we should keep it, but that we should rephrase the text, and consider the contributor role for the pre-publish plugin API.
I understand your concern — if there's nothing for a contributor to change there, why have a publish screen at all?
Perhaps the most important aspect of blogging is that there is friction, just the right amount, to publishing. The "Publish" button is a last moment to reflect on what you wrote, and a celebratory moment when pressed. It is also a better interface than an "Are you sure?"
Yes. Even as a contributor, you are doing a publishing action by submitting for review. You are publishing to your editor to approve.
The other problem this solves, is ensuring that there is space for the button on a mobile device, where "Submit for Review..." would not fit on an iPhone 5 with the other minimal UI in the toolbar, and in other languages it would be worse.
So, I think this is almost ready to ship. Let's change the "Submit for Review..." to "Publish...", and inside the confirm panel, let's rephrase the text. It could for example read:
That's bad, but I tagged "Needs Copy Review" in case someone has a better idea.
I can also imagine a separate pre-submit-for-review API that could show plugin slot fills in the area below. I imagine an SEO score would be nice to know before you submit for review.
I feel like there is the potential for confusion when "publish" language is used, because publish usually means that something is going live, so I'd like to try and help that with the language that displays in the panel -- maybe something like:
In the last commit, I've restored the toggle button label from "Submit for Review…" to "Publish…" for contributors.
Thank you for your copy suggestion @michelleweber !
I've still went with @jasmussen's suggested copy for this commit for now, unless we have a more appropriate copy and confirmations over that.
@michelleweber's copy sounded good, but one thing to note here is, the contributors will be finally clicking the "Submit for Review" button in the post pre-publish panel as the post publish button still has the label of "Submit for Review" for contributors.
Thanks guys <3