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

Block Hooks: Revert opening up hooked blocks to all block themes #46935

Merged
merged 3 commits into from Apr 26, 2024

Conversation

nerrad
Copy link
Contributor

@nerrad nerrad commented Apr 25, 2024

Submission Review Guidelines:

Changes proposed in this Pull Request:

In #45581, the WooCommerce implementation of the WP Block Hooks API auto-injects the mini-cart and customer account block on all sites with a block theme (running WooCommerce of course). After the release of WC 8.8 (where this change was introduced), we've discovered that impact on existing sites is greater than expected and are reverting until we can implement this more safely.

How to test the changes in this Pull Request:

Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:

The only themes this should apply to now are: "Twenty Twenty-Four, Twenty Twenty-Three, Twenty Twenty-Two, Tsubaki, Zaino, Thriving Artist, Amulet, Tazza" which were where the hooks were implemented as of WC 8.7.

  1. Make sure that the mini-cart block is auto-injected in the header template parts and header patterns for the above list of themes.
  2. Make sure that the mini-cart block is not auto-injected in the header template parts and header patterns for any block theme not in the above list.

Changelog entry

  • Automatically create a changelog entry from the details below.

Significance

  • Patch
  • Minor
  • Major

Type

  • Fix - Fixes an existing bug
  • Add - Adds functionality
  • Update - Update existing functionality
  • Dev - Development related task
  • Tweak - A minor adjustment to the codebase
  • Performance - Address performance issues
  • Enhancement - Improvement to existing functionality

Message

Reverts auto-injecting specific Woo Blocks in every block theme and restores only auto-injecting in themes found in the allow list.

Comment

@github-actions github-actions bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label Apr 25, 2024
@nerrad nerrad added team: Kirigami & Origami block: mini-cart Issues related to the Mini-Cart block. block: customer account Issues related to the Customer account block. focus: blocks labels Apr 25, 2024
Copy link
Contributor

@danielwrobert danielwrobert left a comment

Choose a reason for hiding this comment

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

LGTM!

The code looks good.

I've tested against two themes outside of the $theme_include_list (Portia and Alara) and the hooked blocks are no longer inserted with this PR applied.

I've also tested against all of the themes in the $theme_include_list and the hooked blocks are inserted, as expected.

Based on this, I am approving the PR.

That being said, I noticed that in Amulet and Tazza, the positioning of the inserted blocks is a bit wonky (see screenshots below). This appears to mainly concern the My Account block, as opposed to the Mini-Cart so it seems best to create an issue and address that separately. But I wanted to note here, as I discovered it in testing for this PR.

Amulet:
CleanShot 2024-04-25 at 15 50 02

Tazza:
CleanShot 2024-04-25 at 15 50 41

Missing @SInCE version throwing a CI check error:

`A "@SInCE" tag was found but no version declared.`

Adding `8.4.0`, as this was the version referenced before the revert.
@danielwrobert danielwrobert merged commit ed430bd into trunk Apr 26, 2024
43 checks passed
@danielwrobert danielwrobert deleted the revert/hooked_blocks_on_all_block_themes branch April 26, 2024 02:33
@github-actions github-actions bot added this to the 9.0.0 milestone Apr 26, 2024
@github-actions github-actions bot added the needs: analysis Indicates if the PR requires a PR testing scrub session. label Apr 26, 2024
@danielwrobert danielwrobert removed this from the 9.0.0 milestone Apr 26, 2024
@alvarothomas alvarothomas added this to the 8.8.0 milestone Apr 26, 2024
@danielwrobert danielwrobert restored the revert/hooked_blocks_on_all_block_themes branch April 26, 2024 17:40
@danielwrobert danielwrobert deleted the revert/hooked_blocks_on_all_block_themes branch April 26, 2024 17:49
danielwrobert added a commit that referenced this pull request Apr 26, 2024
)

* Revert opening up hooked blocks to all block themes.

* Add changefile(s) from automation for the following project(s): woocommerce

* Add version to @SInCE tag in fn comment.

Missing @SInCE version throwing a CI check error:

`A "@SInCE" tag was found but no version declared.`

Adding `8.4.0`, as this was the version referenced before the revert.

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Daniel W. Robert <danielwrobert@gmail.com>
rodelgc added a commit that referenced this pull request Apr 27, 2024
…se (#46983)

* Block Hooks: Revert opening up hooked blocks to all block themes (#46935)

* Revert opening up hooked blocks to all block themes.

* Add changefile(s) from automation for the following project(s): woocommerce

* Add version to @SInCE tag in fn comment.

Missing @SInCE version throwing a CI check error:

`A "@SInCE" tag was found but no version declared.`

Adding `8.4.0`, as this was the version referenced before the revert.

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Daniel W. Robert <danielwrobert@gmail.com>

* Transfer changelog entry to readme.txt

---------

Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Rodel Calasagsag <od.rodel.calasagsag@gmail.com>
samueljseay pushed a commit that referenced this pull request Apr 29, 2024
)

* Revert opening up hooked blocks to all block themes.

* Add changefile(s) from automation for the following project(s): woocommerce

* Add version to @SInCE tag in fn comment.

Missing @SInCE version throwing a CI check error:

`A "@SInCE" tag was found but no version declared.`

Adding `8.4.0`, as this was the version referenced before the revert.

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Daniel W. Robert <danielwrobert@gmail.com>
@rodelgc rodelgc added needs: external testing Indicates if the PR requires further testing conducted by testers external to the development team. status: analysis complete Indicates if a PR has been analysed by Solaris needs: internal testing Indicates if the PR requires further testing conducted by Solaris and removed needs: analysis Indicates if the PR requires a PR testing scrub session. needs: internal testing Indicates if the PR requires further testing conducted by Solaris labels Apr 29, 2024
@nigeljamesstevenson nigeljamesstevenson modified the milestones: 8.8.0, 8.9.0 May 1, 2024
github-actions bot pushed a commit that referenced this pull request May 1, 2024
)

* Revert opening up hooked blocks to all block themes.

* Add changefile(s) from automation for the following project(s): woocommerce

* Add version to @SInCE tag in fn comment.

Missing @SInCE version throwing a CI check error:

`A "@SInCE" tag was found but no version declared.`

Adding `8.4.0`, as this was the version referenced before the revert.

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Daniel W. Robert <danielwrobert@gmail.com>
nigeljamesstevenson pushed a commit that referenced this pull request May 1, 2024
* Block Hooks: Revert opening up hooked blocks to all block themes (#46935)

* Revert opening up hooked blocks to all block themes.

* Add changefile(s) from automation for the following project(s): woocommerce

* Add version to @SInCE tag in fn comment.

Missing @SInCE version throwing a CI check error:

`A "@SInCE" tag was found but no version declared.`

Adding `8.4.0`, as this was the version referenced before the revert.

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Daniel W. Robert <danielwrobert@gmail.com>

* Prep for cherry pick 46935

---------

Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Daniel W. Robert <danielwrobert@gmail.com>
Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
block: customer account Issues related to the Customer account block. block: mini-cart Issues related to the Mini-Cart block. focus: blocks needs: external testing Indicates if the PR requires further testing conducted by testers external to the development team. plugin: woocommerce Issues related to the WooCommerce Core plugin. status: analysis complete Indicates if a PR has been analysed by Solaris team: Kirigami & Origami
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants