* Empty commit for release pull request
* Update 8.2.0 changelog
* Add 8.2.0 testing steps
* Fix typo in 8.2.0 testing steps
* Ensure package names display correctly if only one item is in package (https://github.com/woocommerce/woocommerce-blocks/pull/6815)
* Check package length >= 1 to show package name
* Check shipping rates length in order shipping packages slot
* Fix TS error where boolean value could be undefined
* Show items if there is more than one shipping rate
* Update 8.2.0 testing zip
* Bumping version strings to new version.
* Remove empty element from changelog
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Add toggle control to sidebar in editor.
Adds a visibility toggle in the Mini Cart block's sidebar editor
settings for the block price.
* Update name of hasVisiblePrice attrubite.
Adjusts the name of the hasVisiblePrice attribute to hasHiddenPrice.
This seems a bit easier to reason about, where we can set the default
state of the visibility toggle to 'off'.
* Add conditional price rendering to server side.
Since this is a dynamic block, need to add the condidional attribute
state to the server-side render callback.
* Add price visibility setting to block frontend.
We need to prevent pricec from rendering when hidden setting is active
after the JS kicks in on the frontend (i.e., when the Mini Cart is
interacted with by the user).
* Fix logic error in frontend rendering conditional.
* Add unit tests for both show/hide price states.
* Check package length >= 1 to show package name
* Check shipping rates length in order shipping packages slot
* Fix TS error where boolean value could be undefined
* Show items if there is more than one shipping rate
* Check package length >= 1 to show package name
* Check shipping rates length in order shipping packages slot
* Fix TS error where boolean value could be undefined
* Show items if there is more than one shipping rate
* Try registering the "cart taxes" inner block
Registering server side. This example isn't working, but I'm pushing to
share it and see what's wrong with this implementation.
* Fix registering the cart taxes inner block issue
* Update translation script loading
* Remove unnecessary JS translation
The translation should work fine by getting the title & description from
the `block.json` file
* Put back the initial code in the 'Cart Taxes' inner block
We didn't provide the correct `block.json` file path server side,
that's why the `metadata` wasn't correctly registered
* Generate `block.json`files for inner blocks
This is the first step on fixing the missing translations of `metadata`
in `block.json` files
* Set the folder name exactly the same as the inner block name
We are doing this first test for the `Cart taxes` inner block.
The `Block` & its containing folder need to have the same name for:
- Consistency
- We use the `Block` name to get the file Path
* Update imports after folder renaming
* Get block name directly from the JSON metadata
Getting the block name from the JSON metadata is less error prone than
extracting it from the file path.
And no need to rename all our `inner-blocks` to get the correct
`block.json` path
* Revert folder naming change of `Cart taxes` inner block
Since we are getting the `block` name directly from the `block.json`
metadata instead of extracting it from the file path, there is no need
to keep their names in sync anymore
* Fix missing translations for the `Cart Subtotal` Block
* Register only the client-side settings on the client
When the block is registered on the server, you only need to register
the client-side settings on the client using the same block’s name.
See [docs](https://github.com/WordPress/gutenberg/blob/trunk/docs/reference-guides/block-api/block-metadata.md#javascript-client-side).
* Add schema validation to `block.json`
Development is improved by using a defined schema definition file.
Supported editors can provide help like tooltips, autocomplete, and
schema validation.
* Use the same `editor_script` as the parent block
This prevents WordPress from generating script tags to inexistant
inner blocks JS files
* Add C&C inner blocks in Cart.php & Checkout.php
This is a refactoring to keep the block types controller file less
overloaded
* Fix all Cart inner blocks missing translations
* Create the "AbstractInnerBlock" class
The "Inner Blocks" will use their parent's script, so no need to create
new scripts for each one of them
And, our "Inner Blocks" should always be registered using the metadata file
* Update the "Inner Blocks" PHP classes
* Fix PHP lint erros & update function description
* Fix missing translations bug for all Checkout Inner Blocks
* Update src/BlockTypes/Checkout.php
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
* skip lazy loaded scripts
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
* Add new icon for mini cart block (inserter).
See https://github.com/woocommerce/woocommerce-blocks/issues/6617.
* Adjust size of SVG
The new SVG was rendering a little bit smaller than the original icon.
Potentially because of the mask and the artboard size.
This commit adjusts the size to render at the same size as the original
version of the icon in the inserter.
* All Products: Use block.json to register
* Simplify edit def
* Separate file for save
* No more client-side registration
* Remove uncommented, now-obsolete code
* Add back client-side block registration
* Remove stray textdomain from keywords field
* Add textdomain field
* Set apiVersion to 1
* Get shipping rates from preview cart in editor
* Set showItems in ShippingRatesControl to true if multiple packages
* Move dependency in useShippingData to correct section
* Ensure getting packageData.shipping_rates.length won't error
Searches would keep the case of the user input instead of the original
case of the name. Search still is case insensitive, but preserves
the original item's case.
Also, this PR adds a test for this bug and fixes a previous test case.
* Start using `block.json` and convert to TS the `Product Best Sellers` block
* Update assets/js/blocks/product-best-sellers/edit.tsx
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
* Import props
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
* Added Cross-sells object and schema for the API Cart response.
* Cross-sells are now WC_Product objects that pass through the visibility filter.
* Removed redundant check.
* Updated function doc comment.
* Cleaned up imports.
* Cross-sells item schema (extension of ProductSchema) was removed, and replaced by ProductSchema itself. Cross-sells are direct product representation, and extending this goes out of scope for the task at hand.
* Unit testing for cart response containing cross-sell products.
* Fix loading deps when WordPress is installed in a subdir woocommerce/woocommerce-blocks#6500
Fix loading deps when WordPress is installed in a subdir
* update logic
* price-filter: update URL when filtering products of All Products block.
* active-filters: update the URL when removing price filter
* price-filter: prevent update query on PHP templates when changing prices
* active-filters: on PHP templates, remove filter only triggers the page reload
* price-filter: update comments and naming to reflect new URL behavior
* stock-filter: update url when filtering for All Products block
* attribute-filter: update the URL when filtering for All Products block
* attribute-filter: fix: uncheck all filter doesn't clear the URL
* attribute-filter: fix: endless page reload when filtering for PHP template
* attribute-filter: correctly set the defaults and update the filter query from URL
* fix: filter URL containing stock status doesn't work on homepage
* price-filter: fix issue with URL on All Products
The price slider doesn't reset after removing price filter from the Active Filters block if the initial price filter is set from URL
* ref: passing document.title to pushState is unnecessary
* use replaceState to avoid changing browser history
* extract change URL logic
* Increase `schema_version` to add the new `wc_blocks_use_blockified_templates` flag
If the schema version stored on the db is <= 260 means the plugin is being updated
to the new version and we should keep using the old templates, not the blockified ones.
* After the theme is switched we check if we need to update the flag to
start loading the blockified templates or not.
* Get the templates from the blockified folder if the flag is set to true on the db
* Add temporary blockified template for testing purposes
* Inline variable
* Improve comment
* Use blockified templates on new installs with block themes only
* Don't use blockified templates when switching to a non FSE theme
* Fix condition
* Add tests for the option value
* Move the check to use blockified templates
* WIP
* WIP
* Add migration strategy
* Move the blockified templates to the templates folder and filter them depending on the option
* Fix tests and start using the Options constants
* Fix migration, the `should_use_blockified_product_grid_templates` and tests
* Rename tests and move to Utils folder
* add Migration class test
* try
* remove PHP
* add composer
* Replace the blockified templates with a temporary version
* Fix tests
* add comment
* Add feature gating for experimental builds
* Inject the package to the controller
* test
* Change blocks.ini
* debug
* Remove debug info
* fix test
* fix tests
* try now
* using composer cache
* install deps
* test
* Remove unnecessary extra key
* Add cache actions
* Undo tests change
* Fix readme format
Co-authored-by: Luigi <gigitux@gmail.com>
* update billing address when shipping address gets change in Cart block
* Add a new line to test linting error
* Remove a new line to test linting error
* Fix linting error
* Fix linting error
* Fix linting error by adding a space and removing a comma
* Fix linting error by replacing a space with tab
Co-authored-by: Niels Lange <info@nielslange.de>
* Show classic template in the inserter only for specific templates
* add feature gate
* add todo comment
* rename variable
* address feedback
* not register block on post and page editor
* avoid casting
* Add dry run and simulate release mode woocommerce/woocommerce-blocks#3059
Add dry run and simulate release mode
* execute more svn commands in release mode
* fix boolean
* fix command
* Empty commit for release pull request
* Add changelog for the 7.8.0 release
* Add testing notes for 7.8.0 release
* move legacy payment processing to its own class (https://github.com/woocommerce/woocommerce-blocks/pull/6519)
* update changelog and testing instructions after the cherry-pick
* add link
* Featured Item: Fix colors from default palette not being applied (https://github.com/woocommerce/woocommerce-blocks/pull/6525)
Gutenberg uses two different attributes for text colors:
* `style.color.text`, and
* `textColor`
However, the second one is used only when a color from the default
palette is selected AND the post is saved and reloaded.
With this fix we use the human readable string from the default palette
as a CSS variable.
Please note that while Gutenberg correctly assigns the appropriate CSS
class to render the right color, the problem is that if the color is
handled by a class, it can be overridden for example by themes.
See woocommerce/woocommerce-blocks#6492
* upload new zip
* update changelog
* Revert "Remove Combobox patch (https://github.com/woocommerce/woocommerce-blocks/pull/6465)" (https://github.com/woocommerce/woocommerce-blocks/pull/6531)
This reverts commit 4976afad58.
* upload new zip
* Bumping version strings to new version.
* Fix MD lint errors and fix conflicts
* Empty commit for release pull request
* Release: 7.8.3 (https://github.com/woocommerce/woocommerce-blocks/pull/6602)
* Fix PHP notice in Mini Cart when prices included taxes (https://github.com/woocommerce/woocommerce-blocks/pull/6537)
* Empty commit for release pull request
* Add changelog to readme.txt
* Update versions
* Add Testing steps for version 7.8.1
* Bumping version strings to new version.
* Empty commit for release pull request
* Empty commit for release pull request
* Replace instances of wp_is_block_theme() with wc_current_theme_is_fse_theme() (https://github.com/woocommerce/woocommerce-blocks/pull/6590)
* update changelog and testing instructions
* Empty commit for release pull request
* upload zip
* Bumping version strings to new version.
* Fix images hidden by default in Product grid blocks (https://github.com/woocommerce/woocommerce-blocks/pull/6599)
* update changelog and testing instructons
* Bumping version strings to new version.
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Luigi <gigitux@gmail.com>
* fix MD lint errors
* fix sort deps
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
Co-authored-by: Lucio Giannotta <lucio.giannotta@a8c.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Refactor template title and description loading and search template hierarchy updating
* Remove an unnecessary return
* Fix template descriptions for custom templates
* Fix template description typos
* Move the template description loading logic to mirror the title's
* Remove the descriptions filter and move the search hierarchy code back to a separate file
* Restore the original order of the container registrations
* Restore the product search template slug
* Restore the Product Search Results slug as a constant
Co-authored-by: Luigi <gigitux@gmail.com>
* Fix PHP notice in Mini Cart when prices included taxes (https://github.com/woocommerce/woocommerce-blocks/pull/6537)
* Replace instances of wp_is_block_theme() with wc_current_theme_is_fse_theme() (https://github.com/woocommerce/woocommerce-blocks/pull/6590)
* Empty commit for release pull request
* Add 7.6.1 changelog to readme.txt
* Add Testing steps for version 7.6.1
* Bump versions to 7.6.1-dev
* Update testing ZIP
* Remove wrong testing step
* Bumping version strings to new version.
* Fix images hidden by default in Product grid blocks (https://github.com/woocommerce/woocommerce-blocks/pull/6599)
* update changelog and testing instructons
* Empty commit for release pull request
* upload zip
* update readme
* Bumping version strings to new version.
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Luigi <gigitux@gmail.com>