Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 2 years ago

#55634 closed defect (bug) (fixed)

Editor: Update build_comment_query_vars_from_block to handle unapproved comments

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

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.


4 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:


4 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
4 years ago

  • Milestone Awaiting Review6.0
  • Owner set to peterwilsoncc
  • Status newaccepted

#4 @peterwilsoncc
4 years ago

  • Type enhancementdefect (bug)
  • Versiontrunk

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

#5 @peterwilsoncc
4 years ago

  • Resolutionfixed
  • Status acceptedclosed

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
4 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.


2 years ago

Note: See TracTickets for help on using tickets.