-
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
Account for "pending" status when evaluating floating post dates #13178
Conversation
@@ -572,7 +572,7 @@ export function isEditedPostDateFloating( state ) { | |||
const date = getEditedPostAttribute( state, 'date' ); | |||
const modified = getEditedPostAttribute( state, 'modified' ); | |||
const status = getEditedPostAttribute( state, 'status' ); | |||
if ( status === 'draft' || status === 'auto-draft' ) { | |||
if ( status === 'draft' || status === 'auto-draft' || status === 'pending' ) { |
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.
I think the change makes sense! Would it be possible to add a test case covering pending state to the isEditedPostDateFloating selector test suite?
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.
@jorgefilipecosta Took care of this here #13256
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.
Given that @davisshaver implemented a test case in a different PR I think this PR can be merged. PR #13256 should be merged right after.
Thank you for your PR's @earnjam and @davisshaver!
Thanks @davisshaver! |
In #9967 we addressed the issue with post dates properly floating for posts with a status of
draft
, but we didn't account for posts that are marked for review and thus have a status ofpending
. This led to #13176.This simple fix checks for status of
pending
in addition todraft
andauto-draft
when evaluating whether a date is floating.Fixes #13176