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

Add Comments block. #2986

Merged
merged 18 commits into from
Nov 9, 2022
Merged

Add Comments block. #2986

merged 18 commits into from
Nov 9, 2022

Conversation

JakePT
Copy link
Contributor

@JakePT JakePT commented Sep 6, 2022

Description of the Change

Adds a Block version of the Comments widget as the "Search Comments" block.

The block replicates the functionality of the Comments widget with the addition of an editable <label> element for the search form.

Closes #2972

How to test the Change

  1. Open the blocks-based widgets editor.
  2. Click to insert a block, search for the Search Comments (ElasticPress) block.
  3. The block should appear and function the same as the legacy Widget.
  4. With the Classic Widgets plugin enabled, add the Comments — ElasticPress widget.
  5. Disable Classic Widgets and open the blocks-based widgets editor.
  6. It should be possible to transform the legacy widget into the new block.

Changelog Entry

  • Added: A Search Comments block for searching comments. Replaces the Comments widget in the block editor.

Credits

@JakePT

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@JakePT JakePT added this to the 4.4.0 milestone Sep 6, 2022
@JakePT JakePT self-assigned this Sep 6, 2022
@JakePT JakePT marked this pull request as ready for review September 27, 2022 10:45
@JakePT JakePT requested a review from felipeelia September 27, 2022 10:45
@JakePT JakePT changed the title WIP: Add Comments block. Add Comments block. Sep 27, 2022
@felipeelia
Copy link
Member

@JakePT It seems e2e tests are not passing. Do you mind checking them so we can merge this PR? It may be worth giving a look at the solutions we've implemented to the intermittent failures we had for facets here.

Copy link
Member

@felipeelia felipeelia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JakePT this looks great. Do you mind addressing the minor issues I highlighted before we merge it? Thanks!

assets/js/blocks/comments/block.json Outdated Show resolved Hide resolved
includes/classes/Feature/Comments/Comments.php Outdated Show resolved Hide resolved
includes/classes/Feature/Comments/Comments.php Outdated Show resolved Hide resolved
tests/cypress/integration/features/comments.cy.js Outdated Show resolved Hide resolved
@felipeelia felipeelia merged commit c06cc5c into develop Nov 9, 2022
@felipeelia felipeelia deleted the feature/2972 branch November 9, 2022 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ElasticPress-Comments block
2 participants