Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Release: 2.6.0 #2554

Closed
wants to merge 13 commits into from
Closed

Release: 2.6.0 #2554

wants to merge 13 commits into from

Conversation

nerrad
Copy link
Contributor

@nerrad nerrad commented May 25, 2020

This is the release pull request for v2.6.0 of the WooCommerce Blocks plugin.

NOTE: This release should not be added to WooCommerce core because we don't have gating implemented for Cart & Checkout blocks yet (should be implemented in 2.7.0).

Communication

  • What is being introduced in this release?
  • This release introduces Cart and Checkout blocks for increased visibility and wider testing as a part of the consideration of eventually introducing these blocks to WooCommerce core.
  • There are a number of improvements to existing blocks as noted in the changelog.
  • The Store REST API has been refactored with new routes added. As well all older endpoints were migrated to use the new routes on the Store routes. None of these REST API endpoints are considered public and thus there is no related versioning. Notably, we also introduced a new X-WC-Store-API-Nonce header (and nonce!) to our store endpoints that adds CSRF protection. This is particularly important for Cart and Checkout related write requests for a session.
  • Introduction of a new status for orders ("draft"). (Introduced in this pull)

Note: For folks that have been testing the beta and release versions of the cart and checkout blocks, it's possible that they could experience this reported issue for the new orders list table in the WC-Admin. If this happens, the only way to fix currently is to manually delete orders in the wc_order_stats table that don't have corresponding orders in the wp_posts table by executing this query (note if this is a db you care about, as a safety precaution you will want to backup first):

DELETE stats FROM wp_wc_order_stats stats LEFT JOIN wp_posts posts ON stats.order_id = posts.ID WHERE posts.ID IS NULL;

The above query assumes wp_ is the prefix for tables in the db - change that to whatever the prefix is if it's different. You can also replace DELETE stats with SELECT stats.* if you want to see what would be affected first.

  • If this release has potentially high customer impact, is a blog post (section) ready? Provide a link if applicable.

Impacts for this release on merchants

  • Cart and Checkout blocks - blog post is ready. Note: with the plugin release we are positioning this as a "preview" of the Cart and Checkout blocks for folks to experiment with. They are still being evaluated for potential inclusion to core.
  • Release post for develop.woocommerce.com is written.
  • All Products (and related filter blocks): A number of changes were made to the underlying logic and code being used. The impact is on ensuring existing implementations of the blocks still work after upgrading.
  • HTML editing is no longer supported in several blocks. This means that any merchants that have blocks with edited HTML will "still work" but they will no longer be able to re-edit.
  • Product categories block now supports category images.
  • Wrote a post for Woo Happiness team as well.

Blocks with a changeset

Besides the above notables, here's a list of other blocks that are impacted by changes in this release.

  • Product Search
  • Featured Product
  • All "Product Grid type blocks", that includes Handpicked Products, Product Best Sellers, Product Category, Product New, Product On Sale, Products by Attribute, Product Tag, Product Top Rated. Note: Product Grid blocks now default to a default of 3 rows (instead of one) for the initial setting. This means for SSR blocks, existing blocks rows will change to 3 unless the user has already changed them away from 1. More details in this pull.
  • Is the relevant developer documentation updated? Please provide links if applicable.

Quality

  • Have you written tests to cover the changes?
    • Unit tests
    • E2E tests
    • for each supported WordPress and WooCommerce core versions.

Note: Our automated test coverage is still being improved.

  • The REST API Store routes have full coverage on the routes.
  • There is very little automated test coverage of Cart and Checkout blocks.
  • There is limited coverage of other blocks.

What this means practically is that a lot of heavy lifting is being done by manual testing for now.

  • Have you tested on the applicable platforms?
    • mobile
    • desktop
  • Does this release affect API's and conform to API versioning policy?

Current REST API is internal only. The public API surface for integrations etc has not changed. The public API surface for payment method integrations is still subject to change.

  • Have you considered the impact of the changes in the release on other extensions and backward compatibility?

    • Does the release change the signature of any public methods or functions?
    • Are filters or hooks affected by the PR code changes?
  • Does the release include a changelog entry in the readme.txt?

  • Please provide a link to testing instructions for this release. See here

  • Have you reviewed impacts to performance (bundle sizes, query time etc)?

