-
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
Archives block: use align supports flag + add wide/full align support #10706
Archives block: use align supports flag + add wide/full align support #10706
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 thewide
andfull
alignments to the Archives block.Notably, the
align
attribute is still defined in PHP since theenum
property prevents invalid alignment classes from appearing on the front-end. (You can test this by using the Code Editor to modify an existingalign
attribute 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.enum
to thealign
attribute defined inindex.php
to fix an issue inmaster
where you could set invalid values for the attribute, which would result in invalid classes (e.g. "alignbob") on the front-end.edit.js
were 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