Make WordPress Core

Opened 2 years ago

Closed 5 weeks ago

#55744 closed defect (bug) (wontfix)

Twenty Twenty: comments form margins do not work with Post Comments Form block

Reported by: kajalgohel's profile kajalgohel Owned by:
Milestone: Priority: normal
Severity: normal Version: 6.0
Component: Bundled Theme Keywords: has-patch needs-testing close
Focuses: ui, css Cc:

Description

When we select Post Comments Form block in post or page, the design is not proper in front-side.

For better understanding I provide video attachment.

Attachments (6)

Twenty-twenty Theme.mp4 (7.7 MB) - added by kajalgohel 2 years ago.
#55744.diff (429 bytes) - added by kajalgohel 2 years ago.
patch added
55744.1.patch (445 bytes) - added by nidhidhandhukiya 23 months ago.
According to me the spacing should same as the other theem so it follows consistency. In my patch i am trying to give solution similar to the other themes.
55744.2.patch (1.7 KB) - added by sabernhardt 23 months ago.
multiple selectors for heading styles
55744.3.patch (1.7 KB) - added by multidots1896 22 months ago.
added patch
post-comment-block-form-before.png (128.9 KB) - added by sabernhardt 21 months ago.
screenshot showing both (duplicate) copies of the form: the Post Comments Form block and the one in Twenty Twenty's template (without any patch)

Change History (11)

@kajalgohel
2 years ago

patch added

#1 @kajalgohel
2 years ago

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

@nidhidhandhukiya
23 months ago

According to me the spacing should same as the other theem so it follows consistency. In my patch i am trying to give solution similar to the other themes.

@sabernhardt
23 months ago

multiple selectors for heading styles

#2 @sabernhardt
23 months ago

Thanks for the report and patches!

The post comments form block's heading styles are more specific than Twenty Twenty's.

.wp-block-post-comments-form .comment-reply-title {
	margin-bottom: 0;
}

Using negative values may not have been the best way to set these margins in the first version of the theme. If the margin increases, however, the bottom margin of the heading would need to be set to zero in the theme so it does not change the spacing for the standard (non-block) comment form.

Adding !important can override styles that the user defined, either in a child theme or in Additional CSS.

For another option, I suggest adding a more specific selector without replacing the original selector.

.comment-reply-title,
.wp-block-post-comments-form .comment-reply-title {

On the other hand, this block is designed for full-site editing and the theme was not. When I add the block to a post that enables comments, I still have the comment form added by the template. Then I have a duplicate form with duplicate IDs.

@multidots1896
22 months ago

added patch

@sabernhardt
21 months ago

screenshot showing both (duplicate) copies of the form: the Post Comments Form block and the one in Twenty Twenty's template (without any patch)

#3 @sabernhardt
21 months ago

  • Keywords close added
  • Summary changed from Twenty Twenty Theme : Post Comments Form block design issue in 6.0 RC2 to Twenty Twenty: comments form margins do not work with Post Comments Form block
  • Version set to 6.0

No, I recommend closing this ticket without changing the theme stylesheets. This is an editor bug because it allows people to add this block in 'classic' themes, within the post editor, even after GB28744 excluded comments-related blocks from classic themes.

Creating a second copy of the form causes invalid, duplicate ID attributes, which can make both forms more difficult to use. At least Twenty Twenty's broken styles should effectively discourage anyone from using this block in the theme.

Theoretically a child theme could adjust the template. However, if someone wants to remove the template's form and add the block to each post, revising the margins for that site would be a small additional task.

#4 @sabernhardt
19 months ago

#56676 was marked as a duplicate.

#5 @karmatosed
5 weeks ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

I agree with the recommendation of 20 months ago, so will be closing this ticket for now. We can always consider things at a later stage. Thank you everyone for your work on this, please mention if you don't agree and we can always reopen tickets.

Note: See TracTickets for help on using tickets.