Latest Posts block: use align supports flag + add left/right align support#10707
Closed
ZebulanStanphill wants to merge 2 commits intoWordPress:masterfrom
ZebulanStanphill:update/latest-posts-block-align
Closed
Latest Posts block: use align supports flag + add left/right align support#10707ZebulanStanphill wants to merge 2 commits intoWordPress:masterfrom ZebulanStanphill:update/latest-posts-block-align
ZebulanStanphill wants to merge 2 commits intoWordPress:masterfrom
ZebulanStanphill:update/latest-posts-block-align
Conversation
This was referenced Nov 2, 2018
Member
Author
|
Rebased to resolve merge conflicts. Also, I think the bug label may be appropriate for this pull request. |
Member
Author
|
Rebased PR and updated it based on feedback on #10758. |
This was referenced Jan 5, 2019
Member
Author
|
Closing due to the similar PR, #8814, being merged. |
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.
Description
Closes #8777.
(Note that this PR currently contains #10706, which is a blocker for this one due to both modifying the same file. Once that PR is merged, this one will be rebased.)
This PR refactors the Latest Posts block to use the
supports: { align }flag and adds support for theleftandrightalignments to the block. Notably, support for those alignments was already implied bygetEditWrapperPropsinindex.js, but due to mistakes inmaster, the alignments could not be chosen in the editor. This PR also adds anenumproperty to thealignattribute inindex.phpto prevent invalid alignment classes from appearing on the front-end.This PR is pretty much the same as #10706, except it is for the Latest Posts block rather than the Archives block.
Types of changes
supports: { align }to add block alignment support to the block.enumto thealignattribute defined inindex.phpto fix an issue inmasterwhere you could set invalid values for the attribute, which would result in invalid classes (e.g. "alignbob") on the front-end.index.phpand made it consistent with other blocks (e.g. Archives and Categories blocks).index.phpwere in a random order; now they are in alphabetical order.Related PRs