Archives block: use align supports flag + add wide/full align support#10706
Archives block: use align supports flag + add wide/full align support#10706ZebulanStanphill wants to merge 1 commit intoWordPress:masterfrom ZebulanStanphill:update/archives-block-align
Conversation
|
Rebased PR and updated it based on feedback on #10758. |
|
@melchoyce or @jasmussen - is it expected to add align wide and full for the Archives block? In #9469 @nfmohit-wpmudev proposed the opposite for Category block. |
|
Now, I see #9413 opened by @kjellr where it's suggested the opposite:
It looks like we should proceed with #9469 instead. |
|
@gziolo But my previous PR, #13215, was already merged by @aduth, adding wide align support to the Categories block. That PR runs counter to #9413, since my PR actually added an alignment to the Categories block. Perhaps some kind of official decision needs to be made on all this? It doesn't make sense to go halfway in one direction and then halfway in the other. |
Yes, my ticket there is now out of date. I just updated the description there to reflect that.
My gut still says that text or list-based blocks like these shouldn't ship with wide/full alignments. They don't clearly benefit from the additional space: in fact, they become less readable with longer line length. |
+1 |
|
In that case, I'm closing this PR :( Let's make sure we remove full and wide from other blocks where it doesn't make sense. @ZebulanStanphill sorry about that. Thank you for your work, hopefully, it pays off with more consistent UI as an effect of your contribution. 🙇 |
Description
Closes #11416.
This PR updates the Archives block to use
supports: { align }to add most of its alignment support, and it adds support for thewideandfullalignments to the Archives block.Notably, the
alignattribute is still defined in PHP since theenumproperty prevents invalid alignment classes from appearing on the front-end. (You can test this by using the Code Editor to modify an existingalignattribute on the block to have an invalid value and then checking the markup of the resulting post.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.edit.jswere incorrectly listed as "Internal dependencies" (which they may have been prior to some stuff being moved into packages). This has been fixed, and the imports are now in alphabetical order.Related PRs