Skip to content

feat(correction-blocks): Correction box & Loop item + Template#3787

Merged
thomasguillot merged 7 commits into
trunkfrom
feature/correction-blocks
Mar 4, 2025
Merged

feat(correction-blocks): Correction box & Loop item + Template#3787
thomasguillot merged 7 commits into
trunkfrom
feature/correction-blocks

Conversation

@Takshil-Kunadia

Copy link
Copy Markdown
Collaborator

All Submissions:

Changes proposed in this Pull Request:

Closes https://app.asana.com/0/1209292256643614/1209292256643625

How to test the changes in this Pull Request:

Testing Corrections Box Block:-

  1. Create a post add corrections/clarifications.
  2. Add Corrections box block to see the corrections.
  3. Save the post and view the corrections on the front-end.
  4. Modify the corrections on the editor/Add new corrections and click on refresh button to view updated corrections.

Testing Corrections Loop Block Pattern:-

  1. Create a new Page and click + > Patterns Corrections Loop.
  2. Edit the template to change the title/description.
  3. Save & view the page on front-end.

Testing Corrections Archive Block Template:-

  1. Go to Site editor > Template > Search "Corrections" > "Corrections Archive".
  2. Edit the template to replace Header & Footer / change the title/description.
  3. Create a new Page and Select Corrections Archive template.
  4. Save & view the page on front-end.

For individual testing of the Corrections Loop item block

  1. Add a Query Loop block and add Post Template and Pagination blocks inside it.
  2. In Post Template block, Add correction Item block.
  3. Set Post type as Corrections in Query Loop block settings. Per page count can also be set here.
  4. View the corrections archive.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@Takshil-Kunadia Takshil-Kunadia force-pushed the feature/correction-blocks branch from a72c96a to 45ff164 Compare February 28, 2025 08:09
@Takshil-Kunadia Takshil-Kunadia marked this pull request as ready for review February 28, 2025 10:52
@Takshil-Kunadia Takshil-Kunadia requested a review from a team as a code owner February 28, 2025 10:53
@github-actions github-actions Bot added the [Status] Approved The pull request has been reviewed and is ready to merge label Feb 28, 2025

@thomasguillot thomasguillot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It’s working well! Just a couple of changes:

  • The timezone isn’t needed
  • The template and pattern strings should be translatable
  • This should be restricted to Block Themes only

@thomasguillot thomasguillot added [Status] Needs Review The issue or pull request needs to be reviewed and removed [Status] Approved The pull request has been reviewed and is ready to merge labels Mar 3, 2025
@thomasguillot thomasguillot requested a review from leogermani March 3, 2025 10:25
@Takshil-Kunadia

Copy link
Copy Markdown
Collaborator Author

Thanks! @leogermani @thomasguillot for taking a look 🙇 .

The timezone isn’t needed

Removed the timezone from heading ✅

The template and pattern strings should be translatable

Wrapped strings in gettext fns. ✅

This should be restricted to Block Themes only

Assuming this is in reference to the Pattern & Template, yes they will only be registered on block themes.

public static function register_corrections_block_patterns() {
if ( ! class_exists( 'WP_Block_Patterns_Registry' ) || ! wp_is_block_theme() ) {
return;

public static function register_corrections_template() {
if ( ! class_exists( 'WP_Block_Templates_Registry' ) || ! wp_is_block_theme() ) {
return;

@thomasguillot

Copy link
Copy Markdown
Contributor

Assuming this is in reference to the Pattern & Template, yes they will only be registered on block themes.

Sorry, I was talking about the Blocks.

@github-actions github-actions Bot added [Status] Approved The pull request has been reviewed and is ready to merge and removed [Status] Needs Review The issue or pull request needs to be reviewed labels Mar 4, 2025
@thomasguillot thomasguillot merged commit c215dc2 into trunk Mar 4, 2025
@thomasguillot thomasguillot deleted the feature/correction-blocks branch March 4, 2025 10:03
@github-actions

github-actions Bot commented Mar 4, 2025

Copy link
Copy Markdown

Hey @Takshil-Kunadia, good job getting this PR merged! 🎉

Now, the needs-changelog label has been added to it.

Please check if this PR needs to be included in the "Upcoming Changes" and "Release Notes" doc. If it doesn't, simply remove the label.

If it does, please add an entry to our shared document, with screenshots and testing instructions if applicable, then remove the label.

Thank you! ❤️

matticbot pushed a commit that referenced this pull request Mar 6, 2025
# [6.1.0-alpha.1](v6.0.1...v6.1.0-alpha.1) (2025-03-06)

### Bug Fixes

* **modal-checkout:** password setup ([8fbfabd](8fbfabd))
* **my-account:** handle email change esp sync errors ([#3792](#3792)) ([3d9f294](3d9f294))
* **my-account:** send change email to old and new emails ([#3786](#3786)) ([710d53d](710d53d))
* **premium-newsletters:** show premium lists in post-checkout signup ([#3788](#3788)) ([ccb1526](ccb1526))
* spacer block handling with registration block ([e9b7beb](e9b7beb))

### Features

* **correction-blocks:** Correction box & Loop item + Template ([#3787](#3787)) ([c215dc2](c215dc2))
* **correction-blocks:** update corrections template ([#3793](#3793)) ([c7aea33](c7aea33))
* **my-account:** add email change cancellation option ([#3778](#3778)) ([600ad61](600ad61))
* **my-account:** sync admin email change with ESP/stripe ([#3799](#3799)) ([7179ffd](7179ffd))
* **my-account:** sync email change with esp ([#3780](#3780)) ([983c087](983c087))
* **my-account:** sync email change with stripe ([#3789](#3789)) ([4f45795](4f45795))
@matticbot

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 6.1.0-alpha.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

matticbot pushed a commit that referenced this pull request Mar 18, 2025
# [6.1.0](v6.0.5...v6.1.0) (2025-03-18)

### Bug Fixes

* **modal-checkout:** endpoint to refresh newsletter lists via REST ([#3841](#3841)) ([2b294e0](2b294e0))
* **modal-checkout:** password setup ([8fbfabd](8fbfabd))
* **my-account:** handle email change esp sync errors ([#3792](#3792)) ([3d9f294](3d9f294))
* **my-account:** send change email to old and new emails ([#3786](#3786)) ([710d53d](710d53d))
* **premium-newsletters:** show premium lists in post-checkout signup ([#3788](#3788)) ([ccb1526](ccb1526))
* spacer block handling with registration block ([e9b7beb](e9b7beb))

### Features

* **correction-blocks:** Correction box & Loop item + Template ([#3787](#3787)) ([c215dc2](c215dc2))
* **correction-blocks:** update corrections template ([#3793](#3793)) ([c7aea33](c7aea33))
* enable email change for newspack users ([#3824](#3824)) ([9c152a8](9c152a8))
* **my-account:** add email change cancellation option ([#3778](#3778)) ([600ad61](600ad61))
* **my-account:** sync admin email change with ESP/stripe ([#3799](#3799)) ([7179ffd](7179ffd))
* **my-account:** sync email change with esp ([#3780](#3780)) ([983c087](983c087))
* **my-account:** sync email change with stripe ([#3789](#3789)) ([4f45795](4f45795))
* **woo-member-commenting:** optional module for member commenting ([#3783](#3783)) ([90746c8](90746c8))

### Reverts

* Revert "refactor(corrections): remove corrections feature flag (#3797)" (#3825) ([afd01f2](afd01f2)), closes [#3797](#3797) [#3825](#3825)
@matticbot

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 6.1.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released on @alpha released [Status] Approved The pull request has been reviewed and is ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants