Make WordPress Core

Opened 11 months ago

Closed 9 months ago

#56167 closed defect (bug) (fixed)

Twenty Twenty: Post title block alignment setting is not working

Reported by: smit08's profile smit08 Owned by: audrasjb's profile audrasjb
Milestone: 6.1 Priority: normal
Severity: normal Version:
Component: Bundled Theme Keywords: has-testing-info has-video-link has-patch commit
Focuses: css Cc:

Description

Using post title block in twenty-twenty theme. But alignment settings are not working on the editor side only. When I align the block to left or right or center, on the editor side no change is displayed but in front side, the block is working and displaying in proper alignments.

Steps to reproduce the issue:

  1. Activate the twenty-twenty theme.
  2. Add the post title block.
  3. Set the alignment left or right, you will see the alignment is not changing on the editor side. Update the post and see it on the front side. On the front side, the alignment is working proper.

Attaching video URL for proper understanding.
Video link: https://www.loom.com/share/90fbb582d65a45cf816077c28d118c55

The solution is the front and editor side should have the same view so the user will not gets confused. I am working on it for applying patch.

Attachments (5)

#56167.patch (1.7 KB) - added by kajalgohel 11 months ago.
patch added
56167.patch (1.3 KB) - added by smit08 11 months ago.
kajal has added the max-width css also and kajal also added the css for center alignment also but there is no need of center alignment. Because center alignment is working fine. Only left and right alignment was required. So created optimized patch.
56167.2.patch (1.3 KB) - added by devtanbir 11 months ago.
56167.3.patch (1.3 KB) - added by sabernhardt 11 months ago.
adding rtl:ignore
058d2e8b9ca254eaefbfbebab8271f4e.gif (275.2 KB) - added by audrasjb 9 months ago.
Patch works fine

Download all attachments as: .zip

Change History (10)

@kajalgohel
11 months ago

patch added

#1 @kajalgohel
11 months ago

  • Keywords has-patch needs-testing added; needs-patch removed

@smit08
11 months ago

kajal has added the max-width css also and kajal also added the css for center alignment also but there is no need of center alignment. Because center alignment is working fine. Only left and right alignment was required. So created optimized patch.

@devtanbir
11 months ago

#2 @desrosj
11 months ago

  • Summary changed from Post title block alignment setting is not working in twenty twenty theme. to Twenty Twenty: Post title block alignment setting is not working

@sabernhardt
11 months ago

adding rtl:ignore

#3 @sabernhardt
11 months ago

  • Focuses css added
  • Milestone changed from Awaiting Review to 6.1

Using this block in Twenty Twenty does not make much sense to me, unless perhaps the template is changed in a child theme. Anyway, this seems like a simple fix.

The stylesheet needed /*rtl:ignore*/ so the directions would remain the same when anyone compiles the RTL stylesheet from style.css.

I did not find any other rich text blocks that override left or right alignment, so I kept the .wp-block-post-title class from 56167.2.patch.

Last edited 11 months ago by sabernhardt (previous) (diff)

@audrasjb
9 months ago

Patch works fine

#4 @audrasjb
9 months ago

  • Keywords commit added; needs-testing removed
  • Owner set to audrasjb
  • Status changed from new to accepted

The patch looks good to me (see above screenshot).

I can see a use case for this: some TT child themes may remove the_title() from singular template, so they can manage the post title directly in the editor.

Self assigning for commit.

#5 @audrasjb
9 months ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 54141:

Twenty Twenty: Improve support for Post Title block alignment.

This changeset ensures alignement settings are correctly reflected for the Post Title block in the Editor.

Props smit08, kajalgohel, devtanbir, sabernhardt, audrasjb.
Fixes #56167.

Note: See TracTickets for help on using tickets.