Note: As noted by @senadir here, there is some impact to bundle sizes for frontend js built for the All Products and Filter blocks. We are aware of this impact which is caused by some dependencies pulling in DashIcons and have a potential fix that is not ready for this release. The target is 2.7.0 for having this fixed so that when the feature plugin is updated in WooCommerce core this impact is not included there.

@nerrad nerrad requested a review from a team as a code owner May 25, 2020 15:17
@nerrad nerrad requested review from Aljullu and removed request for a team May 25, 2020 15:17
@nerrad nerrad self-assigned this May 25, 2020
@nerrad nerrad added this to the 2.6.0 milestone May 25, 2020
@github-actions
Copy link
Contributor

github-actions bot commented May 25, 2020

Size Change: +64.3 kB (3%)

Total Size: 2.06 MB

Filename Size Change
build/active-filters-frontend.js 7.25 kB +25 B (0%)
build/active-filters.js 7.89 kB +3 B (0%)
build/all-products-frontend.js 71.9 kB +157 B (0%)
build/all-products.js 19.2 kB +2 B (0%)
build/all-reviews-legacy.js 10.3 kB +1 B
build/all-reviews.js 10.6 kB +4 B (0%)
build/attribute-filter-frontend.js 16.7 kB +37 B (0%)
build/attribute-filter.js 11.5 kB -1 B
build/block-error-boundary.js 774 B -1 B
build/blocks.js 2.92 kB -3 B (0%)
build/cart-frontend.js 113 kB +283 B (0%)
build/cart.js 32.3 kB +114 B (0%)
build/checkout-frontend.js 129 kB -10 B (0%)
build/checkout.js 37.8 kB +8 B (0%)
build/featured-category-legacy.js 146 kB -1 B
build/featured-category.js 146 kB -2 B (0%)
build/featured-product.js 9.81 kB +2 B (0%)
build/handpicked-products-legacy.js 6.88 kB +1 B
build/handpicked-products.js 7.15 kB -9 B (0%)
build/panel-style.js 773 B -1 B
build/price-filter-frontend.js 14.1 kB +320 B (2%)
build/price-filter.js 9.97 kB +4 B (0%)
build/product-best-sellers-legacy.js 6.96 kB -1 B
build/product-best-sellers.js 7.22 kB -6 B (0%)
build/product-categories.js 3.21 kB +5 B (0%)
build/product-category-legacy.js 7.87 kB -1 B
build/product-category.js 8.14 kB -3 B (0%)
build/product-new-legacy.js 7.11 kB -1 B
build/product-new.js 7.39 kB -5 B (0%)
build/product-on-sale-legacy.js 7.49 kB +1 B
build/product-on-sale.js 7.79 kB -9 B (0%)
build/product-search.js 3.36 kB +1 B
build/product-tag-legacy.js 6.08 kB +2 B (0%)
build/product-tag.js 6.33 kB -6 B (0%)
build/product-top-rated-legacy.js 7.09 kB -2 B (0%)
build/product-top-rated.js 7.36 kB -6 B (0%)
build/products-by-attribute-legacy.js 7.85 kB +1 B
build/products-by-attribute.js 8.11 kB -7 B (0%)
build/reviews-by-category-legacy.js 12.3 kB -1 B
build/reviews-by-category.js 12.7 kB -3 B (0%)
build/reviews-by-product-legacy.js 13.8 kB +1 B
build/reviews-by-product.js 14.2 kB +1 B
build/reviews-frontend-legacy.js 8.03 kB +37 B (0%)
build/reviews-frontend.js 8.95 kB +143 B (1%)
build/snackbar-notice-style.js 778 B -1 B
build/style-rtl.css 16.6 kB +11 B (0%)
build/style.css 16.6 kB +11 B (0%)
build/vendors-legacy.js 376 kB +60 B (0%)
build/vendors.js 474 kB +55 B (0%)
build/single-product-frontend.js 58.9 kB +58.9 kB (100%) 🆘
build/single-product.js 4.17 kB +4.17 kB (100%) 🆘
ℹ️ View Unchanged
Filename Size Change
build/block-error-boundary-legacy.js 774 B 0 B
build/blocks-legacy.js 2.92 kB 0 B
build/custom-select-control-style-legacy.js 782 B 0 B
build/custom-select-control-style.js 782 B 0 B
build/editor-legacy-rtl.css 12.5 kB 0 B
build/editor-legacy.css 12.6 kB 0 B
build/editor-rtl.css 13.5 kB 0 B
build/editor.css 13.5 kB 0 B
build/featured-product-legacy.js 9.49 kB 0 B
build/panel-style-legacy.js 773 B 0 B
build/product-categories-legacy.js 3.22 kB 0 B
build/product-list-style-legacy.js 775 B 0 B
build/product-search-legacy.js 3.12 kB 0 B
build/snackbar-notice-style-legacy.js 778 B 0 B
build/spinner-style-legacy.js 775 B 0 B
build/spinner-style.js 771 B 0 B
build/style-legacy-rtl.css 5.62 kB 0 B
build/style-legacy.css 5.63 kB 0 B
build/vendors-style-legacy-rtl.css 1.65 kB 0 B
build/vendors-style-legacy.css 1.65 kB 0 B
build/vendors-style-legacy.js 105 B 0 B
build/vendors-style-rtl.css 1.65 kB 0 B
build/vendors-style.css 1.65 kB 0 B
build/vendors-style.js 105 B 0 B
build/wc-blocks-data.js 7.08 kB 0 B
build/wc-blocks-middleware.js 931 B 0 B
build/wc-blocks-registry.js 1.79 kB 0 B
build/wc-payment-method-cheque.js 794 B 0 B
build/wc-payment-method-paypal.js 830 B 0 B
build/wc-payment-method-stripe.js 11.9 kB 0 B
build/wc-settings.js 2.14 kB 0 B

