Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 5 months ago

#55634 closed defect (bug) (fixed)

Editor: Update build_comment_query_vars_from_block to handle unapproved comments

Reported by: darerodz's profile darerodz Owned by: peterwilsoncc's profile peterwilsoncc
Milestone: 6.0 Priority: normal
Severity: normal Version: 6.0
Component: Editor Keywords: has-patch has-unit-tests
Focuses: Cc:

Description

The build_comment_query_vars_from_block function has been updated recently in Gutenberg (see https://github.com/WordPress/gutenberg/pull/40612), where we solved a problem with comment previews not being rendered.

Some PHP unit tests related to that function are failing there because that function is already defined in WordPress 6.0, so, in order to make those tests work, we have to backport first the changes in that function into WordPress, as explained in https://github.com/WordPress/gutenberg/pull/40612#issuecomment-1110107499.

Change History (8)

This ticket was mentioned in PR #2637 on WordPress/wordpress-develop by DAreRodz.


2 years ago
#1

  • Keywords has-patch has-unit-tests added

Backports some changes in build_comment_query_vars_from_block to handle comment previews done in the Gutenberg repo. We need these changes in core before merging https://github.com/WordPress/gutenberg/pull/40612 as explained in https://github.com/WordPress/gutenberg/pull/40612#issuecomment-1110107499.

Trac ticket: https://core.trac.wordpress.org/ticket/55634

ockham commented on PR #2637:


2 years ago
#2

@peterwilsoncc Would you mind committing this to Core? 🙏

(It's a prerequisite for https://github.com/WordPress/gutenberg/pull/40612 and https://github.com/WordPress/gutenberg/pull/40659, which will fix https://github.com/WordPress/gutenberg/issues/40601.)

#3 @peterwilsoncc
2 years ago

  • Milestone changed from Awaiting Review to 6.0
  • Owner set to peterwilsoncc
  • Status changed from new to accepted

#4 @peterwilsoncc
2 years ago

  • Type changed from enhancement to defect (bug)
  • Version set to trunk

Also marking this as a bug as it's a long term feature WP that is needed for FSE too.

#5 @peterwilsoncc
2 years ago

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

In 53298:

Editor: Show comment previews in the Comment Query Loop.

Update build_comment_query_vars_from_block() to show previews of unmoderated comments to the original author of the comment. This duplicates the existing logic in wp_list_comments().

Props darerodz, bernhard-reiter, czapla.
Fixes #55634.

#7 @hellofromTonya
2 years ago

In 53353:

Editor: Add unit test for Comment Template block.

Backport of 2 tests from Gutenberg for the Comment Template block:

  • test line and paragraph breaks are converted into HTML tags.
  • test rendering of unapproved comment preview.

Follow-up to [53298], [53172], [53138].

Props bernhard-reiter, darerodz, gziolo, peterwilsoncc, hellofromTonya.
Fixes #55643.
See #55634.

This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.


5 months ago

Note: See TracTickets for help on using tickets.