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

Core blocks: Block alignment and text alignment should use different and consistent attribute names #9614

Closed
ZebulanStanphill opened this issue Sep 4, 2018 · 2 comments
Labels
[Feature] Blocks Overall functionality of blocks [Type] Code Quality Issues or PRs that relate to code quality [Type] Enhancement A suggestion for improvement.

Comments

@ZebulanStanphill
Copy link
Member

ZebulanStanphill commented Sep 4, 2018

The issue

I have noticed that supports: { align: true } adds an align attribute to a block. Notably, core blocks that have text alignment options tend to name the text alignment attribute align. I think this is confusing, and it makes it difficult to update blocks to support block alignment later on. I think the name used for block alignment vs text alignment attributes should be made more consistent.

Proposed solution

I think that block alignment attributes should remain as align, and I think text alignment attributes should be called textAlign.

Related issues and PRs

@ZebulanStanphill ZebulanStanphill changed the title Block align and text align should use different attribute names Core blocks: Block alignment and text alignment should use different and consistent attribute names Sep 4, 2018
@0aveRyan
Copy link
Contributor

0aveRyan commented Sep 4, 2018

This is a great callout @ZebulanStanphill! Particularly helpful if a block is right-aligned but has centered text (many quote treatments).

@0aveRyan 0aveRyan added [Type] Enhancement A suggestion for improvement. [Feature] Blocks Overall functionality of blocks [Type] Code Quality Issues or PRs that relate to code quality labels Sep 4, 2018
@youknowriad
Copy link
Contributor

I think it's too late to change any block attribute at the moment.
Also there has been some work recently to bring consistency to the "align" support usage. Right @ZebulanStanphill

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Blocks Overall functionality of blocks [Type] Code Quality Issues or PRs that relate to code quality [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

3 participants