compressed-size-action

readme.txt Outdated Show resolved Hide resolved
readme.txt Outdated Show resolved Hide resolved
Co-authored-by: Albert Juhé Lluveras <[email protected]>
@senadir
Copy link
Member

senadir commented May 25, 2020

This is the result of the bundle change of files from the latest 2.5 release to master, this only includes *-frontend.js files

Bundle release/2.5 master Diff
active-filters-frontend.js 5.27KB 7.09KB 1.81KB
all-products-frontend.js 14.37KB 70.12KB 55.75KB
attribute-filter-frontend.js 6.68KB 16.31KB 9.63KB
price-filter-frontend.js 7.1KB 13.53KB 6.43KB
reviews-frontend.js 7.53KB 8.63KB 1.1KB

This is a full list of all files that existed or didn't exist.

All Files
Bundle Release 2 5 Master Diff
vendors.js 292.92KB 462.44KB 171.21KB
vendors-legacy.js 287.36KB 366.89KB 81.03KB
checkout-frontend.js 0B 126.21KB 126.21KB
cart-frontend.js 0B 110.22KB 110.22KB
all-products-frontend.js 14.37KB 70.12KB 55.75KB
featured-product.js 56.81KB 9.6KB -47.21KB
featured-product-legacy.js 56.38KB 9.3KB -47.08KB
all-products.js 63.07KB 18.73KB -44.34KB
checkout.js 0B 36.98KB 36.98KB
cart.js 0B 31.42KB 31.42KB
wc-payment-method-stripe.js 0B 11.66KB 11.66KB
attribute-filter-frontend.js 6.68KB 16.31KB 9.63KB
price-filter-frontend.js 7.1KB 13.53KB 6.43KB
wc-blocks-data.js 3.87KB 6.95KB 3.08KB
attribute-filter.js 8.19KB 11.21KB 3.02KB
active-filters-frontend.js 5.27KB 7.09KB 1.81KB
active-filters.js 5.93KB 7.73KB 1.8KB
price-filter.js 8.13KB 9.76KB 1.63KB
product-top-rated.js 5.78KB 7.22KB 1.44KB
products-by-attribute.js 6.62KB 7.95KB 1.33KB
product-best-sellers.js 5.78KB 7.09KB 1.31KB
product-new.js 5.96KB 7.25KB 1.29KB
product-category.js 6.7KB 7.98KB 1.28KB
product-on-sale.js 6.4KB 7.64KB 1.24KB
handpicked-products.js 5.79KB 7.02KB 1.22KB
product-top-rated-legacy.js 5.76KB 6.95KB 1.2KB
products-by-attribute-legacy.js 6.6KB 7.7KB 1.1KB
reviews-frontend.js 7.53KB 8.63KB 1.1KB
product-best-sellers-legacy.js 5.76KB 6.83KB 1.07KB
product-category-legacy.js 6.68KB 7.72KB 1.04KB
product-new-legacy.js 5.95KB 6.98KB 1.04KB

