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

Add "Filter Products by Stock" block #4145

Merged
merged 19 commits into from Aug 20, 2021
Merged

Conversation

grogou
Copy link
Contributor

@grogou grogou commented Apr 28, 2021

This PR introduces a new block: "Filter Products by Stock". When this is used in conjunction with the All Products block, shoppers will be able to filter out products by different stock levels. This block supports custom stock levels too.

Fixes #4096

Accessibility

Screenshots

image
image

How to test the changes in this Pull Request:

  1. Add 'Filter Products by Stock", "All Products" and "Active Filters" blocks to a page.
  2. Ensure Hide out of stock products from catalogue is disabled in WooCommerce > Settings > Products > Inventory
  3. Set the stock status of some products to out of stock, some to on backorder.
  4. Go to the page on the front end and verify that you can filter products by the three different stock levels.
  5. For any product that is out of stock change it back to in stock. All products should now either be on backorder or in stock.
  6. Reload the page and ensure the option to filter out of stock products is not there.
  7. Set some products back to being out of stock.
  8. Change the Hide out of stock products from catalogue to enabled in WooCommerce > Settings > Products > Inventory
  9. Reload the page and ensure the option to filter out of stock products is not there.
  10. Add the Filter Products by Price and Filter Products by Attribute block to the page.
  11. Verify that the filters work together and the correct products are shown in the All Products block.

Changelog

Added "Filter Products by Stock" block

@grogou grogou requested a review from a team as a code owner April 28, 2021 12:31
@grogou grogou requested review from ralucaStan and removed request for a team April 28, 2021 12:31
@senadir
Copy link
Member

senadir commented Apr 28, 2021

👋🏼 I will (along side others) review your PR to help you get it merged.

It seems you're running npm 7+ which caused the package-lock.json to be updated, can you downgrade to npm 6 (which ever is installed with node 14), delete package-lock.json and run npm install again.
Another option is not commit the lock file at all since your PR isn't installing any new dependencies.

@grogou
Copy link
Contributor Author

grogou commented Apr 28, 2021

Done!

@ralucaStan ralucaStan requested review from senadir and removed request for ralucaStan April 30, 2021 09:45
@grogou grogou force-pushed the add/stock-filter branch 3 times, most recently from 1ee393a to 92a0da3 Compare June 2, 2021 07:49
@grogou
Copy link
Contributor Author

grogou commented Jun 2, 2021

@senadir we are pulled new changes from trunk and fixed conflicts for stock filter.

@senadir
Copy link
Member

senadir commented Jun 8, 2021

Hey @grogou, sorry for taking so long to come back at you on this PR. I did start a review on this, functionally, everything seems to work fine. Code wise, I didn't finish my review yet (about 70% left). I'm moving slowly due to other higher priority tasks and the fact that this part of codebase hasn't been touched for the past two years, so I need to brush up on my knowledge of it.

Copy link
Contributor

@opr opr left a comment

Choose a reason for hiding this comment

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

Thanks for making this PR @grogou 👏🏼! Really great work.

In terms of functionality, it works really well for the most part, but I have noticed an issue relating to UX. At the moment, when adding this block to a page while the option: Hide out of stock items from the catalog is true, then the instock and onbackorder stock statuses are selected, and it's impossible to unselect them both. This looks like it's caused by this block - I understand this is just a refactor of something that was added in #3859 so I'm not blaming you for this 😁

I'll raise this with the team, and see if there is a potential workaround, however, to manage your expectations: given that our team has a lot of other high-priority work on right now I can't promise a time that we will get back to you on this, sorry.

I also think you're going to be opening another PR for a Filter by category block, right? If so, then I think my suggestion of generalising the AttributeFilterLabel and StockFilterLabel components should be considered even more strongly.

Thanks again for creating this PR! 🙌🏼

assets/js/base/components/product-list/product-list.js Outdated Show resolved Hide resolved
Comment on lines 28 to 30
if ( hideOutOfStockItems ) {
delete STOCK_STATUS_OPTIONS.outofstock;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems to be working OK, it doesn't actually affect anything except what gets rendered as a selectable option, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Related to this #4145 (comment) suggestion.

assets/js/base/components/product-list/product-list.js Outdated Show resolved Hide resolved
assets/js/base/components/product-list/product-list.js Outdated Show resolved Hide resolved
assets/js/blocks/stock-filter/block.js Outdated Show resolved Hide resolved
assets/js/blocks/stock-filter/block.js Outdated Show resolved Hide resolved
assets/js/blocks/stock-filter/edit.js Outdated Show resolved Hide resolved
assets/js/blocks/stock-filter/label.js Outdated Show resolved Hide resolved
src/StoreApi/Schemas/ProductCollectionDataSchema.php Outdated Show resolved Hide resolved
@grogou grogou requested review from opr and nerrad July 14, 2021 16:05
opr added a commit that referenced this pull request Aug 20, 2021
commit 4fccfd8
Merge: 8012b2b e7bd0e6
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Fri Aug 20 13:17:42 2021 +0000

    Merge from trunk

commit 8012b2b
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Fri Aug 20 16:53:56 2021 +0400

    Escape statuses for sql query

    Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

commit 304348a
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Fri Aug 20 16:53:18 2021 +0400

    Allow custom stock statuses

    Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

commit b2f01e4
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Wed Jul 28 06:22:04 2021 +0000

    Bring back removed css

commit caafffd
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Tue Jul 27 23:35:15 2021 +0400

    Update assets/js/blocks/stock-filter/block.js

    Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

commit ae381de
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Thu Jul 15 06:50:06 2021 +0000

    Fixed preview part for stock and attribute filters

commit 7df5fea
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Wed Jul 14 20:15:05 2021 +0400

    Update index.js

commit af0294c
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Wed Jul 14 15:43:06 2021 +0000

    Review suggestion changes

commit 16da253
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Wed Jul 14 15:40:52 2021 +0000

    Linter fix

commit 594125a
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Wed Jul 14 15:37:41 2021 +0000

    Removed hideOutOfStock from AllProducts and realized hide out of stock functionality from SQL query

commit 94a54e3
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Wed Jul 14 15:21:51 2021 +0000

    Created new component for Filters elements labels

commit e3d7fb2
Author: aaron <aaron.yor@gmail.com>
Date:   Wed Jun 2 11:57:06 2021 +0400

    Fix label includ path

commit c9e3d02
Author: Seghir Nadir <nadir.seghir@gmail.com>
Date:   Tue Jun 1 09:46:02 2021 +0100

    remove usage of mustBeString (#4294)

commit b892339
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon May 31 16:07:59 2021 +0100

    Lock file maintenance (#4290)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 6de68e4
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Thu May 27 12:57:49 2021 +0100

    Check if product can be added to cart before adding ajax class to button (#4265)

commit a1ccaf4
Author: Thomas Roberts <thomas.roberts@automattic.com>
Date:   Wed May 26 16:10:43 2021 +0100

    Update version for next release

commit 24f882f
Author: Thomas Roberts <thomas.roberts@automattic.com>
Date:   Wed May 26 15:42:21 2021 +0100

    Bumping version strings to new version.

commit e1fd082
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Wed May 26 15:31:37 2021 +0100

    Update link to testing zip

commit 35521e5
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Wed May 26 14:04:42 2021 +0100

    Fix display of itemised taxes (#4279)

    * Add price to itemised tax rates & hide Total when itemised taxes are on

    * Update snapshots for taxes in sidebar

commit 7f3a1e6
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 26 08:52:31 2021 +0000

    Update dependency downshift to v6.1.3 (#4272)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 593ef2b
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 26 05:04:55 2021 +0000

    Update dependency @types/react to v16.14.8 (#4270)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 21f16d6
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 26 03:47:54 2021 +0000

    Update dependency @woocommerce/e2e-utils to v0.1.5 (#4271)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 444256e
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 26 02:30:17 2021 +0000

    Update dependency @types/lodash to v4.14.170 (#4269)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 5f9df57
Author: Thomas Roberts <thomas.roberts@automattic.com>
Date:   Tue May 25 15:31:03 2021 +0100

    Create 5.2.0 testing notes

commit 45abda6
Author: Thomas Roberts <thomas.roberts@automattic.com>
Date:   Tue May 25 14:52:37 2021 +0100

    Update package.json

    npm ci was not working correctly this will fix it.

commit c3daa6c
Author: Thomas Roberts <thomas.roberts@automattic.com>
Date:   Tue May 25 14:26:32 2021 +0100

    Update changelog and WC tested up to

commit 6128309
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Thu May 20 17:56:56 2021 +0100

    Revert "Move `TextInput` to checkout package and allow it to be used for input type=number (#4238)"

    This reverts commit 15c1779.

commit 193267b
Author: Mike Jolley <mike.jolley@me.com>
Date:   Tue May 25 12:49:13 2021 +0100

    Add key to each `CartTotalItem` (#4240)

    * Move type defs

    * Move type guards

    * Fix imports

    * Extract prepareTotalItems to TS file

    * usePaymentMethodInterface as TS file

    * Fix TS props

    * Fix currency type defs

    * Add return type to usePaymentMethodInterface

    * Add key prop to CartTotalItem

    * Fixed up js tests

    * Move SymbolPosition into type-defs package

    Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>

commit c15e512
Author: Seghir Nadir <nadir.seghir@gmail.com>
Date:   Tue May 25 10:46:28 2021 +0100

    Fix duplicate plugins by using wp.components global in the editor. (#4211)

    * fix duplicate slotProvider

    * load file on demand

    * add comment and load components in blocks as well

    * add todo block

commit e2cf0ba
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Tue May 25 08:43:46 2021 +0100

    Hide "including X in taxes" when the amount of tax is 0 (#4262)

    * Hide "including x in taxes" if tax amount is 0

    * Add jest types to tsconfig

    * Move SHOW_TAXES into component body

    This is to make the code more testable and allows us to change values. There's no significant performance impact because of this change.

    * Add tests and snapshots for TotalsFooterItem

commit 9b44c88
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon May 24 18:14:37 2021 +0100

    Update dependency @octokit/graphql to v4.6.2 (#4230)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 4973132
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon May 24 16:40:05 2021 +0100

    Lock file maintenance (#4253)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit b7eabf5
Author: Michael P. Pfeiffer <frontdevde@users.noreply.github.com>
Date:   Fri May 21 09:53:46 2021 +0200

    Block Widgets: hide legacy widgets with a feature-complete block equivalent (#4237)

    * Block Widgets: hide legacy widgets with block equivalent

    * Unhide Products and Products by Rating widgets

commit 47556b9
Author: Michael P. Pfeiffer <frontdevde@users.noreply.github.com>
Date:   Fri May 21 09:52:27 2021 +0200

    Block Widgets: hide All Products and Filter blocks in the Customizer (#4225)

commit 208b212
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Thu May 20 17:56:56 2021 +0100

    Move `TextInput` to checkout package and allow it to be used for input type=number (#4238)

    * Move text-input to checkout package

    * Pass validation props directly to ValidatedTextInput

    * Import label relatively instead of from package

    * Pass validation functions to ValidatedTextInput

    This is so it doesn't need to get them from useValidationContext.

    * Add InputProps to ValidatedTextInput

    This will be used to control additional props on the input element of TextInput

    * Spread inputProps onto <input> element of TextInput

    * Export TextInput from @woocommerce/blocks-checkout

    * Add @woocommerce/blocks-checkout package to tsconfig

    * Allow styling to be applied to number inputs and when value is 0

    * Make style order consistent

    * Remove inputProps to rely on rest in TextInput

    * Add specific prop for the inputErrorComponent

    * Only disallow active state if value is 0 AND type is number

    * Change all uses of ValidatedTextInput to also pass inputErrorComponent

    * Revert "Change all uses of ValidatedTextInput to also pass inputErrorComponent"

    This reverts commit ec734b9.

    * Revert "Remove inputProps to rely on rest in TextInput"

    This reverts commit 1fc64cc.

    * Revert "Revert "Change all uses of ValidatedTextInput to also pass inputErrorComponent""

    This reverts commit 110e360.

    * Revert "Revert "Remove inputProps to rely on rest in TextInput""

    This reverts commit aeb0352.

    * Don't pass errorMessage to ValidatedTextInput

commit 55f5bfd
Author: Mike Jolley <mike.jolley@me.com>
Date:   Thu May 20 15:07:12 2021 +0100

    Create LICENSE (#4235)

commit 0b10f75
Author: Albert Juhé Lluveras <contact@albertjuhe.com>
Date:   Thu May 20 10:58:59 2021 +0200

    Update @woocommerce/components (#4100)

    * Add isCompact prop to components using SearchListControl

    * Update @woocommerce/components to 6.1.2

    * Remove legacy CSS code

    * Add some CSS rules to override conflicting editor styles

    * Replace showCount prop with has-count class name

    * Create ExpandableSearchListItem component

    * Refactor ProductControl so it uses ExpandableSearchListItem

    * Update @woocommerce/components to 6.2.0

    * Fix @woocommerce/components builds breaking

    * Fix a11y of expandable item list children

    * Set categories to an empty array by default

    * Render compact control in Attribute filter sidebar

    * Add countLabel to ProductAttributeTermControl

    * Fix ProductTagControl selected items

    * Use sentence case for countLabel

    * Fix wrong margins in block editor

    * Fix checkbox alignment

    * Update package-lock.json

    * Fix withCategories test

    * Fix JS error in Filter Products by Attribute block

    * Make input ids unique

commit 587be17
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Wed May 19 10:55:15 2021 +0100

    Convert TextInput and ValidatedTextInput to TypeScript (#4226)

    * Change index file from base/context to .ts

    This is to stop TS complaining when importing things from here.

    * Convert ValidatedTextInput to TypeScript

    * Convert TextInput to TypeScript

    * Ensure Label accepts correct HTML Attributes Props

    * Remove PropTypes from TextInput and ValidatedTextInput

    No longer needed because of TypeScript

    * Use correct error id to show validation message

    * Use HTMLElement instead of a specific element type for LabelProps

    * Update assets/js/base/components/text-input/validated-text-input.tsx

    Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>

    * Update assets/js/base/components/text-input/validated-text-input.tsx

    * Use correct formatting in ValidatedTextInput

    Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>

commit 731c75e
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 19 07:36:46 2021 +0000

    Update dependency @testing-library/react-hooks to v5.1.3 (#4233)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit ef6ad88
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 19 04:36:44 2021 +0000

    Update dependency @types/lodash to v4.14.169 (#4234)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 096463e
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 19 03:46:21 2021 +0000

    Update dependency @testing-library/react to v11.2.7 (#4232)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 8722839
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 19 02:48:45 2021 +0000

    Update dependency @stripe/react-stripe-js to v1.4.1 (#4231)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 2f7e8ed
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 19 01:32:34 2021 +0000

    Pin dependency @types/wordpress__deprecated to 2.4.2 (#4229)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 72e851a
Author: Raluca Stan <raluca.stan@automattic.com>
Date:   Tue May 18 15:09:30 2021 +0200

    Fix e2e checkout tests and adjust jest setup (#4216)

    * Fix checkout test
    - make tests independent & test also for empty cart case
    - make sure the Order summary is expanded with a better selector
    * Remove unnecessary localStorage operations from tests
    * Go to cart page before removing an item from cart
    * Remove logging observing before tests
    This removes unnecessary console.log interception. A big part of the logic was done for Puppeteer 1.6.1, but since 3.0.0 message.text() returns string. We allow console.error messages to surface in our tests. Although they don't cause the test to fail it might be a good addition for debugging purposes.

commit 7b7119c
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Tue May 18 11:27:27 2021 +0100

    Lock file maintenance (#4212)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 5f84e7d
Author: Mike Jolley <mike.jolley@me.com>
Date:   Tue May 18 10:37:31 2021 +0100

    Convert checkout state context provider to Typescript (#4200)

    * git move to ts files

    * Type the checkout state provider

    * Restore for loop for error handling

    * Types not needed

    * Consolodate response handling

    * Unused import

    * Fix defaults for onCheckoutAfterProcessingWithSuccess etc

    * Type useEmitResponse and remove isObject checks

    * useEmitResponse as const

    * Check that redirectUrl is string

    * Define actions as const

    * data.redirectUrl should be truthy

    * Add redirectURL todo item as followup

    * remove null fallback

commit fccc72b
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Tue May 18 09:10:31 2021 +0100

    Move Button and Label components to `@woocommerce/blocks-checkout` package (#4222)

    * Move Button to checkout package

    * Move Label to Components Package

commit 0b91fbe
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Mon May 17 15:00:57 2021 +0100

    Update design of cart and checkout sidebars (#4180)

    * Update cart/coupon/shipping design

    * Add order summary heading

    * Move and style discounts on checkout sidebar

    * Add rate to tax lines

    * Ensure the option to display taxes itemised is available to Cart block

    * Output individual tax items below the total & add styles for this

    * Add success notice under coupon input on successful coupon addition

    * Add border to bottom of Totals footer

    * Show success message when adding coupon

    * Add padding to cart item rows

    * Add preview data to cart for when taxes are enabled

    * Add rate to cart response type

    * Add showRateAfterTaxName attribute to Cart block

    * Add control to cart block to show rate percentage after rate name

    * Add rate % in cart totals only if option is toggled on

    * Pass showRateAfterTaxName attribute down to TotalsTaxes

    * Add showRateAfterTaxName to Checkout block

    * Add control to block editor for showRateAfterTaxName on Checkout

    * Pass showRateAfterTaxName down to TotalsTaxes in Checkout

    * Change label for showing tax rates in cart and checkout blocks

    * Add test to ensure Taxes section shows in Cart block

    * Add tests for cart sidebar and rate percentages

    * Remove order summary title from checkout sidebar

    * Check if taxes are enabled before rendering the option to show rate %s

    * Add ShippingVia component to show the selected rate in sidebar

    * Remove value from individual tax rates

    * Remove bold from Shipping via label

    * Remove coupon added successfully message

    * Ensure panel headings that are h2s are the same colour as others

    * Clean up eslint warnings

    * Show rate %s by default

    * Update snapshots following design changes

    Co-authored-by: Mike Jolley <mike.jolley@me.com>

commit 0464883
Author: Albert Juhé Lluveras <contact@albertjuhe.com>
Date:   Sun May 16 20:00:06 2021 +0200

    Don't default to fallback in getSetting if value is falsy (#4202)

commit f95f12d
Author: Mike Jolley <mike.jolley@me.com>
Date:   Sun May 16 18:59:32 2021 +0100

    Fix es lint warnings (#4206)

    * Un-used PropTypes import

    * Avoid global and use ownerDocument

    * receiveCart return type

    * ignoreRestSiblings when destructuring for @typescript-eslint/no-unused-vars

    * Replace lodash find

    * Use global rather than window

    * Remove lodash map

    * move rule to overrides

commit db589e7
Author: Raluca Stan <raluca.stan@automattic.com>
Date:   Sun May 16 19:41:34 2021 +0200

    Fix cart and checkout frontend e2e tests (#4199)

    * Wip: fix e2e fe tests

    * Test that navigation ends

    * Fix waitForNavigation

    * comment out failing php test

    * click the dom element

    * Ensure navigation happens by waiting for it. Test page title.

    * remove skip and update docs

    * Revert "comment out failing php test"

    This reverts commit 7c40e8c.

    * Fix USD from merge conflict

    * Add missing check for page title

    * Try page.waitForFunction for text search

    * test to see checkout page title is correct

    * test checkout page url on CI

    * unde jest config change

    * Fix assertion for checkout page

    * remove extra localStorage item remove call

    Co-authored-by: Mike Jolley <mike.jolley@me.com>
    Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>

commit b9b66f9
Author: Mike Jolley <mike.jolley@me.com>
Date:   Thu May 13 11:49:39 2021 +0100

    Set order status to pending when no payment is needed (#4186)

commit 8ed63f7
Author: Mike Jolley <mike.jolley@me.com>
Date:   Thu May 13 11:21:21 2021 +0100

    Remove the need for the `canMakePayment` callback in the editor context (#4188)

    * Force can pay true in editor context

    * Update docs

commit 90499cb
Author: Mike Jolley <mike.jolley@me.com>
Date:   Thu May 13 11:20:37 2021 +0100

    Sync customer data during checkout with draft orders. (#4197)

    * Update store when email changes

    * Add pluckEmail helper and convert to TS

    * improve guard

    * sync draft order with customer data

commit a813c93
Author: Albert Juhé Lluveras <contact@albertjuhe.com>
Date:   Thu May 13 12:14:15 2021 +0200

    Set default store currency to USD in tests (#4203)

commit b140893
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Thu May 13 10:16:04 2021 +0200

    Update dependency config to v3.3.6 (#4195)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit d68bb11
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Thu May 13 10:15:35 2021 +0200

    Update dependency cssnano to v4.1.11 (#4196)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit beadbab
Author: Seghir Nadir <nadir.seghir@gmail.com>
Date:   Wed May 12 13:32:05 2021 +0100

    Add cart data to filters (#4164)

    * add cart data to filters

    * add extensions back to footer filter

commit c10fdf2
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 12 13:04:44 2021 +0100

    Pin dependency lodash to 4.17.21 (#4193)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit f92aac5
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 12 13:04:13 2021 +0100

    Update dependency chalk to v4.1.1 (#4194)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 27cff51
Author: Mike Jolley <mike.jolley@me.com>
Date:   Wed May 12 13:02:26 2021 +0100

    Should be using value rather than name (#4187)

commit 560972a
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Tue May 11 13:57:02 2021 +0100

    Add checkout filter for coupon names (#4166)

    * Make extensions optional, not all filters will need to pass this through

    For example the CartCouponSchema has no option for extensibility (and I don't think it's needed at any rate) so extensions will always be an empty object. Rather than explicitly specifying this when running the filter, we can let it default to an empty object.

    * Add filter for coupon code

commit 556ceb4
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Tue May 11 11:45:02 2021 +0100

    Check if variation data is iterable before formatting (#4182)

commit 4279db8
Author: Darren Ethier <darren@roughsmootheng.in>
Date:   Mon May 10 11:21:01 2021 -0400

    update package-lock (version change mostly)

commit f71b24a
Author: Darren Ethier <darren@roughsmootheng.in>
Date:   Mon May 10 11:16:58 2021 -0400

    update version string to dev version

commit 7f9c1b2
Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Date:   Mon May 10 11:14:05 2021 -0400

    Release: 5.1.0 (#4185)

    * Empty commit for release pull request

    * Add changelog

    * update testing notes

    * Bumping version strings to new version.

    Co-authored-by: github-actions <github-actions@github.com>
    Co-authored-by: Darren Ethier <darren@roughsmootheng.in>

commit 80c2735
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon May 10 14:38:04 2021 +0200

    Lock file maintenance (#4184)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 90074cf
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Mon May 10 10:03:30 2021 +0100

    Convert shipping components to typescript (#4135)

    * Add type defs for customer

    Taken from https://github.com/woocommerce/woocommerce-gutenberg-products-block/blob/194ecccf780afe16843a894bb2e988509a0746df/assets/js/type-defs/customer.ts

    * Convert ShippingCalculatorAddress to TypeScript

    * Convert ShippingCalculator to TypeScript

    * Convert ShippingLocation to TypeScript

    * Allow packageId to be a number or string in useSelectShippingRate(s)

    * Convert ShippingRatesControl to TypeScript

    * Convert ShippingOptionsStep to TypeScript

    * Allow package_id to be a string or number

    This is because of Subscriptions using strings for package IDs

    * Change to use CartShippingRateItemShippingRate instead of Rate

    * Add extra props to PackageProps type

    * Make ShippingAddress have the correct type

    * Use CartShippingRateItemShippingRate instead of Rate

    * Remove Rate type

    * Set return types to JSX.Element

    * Change type of props.renderOption in ShippingRatesControl

    * Remove customer type defs and relocate aliases to default-address-fields

    * Add EnteredAddress type

    * Import EnteredAddress from new location

    * Remove unnecessary eslint ignore

    * Remove unused variable

    * Remove confusing use of word Item in Shipping types

    * Remove confusing use of word Item in Shipping types

commit 3f1be39
Author: Albert Juhé Lluveras <contact@albertjuhe.com>
Date:   Mon May 10 10:00:14 2021 +0200

    Feature gate PaymentApi (#4176)

    * Feature gate PaymentApi

    * Improve payment method missing dependencies error message so it's clear it only affects blocks

    * Add PaymentApi feature flags to list of feature flags in docs

commit ed7eded
Author: Darren Ethier <darren@roughsmootheng.in>
Date:   Fri May 7 16:39:28 2021 -0400

    Improvements to `emitEventWithAbort`. (#4158)

    * modify emitEventWithAbort to change return value

    `emitEventWithAbort` now returns an array of responses up to the first response that triggered an error or fail response instead of aborting on success responses too.

    * update add to cart form context provider

    * update checkout state context provider

    * update payment method data context provider

    * update tests and fix thrown error handling.

commit 2be9a4e
Author: Raluca Stan <raluca.stan@automattic.com>
Date:   Fri May 7 15:50:55 2021 +0200

    Add lodash as a devDependency (#4179)

commit 69b3679
Author: Seghir Nadir <nadir.seghir@gmail.com>
Date:   Wed May 5 12:59:30 2021 +0100

    Don't clear email and phone fields when using separate billing address. (#4162)

    * preseve-billing-data

    * pluck empty email and phone

    * add issue number

commit 2140147
Author: Raluca Stan <raluca.stan@automattic.com>
Date:   Wed May 5 13:52:27 2021 +0200

    Fix/cart backend test (#4153)

    * Fix backend cart e2e test

    * Adjust test structure

    * Fix e2e checkout backend test.

    Make sure the confirmation window is closed

commit f8d9b90
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 5 10:08:45 2021 +0000

    Update dependency @stripe/stripe-js to v1.14.0 (#4170)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 2391a40
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Wed May 5 10:41:48 2021 +0100

    Add documentation for filters (#4167)

    * Rename the argument in the CheckoutFilterFunction type

    This only exists as an extra descriptive hint to anyone using this type, the value `label` was never used by anything so it does not need to be changed anywhere else.

    * Create Available Filters document

    * Add available filters to the extensibility README

    * Update docs/extensibility/available-filters.md to fix typographical error

    Co-authored-by: Mike Jolley <mike.jolley@me.com>

    Co-authored-by: Mike Jolley <mike.jolley@me.com>

commit f4af89b
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 5 08:10:24 2021 +0000

    Update dependency @woocommerce/e2e-utils to v0.1.4 (#4172)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 6c9e786
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 5 03:31:52 2021 +0000

    Update dependency @types/react to v16.14.6 (#4171)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 3ba4d9e
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 5 02:23:13 2021 +0000

    Update babel monorepo (#4169)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 35f71df
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Tue May 4 14:07:05 2021 +0100

    Lock file maintenance (#4163)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 4c65211
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Wed Apr 28 14:09:28 2021 +0000

    Coped package-lock.json from trunk

commit 703cb65
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Wed Apr 28 14:00:32 2021 +0000

    Reverted package-lock.json ( downgraded node version to 12 )

commit 41dfd79
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Wed Apr 28 11:12:45 2021 +0000

    Pre pull request clean up code

commit 75fc62e
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Tue Apr 27 13:03:24 2021 +0000

    Added Stock Status filter

commit e7bd0e6
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Fri Aug 20 16:53:56 2021 +0400

    Escape statuses for sql query

    Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

commit 29c8493
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Fri Aug 20 16:53:18 2021 +0400

    Allow custom stock statuses

    Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

commit 63ecd04
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Wed Jul 28 06:22:04 2021 +0000

    Bring back removed css

commit 27e0233
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Tue Jul 27 23:35:15 2021 +0400

    Update assets/js/blocks/stock-filter/block.js

    Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

commit 136c32d
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Thu Jul 15 06:50:06 2021 +0000

    Fixed preview part for stock and attribute filters

commit ef89751
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Wed Jul 14 20:15:05 2021 +0400

    Update index.js

commit a63dbce
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Wed Jul 14 15:43:06 2021 +0000

    Review suggestion changes

commit 6b0f5d2
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Wed Jul 14 15:40:52 2021 +0000

    Linter fix

commit 791b38b
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Wed Jul 14 15:37:41 2021 +0000

    Removed hideOutOfStock from AllProducts and realized hide out of stock functionality from SQL query

commit 1a7a002
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Wed Jul 14 15:21:51 2021 +0000

    Created new component for Filters elements labels

commit d9b7fae
Author: aaron <aaron.yor@gmail.com>
Date:   Wed Jun 2 11:57:06 2021 +0400

    Fix label includ path

commit 5311584
Merge: 92a0da3 413a4e0
Author: aaron <aaron.yor@gmail.com>
Date:   Wed Jun 2 11:52:48 2021 +0400

    Merge remote-tracking branch 'core/trunk' into add/stock-filter

    # Conflicts:
    #	package-lock.json

commit d8e6dab
Merge: 42beb9b 4343b96
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Fri Apr 30 12:28:09 2021 +0400

    Merge pull request #1 from woocommerce/trunk

    Fork update

commit 92a0da3
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Wed Apr 28 14:09:28 2021 +0000

    Coped package-lock.json from trunk

commit ae0d12b
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Wed Apr 28 14:00:32 2021 +0000

    Reverted package-lock.json ( downgraded node version to 12 )

commit 5e0c7f9
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Wed Apr 28 11:12:45 2021 +0000

    Pre pull request clean up code

commit 105b3f7
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Tue Apr 27 13:03:24 2021 +0000

    Added Stock Status filter
opr added a commit that referenced this pull request Aug 20, 2021
opr added a commit that referenced this pull request Aug 20, 2021
commit 4a14c226b739f3d88f99647206627ff351ef01ad
Merge: 8cc7acd 4fccfd8
Author: Thomas Roberts <thomas.roberts@automattic.com>
Date:   Fri Aug 20 16:06:19 2021 +0100

    Merge branch 'add/stock-filter' of git://github.com/NovemBit/woocommerce-gutenberg-products-block-fork into NovemBit-add/stock-filter

commit 4fccfd8
Merge: 8012b2b e7bd0e6
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Fri Aug 20 13:17:42 2021 +0000

    Merge from trunk

commit 8012b2b
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Fri Aug 20 16:53:56 2021 +0400

    Escape statuses for sql query

    Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

commit 304348a
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Fri Aug 20 16:53:18 2021 +0400

    Allow custom stock statuses

    Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

commit b2f01e4
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Wed Jul 28 06:22:04 2021 +0000

    Bring back removed css

commit caafffd
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Tue Jul 27 23:35:15 2021 +0400

    Update assets/js/blocks/stock-filter/block.js

    Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

commit ae381de
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Thu Jul 15 06:50:06 2021 +0000

    Fixed preview part for stock and attribute filters

commit 7df5fea
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Wed Jul 14 20:15:05 2021 +0400

    Update index.js

commit af0294c
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Wed Jul 14 15:43:06 2021 +0000

    Review suggestion changes

commit 16da253
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Wed Jul 14 15:40:52 2021 +0000

    Linter fix

commit 594125a
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Wed Jul 14 15:37:41 2021 +0000

    Removed hideOutOfStock from AllProducts and realized hide out of stock functionality from SQL query

commit 94a54e3
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Wed Jul 14 15:21:51 2021 +0000

    Created new component for Filters elements labels

commit e3d7fb2
Author: aaron <aaron.yor@gmail.com>
Date:   Wed Jun 2 11:57:06 2021 +0400

    Fix label includ path

commit c9e3d02
Author: Seghir Nadir <nadir.seghir@gmail.com>
Date:   Tue Jun 1 09:46:02 2021 +0100

    remove usage of mustBeString (#4294)

commit b892339
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon May 31 16:07:59 2021 +0100

    Lock file maintenance (#4290)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 6de68e4
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Thu May 27 12:57:49 2021 +0100

    Check if product can be added to cart before adding ajax class to button (#4265)

commit a1ccaf4
Author: Thomas Roberts <thomas.roberts@automattic.com>
Date:   Wed May 26 16:10:43 2021 +0100

    Update version for next release

commit 24f882f
Author: Thomas Roberts <thomas.roberts@automattic.com>
Date:   Wed May 26 15:42:21 2021 +0100

    Bumping version strings to new version.

commit e1fd082
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Wed May 26 15:31:37 2021 +0100

    Update link to testing zip

commit 35521e5
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Wed May 26 14:04:42 2021 +0100

    Fix display of itemised taxes (#4279)

    * Add price to itemised tax rates & hide Total when itemised taxes are on

    * Update snapshots for taxes in sidebar

commit 7f3a1e6
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 26 08:52:31 2021 +0000

    Update dependency downshift to v6.1.3 (#4272)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 593ef2b
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 26 05:04:55 2021 +0000

    Update dependency @types/react to v16.14.8 (#4270)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 21f16d6
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 26 03:47:54 2021 +0000

    Update dependency @woocommerce/e2e-utils to v0.1.5 (#4271)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 444256e
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 26 02:30:17 2021 +0000

    Update dependency @types/lodash to v4.14.170 (#4269)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 5f9df57
Author: Thomas Roberts <thomas.roberts@automattic.com>
Date:   Tue May 25 15:31:03 2021 +0100

    Create 5.2.0 testing notes

commit 45abda6
Author: Thomas Roberts <thomas.roberts@automattic.com>
Date:   Tue May 25 14:52:37 2021 +0100

    Update package.json

    npm ci was not working correctly this will fix it.

commit c3daa6c
Author: Thomas Roberts <thomas.roberts@automattic.com>
Date:   Tue May 25 14:26:32 2021 +0100

    Update changelog and WC tested up to

commit 6128309
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Thu May 20 17:56:56 2021 +0100

    Revert "Move `TextInput` to checkout package and allow it to be used for input type=number (#4238)"

    This reverts commit 15c1779.

commit 193267b
Author: Mike Jolley <mike.jolley@me.com>
Date:   Tue May 25 12:49:13 2021 +0100

    Add key to each `CartTotalItem` (#4240)

    * Move type defs

    * Move type guards

    * Fix imports

    * Extract prepareTotalItems to TS file

    * usePaymentMethodInterface as TS file

    * Fix TS props

    * Fix currency type defs

    * Add return type to usePaymentMethodInterface

    * Add key prop to CartTotalItem

    * Fixed up js tests

    * Move SymbolPosition into type-defs package

    Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>

commit c15e512
Author: Seghir Nadir <nadir.seghir@gmail.com>
Date:   Tue May 25 10:46:28 2021 +0100

    Fix duplicate plugins by using wp.components global in the editor. (#4211)

    * fix duplicate slotProvider

    * load file on demand

    * add comment and load components in blocks as well

    * add todo block

commit e2cf0ba
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Tue May 25 08:43:46 2021 +0100

    Hide "including X in taxes" when the amount of tax is 0 (#4262)

    * Hide "including x in taxes" if tax amount is 0

    * Add jest types to tsconfig

    * Move SHOW_TAXES into component body

    This is to make the code more testable and allows us to change values. There's no significant performance impact because of this change.

    * Add tests and snapshots for TotalsFooterItem

commit 9b44c88
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon May 24 18:14:37 2021 +0100

    Update dependency @octokit/graphql to v4.6.2 (#4230)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 4973132
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon May 24 16:40:05 2021 +0100

    Lock file maintenance (#4253)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit b7eabf5
Author: Michael P. Pfeiffer <frontdevde@users.noreply.github.com>
Date:   Fri May 21 09:53:46 2021 +0200

    Block Widgets: hide legacy widgets with a feature-complete block equivalent (#4237)

    * Block Widgets: hide legacy widgets with block equivalent

    * Unhide Products and Products by Rating widgets

commit 47556b9
Author: Michael P. Pfeiffer <frontdevde@users.noreply.github.com>
Date:   Fri May 21 09:52:27 2021 +0200

    Block Widgets: hide All Products and Filter blocks in the Customizer (#4225)

commit 208b212
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Thu May 20 17:56:56 2021 +0100

    Move `TextInput` to checkout package and allow it to be used for input type=number (#4238)

    * Move text-input to checkout package

    * Pass validation props directly to ValidatedTextInput

    * Import label relatively instead of from package

    * Pass validation functions to ValidatedTextInput

    This is so it doesn't need to get them from useValidationContext.

    * Add InputProps to ValidatedTextInput

    This will be used to control additional props on the input element of TextInput

    * Spread inputProps onto <input> element of TextInput

    * Export TextInput from @woocommerce/blocks-checkout

    * Add @woocommerce/blocks-checkout package to tsconfig

    * Allow styling to be applied to number inputs and when value is 0

    * Make style order consistent

    * Remove inputProps to rely on rest in TextInput

    * Add specific prop for the inputErrorComponent

    * Only disallow active state if value is 0 AND type is number

    * Change all uses of ValidatedTextInput to also pass inputErrorComponent

    * Revert "Change all uses of ValidatedTextInput to also pass inputErrorComponent"

    This reverts commit ec734b9.

    * Revert "Remove inputProps to rely on rest in TextInput"

    This reverts commit 1fc64cc.

    * Revert "Revert "Change all uses of ValidatedTextInput to also pass inputErrorComponent""

    This reverts commit 110e360.

    * Revert "Revert "Remove inputProps to rely on rest in TextInput""

    This reverts commit aeb0352.

    * Don't pass errorMessage to ValidatedTextInput

commit 55f5bfd
Author: Mike Jolley <mike.jolley@me.com>
Date:   Thu May 20 15:07:12 2021 +0100

    Create LICENSE (#4235)

commit 0b10f75
Author: Albert Juhé Lluveras <contact@albertjuhe.com>
Date:   Thu May 20 10:58:59 2021 +0200

    Update @woocommerce/components (#4100)

    * Add isCompact prop to components using SearchListControl

    * Update @woocommerce/components to 6.1.2

    * Remove legacy CSS code

    * Add some CSS rules to override conflicting editor styles

    * Replace showCount prop with has-count class name

    * Create ExpandableSearchListItem component

    * Refactor ProductControl so it uses ExpandableSearchListItem

    * Update @woocommerce/components to 6.2.0

    * Fix @woocommerce/components builds breaking

    * Fix a11y of expandable item list children

    * Set categories to an empty array by default

    * Render compact control in Attribute filter sidebar

    * Add countLabel to ProductAttributeTermControl

    * Fix ProductTagControl selected items

    * Use sentence case for countLabel

    * Fix wrong margins in block editor

    * Fix checkbox alignment

    * Update package-lock.json

    * Fix withCategories test

    * Fix JS error in Filter Products by Attribute block

    * Make input ids unique

commit 587be17
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Wed May 19 10:55:15 2021 +0100

    Convert TextInput and ValidatedTextInput to TypeScript (#4226)

    * Change index file from base/context to .ts

    This is to stop TS complaining when importing things from here.

    * Convert ValidatedTextInput to TypeScript

    * Convert TextInput to TypeScript

    * Ensure Label accepts correct HTML Attributes Props

    * Remove PropTypes from TextInput and ValidatedTextInput

    No longer needed because of TypeScript

    * Use correct error id to show validation message

    * Use HTMLElement instead of a specific element type for LabelProps

    * Update assets/js/base/components/text-input/validated-text-input.tsx

    Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>

    * Update assets/js/base/components/text-input/validated-text-input.tsx

    * Use correct formatting in ValidatedTextInput

    Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>

commit 731c75e
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 19 07:36:46 2021 +0000

    Update dependency @testing-library/react-hooks to v5.1.3 (#4233)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit ef6ad88
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 19 04:36:44 2021 +0000

    Update dependency @types/lodash to v4.14.169 (#4234)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 096463e
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 19 03:46:21 2021 +0000

    Update dependency @testing-library/react to v11.2.7 (#4232)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 8722839
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 19 02:48:45 2021 +0000

    Update dependency @stripe/react-stripe-js to v1.4.1 (#4231)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 2f7e8ed
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 19 01:32:34 2021 +0000

    Pin dependency @types/wordpress__deprecated to 2.4.2 (#4229)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 72e851a
Author: Raluca Stan <raluca.stan@automattic.com>
Date:   Tue May 18 15:09:30 2021 +0200

    Fix e2e checkout tests and adjust jest setup (#4216)

    * Fix checkout test
    - make tests independent & test also for empty cart case
    - make sure the Order summary is expanded with a better selector
    * Remove unnecessary localStorage operations from tests
    * Go to cart page before removing an item from cart
    * Remove logging observing before tests
    This removes unnecessary console.log interception. A big part of the logic was done for Puppeteer 1.6.1, but since 3.0.0 message.text() returns string. We allow console.error messages to surface in our tests. Although they don't cause the test to fail it might be a good addition for debugging purposes.

commit 7b7119c
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Tue May 18 11:27:27 2021 +0100

    Lock file maintenance (#4212)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 5f84e7d
Author: Mike Jolley <mike.jolley@me.com>
Date:   Tue May 18 10:37:31 2021 +0100

    Convert checkout state context provider to Typescript (#4200)

    * git move to ts files

    * Type the checkout state provider

    * Restore for loop for error handling

    * Types not needed

    * Consolodate response handling

    * Unused import

    * Fix defaults for onCheckoutAfterProcessingWithSuccess etc

    * Type useEmitResponse and remove isObject checks

    * useEmitResponse as const

    * Check that redirectUrl is string

    * Define actions as const

    * data.redirectUrl should be truthy

    * Add redirectURL todo item as followup

    * remove null fallback

commit fccc72b
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Tue May 18 09:10:31 2021 +0100

    Move Button and Label components to `@woocommerce/blocks-checkout` package (#4222)

    * Move Button to checkout package

    * Move Label to Components Package

commit 0b91fbe
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Mon May 17 15:00:57 2021 +0100

    Update design of cart and checkout sidebars (#4180)

    * Update cart/coupon/shipping design

    * Add order summary heading

    * Move and style discounts on checkout sidebar

    * Add rate to tax lines

    * Ensure the option to display taxes itemised is available to Cart block

    * Output individual tax items below the total & add styles for this

    * Add success notice under coupon input on successful coupon addition

    * Add border to bottom of Totals footer

    * Show success message when adding coupon

    * Add padding to cart item rows

    * Add preview data to cart for when taxes are enabled

    * Add rate to cart response type

    * Add showRateAfterTaxName attribute to Cart block

    * Add control to cart block to show rate percentage after rate name

    * Add rate % in cart totals only if option is toggled on

    * Pass showRateAfterTaxName attribute down to TotalsTaxes

    * Add showRateAfterTaxName to Checkout block

    * Add control to block editor for showRateAfterTaxName on Checkout

    * Pass showRateAfterTaxName down to TotalsTaxes in Checkout

    * Change label for showing tax rates in cart and checkout blocks

    * Add test to ensure Taxes section shows in Cart block

    * Add tests for cart sidebar and rate percentages

    * Remove order summary title from checkout sidebar

    * Check if taxes are enabled before rendering the option to show rate %s

    * Add ShippingVia component to show the selected rate in sidebar

    * Remove value from individual tax rates

    * Remove bold from Shipping via label

    * Remove coupon added successfully message

    * Ensure panel headings that are h2s are the same colour as others

    * Clean up eslint warnings

    * Show rate %s by default

    * Update snapshots following design changes

    Co-authored-by: Mike Jolley <mike.jolley@me.com>

commit 0464883
Author: Albert Juhé Lluveras <contact@albertjuhe.com>
Date:   Sun May 16 20:00:06 2021 +0200

    Don't default to fallback in getSetting if value is falsy (#4202)

commit f95f12d
Author: Mike Jolley <mike.jolley@me.com>
Date:   Sun May 16 18:59:32 2021 +0100

    Fix es lint warnings (#4206)

    * Un-used PropTypes import

    * Avoid global and use ownerDocument

    * receiveCart return type

    * ignoreRestSiblings when destructuring for @typescript-eslint/no-unused-vars

    * Replace lodash find

    * Use global rather than window

    * Remove lodash map

    * move rule to overrides

commit db589e7
Author: Raluca Stan <raluca.stan@automattic.com>
Date:   Sun May 16 19:41:34 2021 +0200

    Fix cart and checkout frontend e2e tests (#4199)

    * Wip: fix e2e fe tests

    * Test that navigation ends

    * Fix waitForNavigation

    * comment out failing php test

    * click the dom element

    * Ensure navigation happens by waiting for it. Test page title.

    * remove skip and update docs

    * Revert "comment out failing php test"

    This reverts commit 7c40e8c.

    * Fix USD from merge conflict

    * Add missing check for page title

    * Try page.waitForFunction for text search

    * test to see checkout page title is correct

    * test checkout page url on CI

    * unde jest config change

    * Fix assertion for checkout page

    * remove extra localStorage item remove call

    Co-authored-by: Mike Jolley <mike.jolley@me.com>
    Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>

commit b9b66f9
Author: Mike Jolley <mike.jolley@me.com>
Date:   Thu May 13 11:49:39 2021 +0100

    Set order status to pending when no payment is needed (#4186)

commit 8ed63f7
Author: Mike Jolley <mike.jolley@me.com>
Date:   Thu May 13 11:21:21 2021 +0100

    Remove the need for the `canMakePayment` callback in the editor context (#4188)

    * Force can pay true in editor context

    * Update docs

commit 90499cb
Author: Mike Jolley <mike.jolley@me.com>
Date:   Thu May 13 11:20:37 2021 +0100

    Sync customer data during checkout with draft orders. (#4197)

    * Update store when email changes

    * Add pluckEmail helper and convert to TS

    * improve guard

    * sync draft order with customer data

commit a813c93
Author: Albert Juhé Lluveras <contact@albertjuhe.com>
Date:   Thu May 13 12:14:15 2021 +0200

    Set default store currency to USD in tests (#4203)

commit b140893
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Thu May 13 10:16:04 2021 +0200

    Update dependency config to v3.3.6 (#4195)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit d68bb11
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Thu May 13 10:15:35 2021 +0200

    Update dependency cssnano to v4.1.11 (#4196)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit beadbab
Author: Seghir Nadir <nadir.seghir@gmail.com>
Date:   Wed May 12 13:32:05 2021 +0100

    Add cart data to filters (#4164)

    * add cart data to filters

    * add extensions back to footer filter

commit c10fdf2
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 12 13:04:44 2021 +0100

    Pin dependency lodash to 4.17.21 (#4193)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit f92aac5
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 12 13:04:13 2021 +0100

    Update dependency chalk to v4.1.1 (#4194)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 27cff51
Author: Mike Jolley <mike.jolley@me.com>
Date:   Wed May 12 13:02:26 2021 +0100

    Should be using value rather than name (#4187)

commit 560972a
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Tue May 11 13:57:02 2021 +0100

    Add checkout filter for coupon names (#4166)

    * Make extensions optional, not all filters will need to pass this through

    For example the CartCouponSchema has no option for extensibility (and I don't think it's needed at any rate) so extensions will always be an empty object. Rather than explicitly specifying this when running the filter, we can let it default to an empty object.

    * Add filter for coupon code

commit 556ceb4
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Tue May 11 11:45:02 2021 +0100

    Check if variation data is iterable before formatting (#4182)

commit 4279db8
Author: Darren Ethier <darren@roughsmootheng.in>
Date:   Mon May 10 11:21:01 2021 -0400

    update package-lock (version change mostly)

commit f71b24a
Author: Darren Ethier <darren@roughsmootheng.in>
Date:   Mon May 10 11:16:58 2021 -0400

    update version string to dev version

commit 7f9c1b2
Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Date:   Mon May 10 11:14:05 2021 -0400

    Release: 5.1.0 (#4185)

    * Empty commit for release pull request

    * Add changelog

    * update testing notes

    * Bumping version strings to new version.

    Co-authored-by: github-actions <github-actions@github.com>
    Co-authored-by: Darren Ethier <darren@roughsmootheng.in>

commit 80c2735
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon May 10 14:38:04 2021 +0200

    Lock file maintenance (#4184)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 90074cf
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Mon May 10 10:03:30 2021 +0100

    Convert shipping components to typescript (#4135)

    * Add type defs for customer

    Taken from https://github.com/woocommerce/woocommerce-gutenberg-products-block/blob/194ecccf780afe16843a894bb2e988509a0746df/assets/js/type-defs/customer.ts

    * Convert ShippingCalculatorAddress to TypeScript

    * Convert ShippingCalculator to TypeScript

    * Convert ShippingLocation to TypeScript

    * Allow packageId to be a number or string in useSelectShippingRate(s)

    * Convert ShippingRatesControl to TypeScript

    * Convert ShippingOptionsStep to TypeScript

    * Allow package_id to be a string or number

    This is because of Subscriptions using strings for package IDs

    * Change to use CartShippingRateItemShippingRate instead of Rate

    * Add extra props to PackageProps type

    * Make ShippingAddress have the correct type

    * Use CartShippingRateItemShippingRate instead of Rate

    * Remove Rate type

    * Set return types to JSX.Element

    * Change type of props.renderOption in ShippingRatesControl

    * Remove customer type defs and relocate aliases to default-address-fields

    * Add EnteredAddress type

    * Import EnteredAddress from new location

    * Remove unnecessary eslint ignore

    * Remove unused variable

    * Remove confusing use of word Item in Shipping types

    * Remove confusing use of word Item in Shipping types

commit 3f1be39
Author: Albert Juhé Lluveras <contact@albertjuhe.com>
Date:   Mon May 10 10:00:14 2021 +0200

    Feature gate PaymentApi (#4176)

    * Feature gate PaymentApi

    * Improve payment method missing dependencies error message so it's clear it only affects blocks

    * Add PaymentApi feature flags to list of feature flags in docs

commit ed7eded
Author: Darren Ethier <darren@roughsmootheng.in>
Date:   Fri May 7 16:39:28 2021 -0400

    Improvements to `emitEventWithAbort`. (#4158)

    * modify emitEventWithAbort to change return value

    `emitEventWithAbort` now returns an array of responses up to the first response that triggered an error or fail response instead of aborting on success responses too.

    * update add to cart form context provider

    * update checkout state context provider

    * update payment method data context provider

    * update tests and fix thrown error handling.

commit 2be9a4e
Author: Raluca Stan <raluca.stan@automattic.com>
Date:   Fri May 7 15:50:55 2021 +0200

    Add lodash as a devDependency (#4179)

commit 69b3679
Author: Seghir Nadir <nadir.seghir@gmail.com>
Date:   Wed May 5 12:59:30 2021 +0100

    Don't clear email and phone fields when using separate billing address. (#4162)

    * preseve-billing-data

    * pluck empty email and phone

    * add issue number

commit 2140147
Author: Raluca Stan <raluca.stan@automattic.com>
Date:   Wed May 5 13:52:27 2021 +0200

    Fix/cart backend test (#4153)

    * Fix backend cart e2e test

    * Adjust test structure

    * Fix e2e checkout backend test.

    Make sure the confirmation window is closed

commit f8d9b90
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 5 10:08:45 2021 +0000

    Update dependency @stripe/stripe-js to v1.14.0 (#4170)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 2391a40
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Wed May 5 10:41:48 2021 +0100

    Add documentation for filters (#4167)

    * Rename the argument in the CheckoutFilterFunction type

    This only exists as an extra descriptive hint to anyone using this type, the value `label` was never used by anything so it does not need to be changed anywhere else.

    * Create Available Filters document

    * Add available filters to the extensibility README

    * Update docs/extensibility/available-filters.md to fix typographical error

    Co-authored-by: Mike Jolley <mike.jolley@me.com>

    Co-authored-by: Mike Jolley <mike.jolley@me.com>

commit f4af89b
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 5 08:10:24 2021 +0000

    Update dependency @woocommerce/e2e-utils to v0.1.4 (#4172)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 6c9e786
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 5 03:31:52 2021 +0000

    Update dependency @types/react to v16.14.6 (#4171)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 3ba4d9e
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 5 02:23:13 2021 +0000

    Update babel monorepo (#4169)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 35f71df
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Tue May 4 14:07:05 2021 +0100

    Lock file maintenance (#4163)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 4c65211
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Wed Apr 28 14:09:28 2021 +0000

    Coped package-lock.json from trunk

commit 703cb65
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Wed Apr 28 14:00:32 2021 +0000

    Reverted package-lock.json ( downgraded node version to 12 )

commit 41dfd79
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Wed Apr 28 11:12:45 2021 +0000

    Pre pull request clean up code

commit 75fc62e
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Tue Apr 27 13:03:24 2021 +0000

    Added Stock Status filter

commit e7bd0e6
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Fri Aug 20 16:53:56 2021 +0400

    Escape statuses for sql query

    Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

commit 29c8493
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Fri Aug 20 16:53:18 2021 +0400

    Allow custom stock statuses

    Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

commit 63ecd04
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Wed Jul 28 06:22:04 2021 +0000

    Bring back removed css

commit 27e0233
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Tue Jul 27 23:35:15 2021 +0400

    Update assets/js/blocks/stock-filter/block.js

    Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

commit 136c32d
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Thu Jul 15 06:50:06 2021 +0000

    Fixed preview part for stock and attribute filters

commit ef89751
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Wed Jul 14 20:15:05 2021 +0400

    Update index.js

commit a63dbce
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Wed Jul 14 15:43:06 2021 +0000

    Review suggestion changes

commit 6b0f5d2
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Wed Jul 14 15:40:52 2021 +0000

    Linter fix

commit 791b38b
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Wed Jul 14 15:37:41 2021 +0000

    Removed hideOutOfStock from AllProducts and realized hide out of stock functionality from SQL query

commit 1a7a002
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Wed Jul 14 15:21:51 2021 +0000

    Created new component for Filters elements labels

commit d9b7fae
Author: aaron <aaron.yor@gmail.com>
Date:   Wed Jun 2 11:57:06 2021 +0400

    Fix label includ path

commit 5311584
Merge: 92a0da3 413a4e0
Author: aaron <aaron.yor@gmail.com>
Date:   Wed Jun 2 11:52:48 2021 +0400

    Merge remote-tracking branch 'core/trunk' into add/stock-filter

    # Conflicts:
    #	package-lock.json

commit d8e6dab
Merge: 42beb9b 4343b96
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Fri Apr 30 12:28:09 2021 +0400

    Merge pull request #1 from woocommerce/trunk

    Fork update

commit 92a0da3
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Wed Apr 28 14:09:28 2021 +0000

    Coped package-lock.json from trunk

commit ae0d12b
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Wed Apr 28 14:00:32 2021 +0000

    Reverted package-lock.json ( downgraded node version to 12 )

commit 5e0c7f9
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Wed Apr 28 11:12:45 2021 +0000

    Pre pull request clean up code

commit 105b3f7
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Tue Apr 27 13:03:24 2021 +0000

    Added Stock Status filter
opr added a commit that referenced this pull request Aug 20, 2021
@grogou
Copy link
Contributor Author

grogou commented Aug 20, 2021

@opr conflict resolved! Thanks for your help!

@opr opr added focus: blocks Specific work involving or impacting how blocks behave. type: new block Applied to work that introduces a new block (typically used on an epic issue). focus: rest api Work impacting REST api routes. labels Aug 20, 2021
@opr
Copy link
Contributor

opr commented Aug 20, 2021

@grogou Hello! Seems like something has gone a bit wrong while we've been trying to resolve this conflict. I think you'll need to reset your branch to a known good commit (Maybe e7bd0e6 ?) and force-push it to your remote.

Then you'll need to reapply the changes you made to resolve the conflict and push them to your remote again. After this is done, we should be in a position to merge into trunk. Sorry for the confusion here!

@grogou
Copy link
Contributor Author

grogou commented Aug 20, 2021

@opr I think we done! finally.

@opr
Copy link
Contributor

opr commented Aug 20, 2021

The JS/CSS linting job is failing because of Error: Resource not accessible by integration - this is because it is a PR from a fork. I have run the linting job locally and can confirm it is fine.

@grogou Thank you for all of your efforts on this PR, and thank you for your patience while we reviewed it. This block is a great addition. Congratulations on getting it merged! 🥳 🚀

@opr opr merged commit cbfddb0 into woocommerce:trunk Aug 20, 2021
@grogou
Copy link
Contributor Author

grogou commented Aug 20, 2021

@opr Thank you too for help me do this PR. Think we will work together again.

@grogou
Copy link
Contributor Author

grogou commented Aug 20, 2021

@opr and we forgot about block icon, do we need to change it to another one?

@opr
Copy link
Contributor

opr commented Aug 20, 2021

@opr and we forgot about block icon, do we need to change it to another one?

Oh, yes good idea, since this PR has been merged you'll need to open another one with the changes! @vivialice any ideas what icon we should use for this new block?

@nerrad nerrad added this to the 5.8.0 milestone Aug 30, 2021
@nerrad nerrad added the type: enhancement The issue is a request for an enhancement. label Aug 31, 2021
@opr
Copy link
Contributor

opr commented Sep 1, 2021

@grogou FYI your block is now released into the wild in WooCommerce Blocks 5.8.0 :) https://developer.woocommerce.com/2021/08/31/woocommerce-blocks-5-8-0-release-notes/

Thanks so much for the work you put into this and for being patient while we reviewed it!

@grogou
Copy link
Contributor Author

grogou commented Sep 1, 2021

@opr Thanks, it was pleasure for me to communicate with WC team and do my first contribution, me and our team are going to have more contribution in the near future.

@Aljullu Aljullu added the block: filter by stock Issues related to the Filter by Stock block. label Dec 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
block: filter by stock Issues related to the Filter by Stock block. focus: blocks Specific work involving or impacting how blocks behave. focus: rest api Work impacting REST api routes. type: enhancement The issue is a request for an enhancement. type: new block Applied to work that introduces a new block (typically used on an epic issue).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stock status filter feature
8 participants