-
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 Button: Submit for review as pending for contributor #2526
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2526 +/- ##
==========================================
+ Coverage 30.2% 30.65% +0.44%
==========================================
Files 174 174
Lines 5270 5268 -2
Branches 900 902 +2
==========================================
+ Hits 1592 1615 +23
+ Misses 3121 3102 -19
+ Partials 557 551 -6
Continue to review full report at Codecov.
|
@@ -0,0 +1,203 @@ | |||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for these tests, these are very useful.
), | ||
withAPIData( () => { | ||
return { | ||
user: '/wp/v2/users/me?context=edit', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The context edit
is awesome :). Seems like a hidden feature
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works great for me!
I don't know if we want a special notice for this, or if the "saved" status is enough.
0c31935
to
30c2a73
Compare
Yeah, we should probably want some messaging. The current editor shows a "Post submitted" after submitting for review. We can do similarly in the effects for publishing a post, but we'll want to think through ramifications of considering "pending" as a published state. Lines 91 to 97 in 5f0fe6f
I'll plan to create a separate issue. |
Closes #2029
Closes #2547
This pull request seeks to account for user capability in deciding the behavior of the Publish button. Specifically, if a user is not capable of publishing posts, they must Submit for Review instead, flagging the post as Pending.
Testing instructions:
The "Submit for Review" label should take priority over all other scenarios, including updating an existing post and setting a post into the future.