@nerrad
Copy link
Contributor Author

nerrad commented May 25, 2020

Follow-up tasks for after the release is tagged and published to wp.org

  • Publish Cart and Checkout blocks post (and then add link to this pull description).
  • Publish 2.6.0 release post including various DEV notes (and then add link to this pull description).
  • Publish a post for Woo Happiness engineers highlighting changes in this release.
  • Copy testing notes done for this release into docs/testing as a reference for future releases.
  • Cherry pick in changes to the package-plugin script (it now deletes any existing zip file before doing the build).
  • Update release docs with changes I noticed while doing this (including the new process for a release pull request etc).
  • Update readme.txt in master and bump the version manually to 2.7.0-dev

@nerrad
Copy link
Contributor Author

nerrad commented May 25, 2020

Testing Notes and ZIP for testing

Zip File for testing:
woocommerce-gutenberg-products-block.zip

Cart and Checkout Blocks

See testing notes here

All Products

  • All of these tests should be done in Safari, Chrome, and Firefox (latest version).
  • Also validate the behaviour of the block in mobile views vs desktop.
  • Verify the block can be added to a new page.
  • Verify only one instance of the block can be added to a page/post.
  • Verify the various settings and configuration for the block in the editor works as expected for the given UI.
  • Verify the block functions as expected for the given configuration on the frontend of the site.
  • For an instance of this block setup on a post in an earlier release, verify that upgrading to this release doesn't break the block functionality in the frontend or in the editor.

Specific changes to test for in this release.

  • When editing the All Products block, verify that when you change the default sorting options in the inspector controls for the block that the corresponding filter dropdown in the block preview updates as expected (see highlighted areas below):

example affected areas

  • Verify that an error notice is shown in the All Products block if you try to add a product to the cart (using the Add to Cart button) if the product is out of stock or is sold individually and there is already an instance of that product in the cart.

Filter blocks

These blocks are used in tandem with the All Products block to provide filtering options on the content rendered by the All Products block. They include:

  • Filter Products By Attribute
  • Filter Products By Price
  • Active Product Filters

These blocks can be tested by adding them to the same page as the All Products block as the selected values in these blocks affects the products displayed by the All Products block.

  • General testing involves setting up the filter blocks and verifying the the various configurations for the blocks work as expected in the editor (for settings) and the frontend (according to how the block was configured). Validate that when various filters are applied the expected results are shown in the All Products block.

Specific changes to test for in this release.

Testing the price filter block with various settings around taxes and prices

One fix in this release for this block is that when the price display setting (including or excluding tax) for WooCommerce differs from the price entered setting (prices input including or excluding tax), the displayed prices for filtered results from the entered Price Filter block might appear to be a mismatch (when it's querying based on the prices saved to the database). With this release, this is fixed so that no matter how WooCommerce is configured for displaying or saving prices respective to taxes, the displayed products will have prices matching the expected range set via the price filter block.

To test:

  • In WooCommerce > Settings > Taxes, choose to enter prices inclusive of tax, but display prices excluding tax. Test that filters work as expected for the blocks.
  • In WooCommerce > Settings > Taxes, choose to enter prices exclusive of tax, but display prices including tax. Test that filters work on products.

And/Or labelling in Active Filters block

  • Setup various filter blocks so that some are set to any type filtering and others are set to all type filtering.
  • Add the Active Filters block to the same post/page.
  • Verify that when you apply filters on the frontend, the Active Filter block updates it's text to match the type of filtering being done.

Dropdown display style to Attribute Filter block

This release introduces a dropdown display style for the Filter Products by Attributes block (for both AND and OR type queries). Expected result:

dropdown display style

To test:

  • Create a post with a Filter Products by Attribute block and select the Dropdown option in Display style settings.
  • Preview the post and interact with the filter (search terms, add them, remove them, repeat only using the keyboard, using a screen-reader etc).
  • Verify everything works as expected for the ui/ux behaviour and for the returned results in the All Products block.
  • This should work for either "and" or "or" filtering.

**Add option to display an "apply filter button" for the Filter Products by Attribute block

  • Create a post with an Filter Products by Attribute block and All products block
  • For the Filter Products by Attribute block, enable the Filter Button option.
  • Preview the post and verify selecting/unselecting options doesn't update the All Products block until you press the Go button.

All Product Grid based blocks

All of these blocks share a common ancestor for the PHP side registration, so it's good to test them together. These blocks include:

  • Top Rated Products
  • Best Selling Products
  • On Sale Products
  • Products By Attribute
  • Hand-Picked Products
  • Products by Category
  • Products by Tag
  • Newest Products

Specific changes to test for in these blocks for this release:

  • Verify that if there are no products on sale, the On Sale Products block shows this placeholder in the editor:

On Sale Products placeholder

  • For any of the product grid blocks, verify that when a fresh instance of the block is added to the editor, it defaults to 3 rows and 3 columns for the grid.
  • Verify that changing any of the values for the grid "sticks" and persists across saves. Also verify it shows as expected and configured on the frontend.
  • For any of the product grid blocks, for an instance of the block setup on a post in an earlier release with no changes to it's settings, verify that upgrading to this release doesn't break the block functionality in the frontend or in the editor (However note that the grid will change from the default of 1 in the earlier release to 3 in the recent release automatically).
  • Same test as above, except in the earlier release, change the grid to something other than 1 row and save. When upgrading to the new release the setting for the grid should have persisted with the block.

Other blocks

There are a number of other specific focuses for testing for changes in this release for other blocks:

Featured Product Block

In this fix, when a product is changed for an existing featured product block, the link in the button updates to the page for the new product. Note, if there is a custom url applied when the product is changed, this will be replaced by the url to the product (that's expected).

To test:

  • Verify any existing instance of this block in a previous release does not show any errors in the editor when updating to this release.
  • Verify that if you edit the block and change the product it uses, the button url will update as well.

Product Categories Block

Support was added for showing category images in the Product Categories block. The following expectations:

  • For the "List" display style the toggle option for showing category images is available (and is disabled by default).
  • This option is not available for the "Dropdown" display style.
  • When the option is toggled to "Show Category Image", images for categories are shown per category item in the list.
  • Verify the new option works as expected according to the above both in the editor and in the frontend.

Copy link
Member

@haszari haszari left a comment

Choose a reason for hiding this comment

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

Tested and didn't see any show stoppers or regressions. I followed the testing instructions and mostly tested in Safari and Firefox. I used an ephemeral site, set up the page content using Woo core 4.1.1, then upgraded to Woo blocks 2.6.0 rc1 (and deactivated plugin to test various upgrade / downgrade scenarios).

I noticed one issue, though this might not be a problem. With the Filter by Attribute block, the new Dropdown mode is available for both Query Types (Or and And). It works correctly, so this seems fine to me. (Testing instructions said it should only be available for Or.)

Screen Shot 2020-05-26 at 4 31 27 PM

Screen Shot 2020-05-26 at 4 31 50 PM

Also saw one other issue not introduced in this release, haven't logged an issue for it yet. With All Products, on mobile, with sale products, the sale badge is 100% width sometimes:

Screen Shot 2020-05-26 at 3 42 59 PM

Copy link
Contributor

@Aljullu Aljullu left a comment

Choose a reason for hiding this comment

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

I did another round of testing and couldn't spot anything. I opened some new issues: #2558, #2559, #2560 and #2561, but I don't think they should block release.

* Revert "Fix Products by Category JSON response error (#2551)"

This reverts commit 4ba1bbd.

* Fix Products by Category JSON response error
@nerrad
Copy link
Contributor Author

nerrad commented May 26, 2020

I noticed one issue, though this might not be a problem. With the Filter by Attribute block, the new Dropdown mode is available for both Query Types (Or and And). It works correctly, so this seems fine to me. (Testing instructions said it should only be available for Or.)

@Aljullu can you comment on this. Was there a follow-up pull that enabled support for "And" that got missed in the changelog or is it something already available in the 2.5 release branch?

@Aljullu
Copy link
Contributor

Aljullu commented May 26, 2020

@nerrad correct, the dropdown for AND query type was introduced in #1309. It has the skip-changelog label, probably that's why it was missed.

So I think we need to update the testing instructions so both modes are tested.

mikejolley and others added 5 commits May 27, 2020 10:09
@nerrad
Copy link
Contributor Author

nerrad commented Jun 1, 2020

2.6.0 is released and follow-ups around documenting changes in process are handled in this pull.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants