Account for "pending" status when evaluating floating post dates#13178
Merged
Account for "pending" status when evaluating floating post dates#13178
Conversation
| const modified = getEditedPostAttribute( state, 'modified' ); | ||
| const status = getEditedPostAttribute( state, 'status' ); | ||
| if ( status === 'draft' || status === 'auto-draft' ) { | ||
| if ( status === 'draft' || status === 'auto-draft' || status === 'pending' ) { |
Member
There was a problem hiding this comment.
I think the change makes sense! Would it be possible to add a test case covering pending state to the isEditedPostDateFloating selector test suite?
Contributor
There was a problem hiding this comment.
@jorgefilipecosta Took care of this here #13256
jorgefilipecosta
approved these changes
Jan 9, 2019
Member
jorgefilipecosta
left a comment
There was a problem hiding this comment.
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!
Contributor
Author
|
Thanks @davisshaver! |
youknowriad
pushed a commit
that referenced
this pull request
Mar 6, 2019
youknowriad
pushed a commit
that referenced
this pull request
Mar 6, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
pendingin addition todraftandauto-draftwhen evaluating whether a date is floating.Fixes #13176