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

Heading Block: Double alignment controls in toolbar #26335

Closed
ryelle opened this issue Oct 20, 2020 · 1 comment · Fixed by #26492
Closed

Heading Block: Double alignment controls in toolbar #26335

ryelle opened this issue Oct 20, 2020 · 1 comment · Fixed by #26492
Assignees
Labels
[Block] Heading Affects the Headings Block [Priority] High Used to indicate top priority items that need quick attention [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@ryelle
Copy link
Contributor

ryelle commented Oct 20, 2020

Describe the bug
After #25917 was merged, the block alignment toolbar is automatically added to the Heading block toolbar, and it controls the align attribute. This attribute was already in use for text alignment, so now there are two controls which both control align.

To reproduce

  1. Add a Heading block
  2. Click the text alignment to center the text
  3. Decide you also want it wide, so click the block alignment & select wide
  4. The text is now left-aligned

Expected behavior
Probably text alignment and block size (default/wide/full) should be separate, so that you can have a wide centered heading. Otherwise, maybe use just the BlockAlignmentToolbar & remove the text alignment, so it's clear that you can't have wide + center.

Screenshots

Screen Shot 2020-10-20 at 4 36 19 PM

If you have a wide heading like above, then click text align center, it goes back to default width.

Screen Shot 2020-10-20 at 4 36 30 PM

Editor version (please complete the following information):

  • WordPress version: 5.6-alpha
  • Does the website has Gutenberg plugin installed, or is it using the block editor that comes by default? Plugin
  • If the Gutenberg plugin is installed, which version is it? master
@ryelle ryelle added [Type] Bug An existing feature does not function as intended [Block] Heading Affects the Headings Block labels Oct 20, 2020
@ZebulanStanphill
Copy link
Member

It looks like the solution here is to update the Heading block to use an attribute called textAlign for the text alignment (with a deprecation to convert existing blocks from WP 5.5).

@ZebulanStanphill ZebulanStanphill added the [Priority] High Used to indicate top priority items that need quick attention label Oct 21, 2020
@ntsekouras ntsekouras self-assigned this Oct 26, 2020
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Oct 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Heading Affects the Headings Block [Priority] High Used to indicate top priority items that need quick attention [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants