Skip to content
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

Categories block: use supports flag for block alignment + wide align support #13215

Merged
merged 1 commit into from
Jan 7, 2019
Merged

Categories block: use supports flag for block alignment + wide align support #13215

merged 1 commit into from
Jan 7, 2019

Conversation

ZebulanStanphill
Copy link
Member

@ZebulanStanphill ZebulanStanphill commented Jan 5, 2019

Description

This PR changes the code for the Categories block to use the align supports flag. It also adds support for the wide alignment to the Categories block, which strangely was lacking support for it despite already supporting the full alignment.

How has this been tested?

I opened a post with an existing Categories block and checked to make sure setting alignments worked and applied the right classes in the editor and front-end.

Types of changes

  • The block now uses supports: { align: true } to add block alignment support.
  • Added support for the wide alignment. (The block already supported the full alignment.)

Related PRs

@aduth
Copy link
Member

aduth commented Jan 7, 2019

It also adds support for the wide alignment to the Categories block, which strangely was lacking support for it despite already supporting the full alignment.

Looking through the history, it may have been done this way as the original block blueprint described in #1790 did not consider a "wide" alignment option. I don't know that this was intentional, or merely overlooked. cc @melchoyce

@aduth aduth added [Feature] Blocks Overall functionality of blocks [Type] Code Quality Issues or PRs that relate to code quality [Block] Categories Affects the Categories Block and removed [Feature] Blocks Overall functionality of blocks labels Jan 7, 2019
@melchoyce
Copy link
Contributor

Either overlooked, or the initial mockups predated the wide option.

@ZebulanStanphill
Copy link
Member Author

ZebulanStanphill commented Jan 7, 2019

@aduth @melchoyce Actually, looking at the initial mockup, it actually lacks the icon for full alignment (or at least, the icon in the mockup resembles the current wide alignment icon). This is the reverse of how the Categories block is actually currently implemented, where it has the full alignment but not wide. Personally, I see no reason why the block should only have one and not the other.

Copy link
Member

@aduth aduth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

@aduth aduth merged commit 71be7e6 into WordPress:master Jan 7, 2019
@aduth aduth modified the milestone: 5.0 (Gutenberg) Jan 7, 2019
@youknowriad youknowriad added this to the 4.9 milestone Jan 7, 2019
@ZebulanStanphill ZebulanStanphill deleted the update/categories-block-align branch January 7, 2019 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Categories Affects the Categories Block [Feature] Blocks Overall functionality of blocks [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants