* Update wp-hooks-generator
* Update inline hook documentation into consistent format
1. Hook docs for the same hook should be identical
2. Prefix with `Hook: ` so the case of the hook is not changed.
3. Use `@see` instead of `@hooked`. Hooked is not a standard PHP Doc tag.
cc @Aljullu
* Update hook doc script to support duplicate hooks across files
* Remove unused variables in function
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
* Empty commit for release pull request
* Update readme.txt with 6.7.0 changelog
* Add testing notes for the 6.7.0 release
* Fix typo in testing notes
* Update Testing Notes
* Remove item from testing notes for 6.7.0
* Bumping version strings to new version.
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Raluca Stan <ralucastn@gmail.com>
* Account for products without variations in the prime_product_variations function
* Update src/BlockTypes/AbstractProductGrid.php
Co-authored-by: Mike Jolley <mike.jolley@me.com>
* Fix whitespace
* Remove unnecessary variable declaration
Co-authored-by: Mike Jolley <mike.jolley@me.com>
Gutenberg 12.1.0 has changed the convention for the directory paths from
`block-templates` and `block-template-parts` to `templates` and `parts` respectively.
Allow compatibility with themes which follow both conventions and also make sure that
we remain backwards-compatible.
Fixeswoocommerce/woocommerce-blocks#5450
Some of this fix has a dependency on WooCore
See: WooCommerce/woocommercewoocommerce/woocommerce-blocks#31522
* Fix custom templates with fallback being incorrectly attributed
Category and tags templates can fallback to the generic archive if, e.g., the theme
provides one for the latter but not for the former. However, since Gutenberg is not
aware of this fallback mechanism, it would incorrectly attribute the custom template
to the user instead of the theme.
Here we are explicitly setting the `has_theme_file` to make sure Gutenberg knows
we do, in fact, have a theme fail (if not what it expects).
Also skip the loop if template is duplicate but has no fallback
Fixeswoocommerce/woocommerce-blocks#5441
* Add clear and fill input test util
* Add tests for Filter Products by Price
* Add class name to filter products by price block in editor
* Update wp-env
* Fix formatting
* Update lock
* Revert "Update lock"
This reverts commit f4e809e000430eea3972c94fd2aea0a19ba6961b.
* Create product attributes during setup
* Remove product attributes during teardown
* Add attributes in fixture-data
* Add two new products, for attribute testing
* Load attributes into store and apply them to products
* Add class to Filter by Attribute when editing
This is so it can be targeted in E2E tests more easily.
* Add tests for Filter Product by Attribute
* Fix formatting in attribute-filter.test.js
* Add tests for active filters block
* Add doc block for ensuteCleanAttributes
* Update wording of title test in all filter block E2E
* Update test wording to read better
* Update snapshots
* Use pptr-testing-library selectors to click elements
This makes the tests easier to reason with, and lets us take a step back from the implementation details (classnames etc.)
* Add saveOrPublish test util
* Use pptr-testing-library selectors to click elements in attribute filter
* Use pptr-testing-library selectors to click elements in price filter
* Add `puppeteer-testing-library`
* Use puppeteer-testing-library API to look for H6 button
* Use correct argument in jest-puppeteer.dev.config
* Update package.json & package-lock.json
* remove tests for 5.3
* remove snapshots
* Remove ensureCleanAttributes
* Remove puppeteer-testing-library, install missing expect-puppeteer package and update tests
The puppeteer-testing-library, although added by gutenberg is not actively used.
I have removed it and realised that the added functionality can be easily replaced by expect-puppeteer.
This is a package that we specify in the jest configuration but it was not part of our package.json.
The selectors from puppeteer-testing-library have been replaced with .toClick and the utility clearAndFillInput with .toFill
The Filter by Attribute block has been skiped until tests are fixed.
* Add back setupPageSettings to jest setup
* Fix filter by attribute block test
* Fix linting error
Co-authored-by: Raluca Stan <ralucastn@gmail.com>
* Add isCheckout prop to NoShippingPlaceholder and TotalsShipping
* Pass isCheckout to TotalsShipping in Checkout sidebar
* Show the NoShippingPlaceholder if no rates are found
* Show better error message when no shipping is available in checkout
* Remove Storybook knobs
They are now fully replaced by controls
* Update Storybook to 6.4.9
* Add Storybook documentation and VSCode snippets
* Add VSCode snippets
* Convert stories from checkout packages and include them in Storybook
* Empty commit for release pull request
* Add changelog and version info
* 6.6.0 testing notes
* Remove mini cart from testing instructions
* Clarify testing instructions
* Remove experimental feature from changelog
* fix not found template for the template editor
* update zip
* Remove test instructions for icon
* Testing steps for 5425
* Link order controller to cart routes
* Remove order controller from checkout route
* Fix PHP warnings in abstract schema
* Fix PHP warnings in abstract route
* Update shipping phone handling
* Includes are handled in core now
* Remove maybe_update_order_from_customer
* Add cart_updated routine to all cart routes
* Remove abstract method
* Remove test for woocommerce_blocks_cart_update_order_from_customer_request
* Remove do_order_callback
* Update readme
* Update tests
* Bumping version strings to new version.
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Mike Jolley <mike.jolley@me.com>
Co-authored-by: Luigi <gigitux@gmail.com>
* Link order controller to cart routes
* Remove order controller from checkout route
* Fix PHP warnings in abstract schema
* Fix PHP warnings in abstract route
* Update shipping phone handling
* Includes are handled in core now
* Remove maybe_update_order_from_customer
* Add cart_updated routine to all cart routes
* Remove abstract method
* Remove test for woocommerce_blocks_cart_update_order_from_customer_request
* Remove do_order_callback
* Add archive-product template into block template hieachy
* Add archive-product condition to product tag block template render method
* Move taxonomy hierarchy filter to WC core
* Undo template amends
* Duplicate the themes archive-product template if it has one for taxonomy block templates
* Review feedback
* Use TextDomain instead of Name
* use correct if/else syntax
* Remove unncessary boolean syntax
* Add full documentation to the component props in Storybook
* Fix `FormattedMonetaryAmount` TypeScript errors
Since this component is passing on props to `NumberFormat`,
it needs to extend all of its original props, except for `onValueChange`
which we wrap in order to accept only `number`s.
* Convert `constrainRangeSliderValues` to TypeScript
* Add docs to `Currency` types
* Convert `PriceSlider` to TypeScript
*Note:* All TypeScript errors were fixed during the conversion,
except for the IE workaround which wasn't clear to me at this time.
Opened an issue: woocommerce/woocommerce-blocks#5276
* Fix Price Slider story (https://github.com/woocommerce/woocommerce-blocks/pull/5253)
* Migrate stories for `ProductName` to latest Storybook
Also add props documentation and add named export.
* Migrate stories for `ProductName` to latest Storybook. Also add props
documentation and add named export.
* Migrate `TotalsFooterItem` to TypeScript and latest Storybook
* Add a `LooselyMustHave` utility type.
* Export `allSettings` so that they can be manipulated in stories and tests
* Implement a way to easily define and reuse Storybook controls
Implement a currency control for a common use-case of selecting currencies.
It currently implements EUR and USD as they have different properties.
* Migrate `TotalsDiscount` to TypeScript and implement stories
* Migrate `TotalsCoupon` to TypeScript and fix stories
* Change Coupon name within Storybook
* Nicer handling of removal of a coupon from Storybook
It now dynamically calculates the discount from the actual coupons.