* Empty commit for release pull request
* add testing instructions
* add zip file for testing
* update readme
* upload new zip
* Bumping version strings to new version.
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Luigi <gigitux@gmail.com>
* Product Rating: Transition from using CSS margin to Global Styles
* Product Rating: Re-add css margins for Product Rating inside of the All Products block.
* Product Rating: Change bottom margin to 1rem
* Product Rating: Re-add the Classic Template fix.
* Product Rating: Remove the Classic Template fix.
* Product Price: Transition from using CSS margin to Global Styles
* Product Price: Re-add css margins for Product Price inside of the All Products block.
* Product Price: Change bottom margin to 1rem
* Product Price: Fix the margin typescript declaration.
* wip: initial BlockTemplatesCompatibility class
* full support for archive template
* early return
* fix early return using wc conditional functions
* address code review
* remove_default_hooks is only called with inherited block
* refactor the data structure
* shorter hook name
* Move additional hooks to remove_default_hooks
* Update src/Templates/BlockTemplatesCompatibility.php
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
* Add check that is an array
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Scroll to errors when interacting with radio buttons
* Fix full stop wrapping in checkout
* Make type guard for api response reusable
* Merge useShippingData and useSelectShippingRate
Overlapping functionality and responsibility easily merged into a single hook.
* ShippingDataProvider Typescript
* Create errors when receiving errors via thunk
* Update DEFAULT_ERROR_MESSAGE
* Update tests since all errors are set via new action
* Correct SET_ERROR_DATA
* Update json error text and allow it to be dismissed
* Add back missing comment in types
* Put back typedef
* Allow Store Notice Containers to display subContexts without changing original context
* receiveError handles cart
* Update assets/js/data/cart/notify-errors.ts
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Update assets/js/base/context/hooks/shipping/types.ts
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Remove debug
* Revise type (remove as)
* rename to unregisteredSubContexts
* getNoticeContexts comment
* Add test for unregistered errors
* Update comment
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Allow the context to be overridden when processing errors
* Export all error functions
* Allow customer data update if not editing fields
* removeNoticesWithContext Helper
* Hide rates when editing the address
* New update address logic
* Handle cancel for the form
* Block scaffolding
* Rename to store notices
* Register only in the site editor
* Update description
* Add woocommerce class
* Add tests
* Delete old test file
* Update notices message in the editor
* Remove customization
* Disable the block server side
* Fix TS error
* Add custom classes
* Reprashed test description
* Escape notices
* Remove unnecessary disabled component
* Only allow to insert the block once
* Improve class name
* Merge edit and block files
* Fix copy
* Simplify test case
* Remove align support
* Remove attributes
* Change editor markup
* Use the Notice component to display the notice placeholder on the editor
* Use sprintf to improve readability
* Inline component
* Remove styles and unregister scripts
* Use ordered placeholders
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
* Use info as the notices status
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
* Fix php lint error
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
* WIP
* Render in editor and add styles
* Simplify select
* Undo change
* Update titles and description
* Wrapped text for translation
* Remove from products inner blocks
* Allow the block in the inserter
* Rename test file and add new tests for catalog-sorting block
* Register on the site editor only
* Fix tests
* Disable block server side
* Override the `enqueue_assets`
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
* Fix TS error
* Simplify edit
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
* Disable background color
* Add custom classes
* Remove alignment
* Inherit color and font properties
* Merge edit and block files
* Use sprintf to improve code readability
* Make fontsize small by default
* Add order placeholders and woocommerce class
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
* Fix floating issue
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
* Add woocommerce class
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
* Init setup to add a new block Results Count
* Render template part as a content of ResultsCount block
* Switch to template part rendering
* Rename the block to ProductResultsCount
* Fix typo in BlockTypesController
* Change the ProductResultsCount class name
* Remove Product Results Count block from Product Query template
* Improve the way Product Results Count is rendered in the editor
* Add prefix to places that missed renaming from ResultsCount to ProductResultsCount
* Remove unnecessary frontend.tsx file for ProductResultsCount
* Make sure global styles are applied and respected by Product Results Count block
* Make sure the Product Results Count is available inly in Product Catalog template
* Add basic tests to Product Results Count
* Remove empty line in style file
* Fix TS issue in Product Results Count
* Fix typo
* Override the enqueue_assets method to prevent unnecessary enqueue and 404 error on the frontend
* Add necessary property to block's metadata
* Address code review feedback
* Update description
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Remove disabled component
* Improve test description
* Merge edit and block files
* Remove align support
* Remove background support
* Simplify edit component
* Improve readability with sprintf and add custom class
* Simplify test case
* Add styles and order placeholders
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
* Fix markup to match with the frontend
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
Co-authored-by: Alba Rincón <albarin@users.noreply.github.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: Alba Rincón <alba.rincon@automattic.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
* Empty commit for release pull request
* update WooCommerce compatibility
* adding testing instructions
* add zip file testing for the release 9.4.0
* add gif to testing instructions
* remove add to cart testing instructions
* Correctly detect compatible express payment methods (https://github.com/woocommerce/woocommerce-blocks/pull/8201)
* Remove unused action and type action
* Derive the incompatible payment methods with selector
Instead of adding the incompatiblePaymentMethods to the payment state.
Let's simply derive it using a selector to keep a minimal state.
* Check compatibility with express payments
* update testing instructions
* add new zip file for testing
* Refresh shipping cache when saving Local Pickup (https://github.com/woocommerce/woocommerce-blocks/pull/8203)
* invalidate cache on page load
* always flesh settings after save
* use correct prefix
* Account for local pickup rates before disabling shipping in editor (https://github.com/woocommerce/woocommerce-blocks/pull/8207)
* Account for local pickup rates before disabling
* check for local pickup before disabling shipping in editor
* Bumping version strings to new version.
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Luigi <gigitux@gmail.com>
Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
* Add coupon link instead of dropdown in Cart and Checkout blocks
* Fix state names used for displaying the link and coupon form
* Fix storybook for coupon block
* Fix unit test for coupon block
* Fix css and accessibility
* Fix coupon block position on Checkout
* Update e2e test cases for coupon block (https://github.com/woocommerce/woocommerce-blocks/pull/8022)
* Update e2e test cases for coupon block
* Fix perfomance test for coupon block
* Fix double await typo
* Fix perfomance test for coupon block
* Remove CSS
* Use classnames to add and remove classes
Improved the code to use classnames to add and remove classes. Also, moved the logic to handle click and submit to separate functions.
* Remove unused action and type action
* Derive the incompatible payment methods with selector
Instead of adding the incompatiblePaymentMethods to the payment state.
Let's simply derive it using a selector to keep a minimal state.
* Check compatibility with express payments
* Remove unused action and type action
* Derive the incompatible payment methods with selector
Instead of adding the incompatiblePaymentMethods to the payment state.
Let's simply derive it using a selector to keep a minimal state.
* Check compatibility with express payments
Variable products would get added to cart via the button, even
when the button said “Select options” and contained a link.
This was because the button was automatically hydrated
through a CSS class.
Updating the package-lock.json file to fix the nightly build release failed error: npm ERR! `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.
* Custom validation strings using a new function named getValidityMessageForInput
* getValidityMessageForInput tests
* Added integration test for error message
* Clear value
* update test strings
* Shipping and collection method block package support (https://github.com/woocommerce/woocommerce-blocks/pull/7383)
* Shipment wordage
* Hide panel if collection is not available for an item
* Update selection when displayed
* Register a global local pickup method for the block based checkout (https://github.com/woocommerce/woocommerce-blocks/pull/7414)
* Register a blocks local pickup method globally
* Remove local pickup plucking from store api
* Multiple pickup locations
* Unused code
* Translate meta data
* Update UI to match zones table
* Description
* Handle new shipping method in client
* Improve location rendering
* Only split out pickup location methods
* Fix enabled toggle
* Show and hide shipping text in sidebar based on pickup
* No need for "from" when min and max are the same price
* Update sample data for the editor
* fix errors
* Force method/pickup in the checkout layout (https://github.com/woocommerce/woocommerce-blocks/pull/7910)
* Split up ShippingRatesControl for readability
* Alignment styling
* Split tidy packages for readability
* Combine hooks to prevent circular dependency
* Notice styling
* Conflict
* Hide notice with 1 package
Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
* add notice when there are existing enabled legacy local pickups
* Fix PHP warning
* Link though to the settings page
* Fix setting save
* Enabling this will produce duplicate options at checkout.
Co-authored-by: Mike Jolley <mike.jolley@me.com>
* Avoid duplicates in selected shipping method display
* Correct types
* Render pickup locations - not rates
* Always show "from" when there are multiple packages
* Pickup must be available for all packages
* Derive locations from rates
* Improve code style/docs
* Packagecount
* Introduce woocommerce_store_api_cart_select_shipping_rate
* Update docblock
* Move payment methods
* Setup entrypoints
* Sortable implementation
* Sortable
* Basic UI in place for settings
* Hydrate real settings
* Form updates values
* Styling and save button placement
* useSettings hook
* Prepare for save
* delete
* Add location button
* Remove className
* Conditional display of taxes
* Save via API
* Update general settings to designs
* Modal styles
* Style table
* Border colors and radius
* Added e2e tests
* use node 16
* Enqueue states in admin
* Use render from wordpress/element
* Missing handle style
* Enable translations
* Remove curried function
* Todo for inline settings
Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
* Hide form step descriptions when empty unless block has focus
* Make editor style match frontend
* Add links to settings in sidebar
* update sample costs
* phpcs
Break address into multiple pieces for pickup Break address into multiple pieces for pickup Break address into multiple pieces for pickup locations
Apply taxes based on location
Require locations
Customer location tax logic
Improved editing
* Shipment wordage
* Hide panel if collection is not available for an item
* Update selection when displayed
* Register a global local pickup method for the block based checkout (https://github.com/woocommerce/woocommerce-blocks/pull/7414)
* Register a blocks local pickup method globally
* Remove local pickup plucking from store api
* Multiple pickup locations
* Unused code
* Translate meta data
* Update UI to match zones table
* Description
* Handle new shipping method in client
* Improve location rendering
* Only split out pickup location methods
* Fix enabled toggle
* Show and hide shipping text in sidebar based on pickup
* No need for "from" when min and max are the same price
* Update sample data for the editor
* prefersCollection controls shipping visibility
* Remove log
* Create skeleton pickup options block based on shipping methods
* Filter locations to local pickup methods
* Correct case of block name
* Location styling
* Pull pickup details from new core fields
* Fix linting warnings on new types
* Remove blocks_local_pickup check (this does not exist yet)
* Move enable_local_pickup_without_address so it works under all contexts
* Fix display of FREE when there are a mix of prices
* Remove undefined return value
* Update block descriptions
* fix message
* Correct case
Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
* Remove cart notices before showing new ones
* bot: update checkstyle.xml
* Update deps for useEffect
* Remove outdated notices from mini cart
* Add comment to note that this functionality is also present in mini cart
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Convert tabs component to TypeScript
* Add tabs component story
* Add desciptions in comments to the Tab props
* Rename and export tabs component to display descriptions in Storybook
Renamed Tabs component to __Tabs as a sign it should not be used directly. Since we were using withInstanceId as the default export and were not exporting the Tabs component, Storybook could not retrieve the description and default values. We have renamed and exported the component to make sure Storybook can pick up the descriptions and default values.
* Rename exported Tabs component
Changed the exported Tabs component from __Tabs to __TabsWithoutInstanceId to make it more descriptive.
* Use local package rather than WP package in base components
* Missing type on imports
* Move hasSpecingStyleSupport inline to avoid polluting utils with the block-editor external
* Use local wordpress-block-editor import to avoid the external
* Add readme to base directory to warn against using editor/components externals
* Check functions exist
* Revert "Check functions exist"
This reverts commit ce95800b79ddb48369cd22d2b7854384db0d8891.
* Revert wordpress-block-editor import
* Add todos to the hooks that need refactoring
* Update assets/js/atomic/blocks/product-elements/button/supports.ts
Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
* Update assets/js/atomic/blocks/product-elements/image/supports.ts
Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
* Update assets/js/atomic/blocks/product-elements/rating/support.ts
Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
* Update assets/js/atomic/blocks/product-elements/sale-badge/support.ts
Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
* Update assets/js/atomic/blocks/product-elements/title/index.ts
Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
* Reference issue
* Update assets/js/base/README.MD
Co-authored-by: kmanijak <karol.manijak@automattic.com>
* spacing
Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
Co-authored-by: kmanijak <karol.manijak@automattic.com>
* Remove the Products block from WP < 6.0
Too many APIs which are required for the Products block experience
are just plainly unavailable in versions lower than 6.0.
(cherry picked from commit ccfb1210bcbdb14ab52f6f240916fb4fcaa3ff18)
(cherry picked from commit 8c7bcce8218a83a9498943b23c971de1199bcad7)
* Wrap Checkout Edit in SlotFillProvider
Required to render Slot/Fills in the editor
* Remove editor check when rendering ExperimentalOrderShippingPackages
We want to render it in the editor and on the front end, so checking is no longer necessary
* Wrap Cart in SlotFillProvider when in editor
This is so Slot/Fills can be rendered in the preview
* Empty commit for release pull request
* Add changelog
* Add testing notes
* Fix a typo
* load all JSON translation files correctly (https://github.com/woocommerce/woocommerce-blocks/pull/8034)
Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
* Disable Rate Limiting when editing Blocks in admin (https://github.com/woocommerce/woocommerce-blocks/pull/7934)
* Disable Rate Limiting for users who can edit posts
To avoid limiting the number of edits in WP admin to our Woo Blocks, we
need to disable rate limiting altogether.
We simply disabled rate limiting for users who can edit posts!
* Refactor rate limiting code
* Fix disabled rate limiting bug for non admin users
* Refactored applying rate limiting code.
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
* Update woocommerce-gutenberg-products-block.zip
* Update ZIP file
* Add screenshots to testing notes
* Fix markdown linting issues
* Bumping version strings to new version.
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
* Disable Rate Limiting for users who can edit posts
To avoid limiting the number of edits in WP admin to our Woo Blocks, we
need to disable rate limiting altogether.
We simply disabled rate limiting for users who can edit posts!
* Refactor rate limiting code
* Fix disabled rate limiting bug for non admin users
* Refactored applying rate limiting code.
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
* Dependabot: Enable auto-merge on pull requests.
* Update auto-merge dependency list
* Update dependabot documentation and invert the order of the auto-merge action for clarity.
* Filter Rating Block > Prevent reload on select.
* Filter by Stock Block > Prevent reload on select.
* Disable debounce for the editor.
* Filter by Price Block > Prevent reload on select.
* Filter by Attribute Block > Prevent reload on select.
* Make the isEditor and isSelected params optional.
* Make isSelected optional.
* Address CR
* update to use isObject
PHP 8.2 deprecated using ${var} in strings
(https://kinsta.com/blog/php-8-2/#deprecate--string-interpolation). {$var}
should be used instead. This commit fixes the occurrences of ${var} in
woocommerce-blocks to prepare for the next version of PHP which is
scheduled to be released early in December.
I found this in the context of testing MailPoet with PHP 8.2. I'm not
familiar with the woocommerce-blocks so I might be missing something. I did
not test the changes in this commit.
* Set up incompatiblePaymentMethods in data store
* Save incompatible payment methods in data store
* Create the IncompatibilityPaymentGatewaysNotice
* Fix hidden notice bug
* Rename "paymentAdminLink" to GlobalPaymentMethod and move to types dir
* Add all registered methods to incompatiblePaymentMethods state
* Rename selector to getIncompatiblePaymentMethods
* Remove incompatible methods when adding available ones
* Remove unused reducer cases
* Stop adding incompatible methods now that we add them in default state
* Display incompatible methods in the notice from the data store
* Refactor incompatible payment gateways notice
* Update the incompatible extensions notice's design
* Hide Make as default notice
We hide this notice while the notification for incompatible payment
gateways is visible
* Hide the sidebar compatibility notice
Hide this notice while the notification for incompatible payment
gateways is visible. And show it otherwise.
* Capitalize the label for the button on the page settings notice
* Fix missing 'globalPaymentMethods' bug on frontend
* Highlight incompatible payments in sidebar
Highlight incompatible payment gateways within the Payment Options Block
* Rename the incompatible gateways notice's component
* Support plural and singular forms for the notice
* Update incompatible extensions notice's design
* Use the simplified types import
Co-authored-by: Niels Lange <info@nielslange.de>
* Add translation support to notice message
* Fix failing unit tests
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: Niels Lange <info@nielslange.de>
* Display Add Review link in the All Products if there's no product rating in All Products and Products
* Apply the font-size mixin to the Add Review link
* Make Add review link NOT clickable in editor
* Improve styles of Rating component so they support alignment in product grids
* Use Woo Blocks instead Woo core translation
* Activale previously skipped e2e tests
* Adjust loading order of $shared_chunks, $vendor_chunks and $chunks
* Revert chunk order of MiniCart.php
* Render the block in the frontend
* Add icon style selector to Display settings
This adds an icon style selector in which users can choose the customer account link icon.
* Display on the frontend depending on the icon style
* Rename attributes
* Refactor block rendering
* Improve styling
* Add link to account settings
* Split css file
* Switch to SSR
* Add customer account block to header patterns
* Add customer account block to footer patterns
* Adapt minimal header to designs
* Adapt large header to designs
* Adapt header patterns to new designs and format code
* Adapt footer patterns to the designs
* Change display style for the essential header
* Increase alt icon size
* Make the icon resize with the label
* Adjust icon size on headers
* Add padding and move second row to the right
* Remove unused enum
Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>
* Add empty 'Customer Account' block
* Add edit to render the block on the editor
* Add Customer Account icon to @woocommerce/icons library
This icon is used in the Customer Account block.
* Use customerAccount icon in the Customer Account block
* Add Block Settings to Customer Account block
Add Typography and Color settings to the Customer Account block that can be used during Edit mode.
* Add Customer Account style icons
This adds the customer account style icons to be used by the customer account block.
* Render the block in the frontend
* Add Display setting to the Customer Account block
This setting allow users to choose if they want to include an icon with the customer account link.
* Add icon style selector to Display settings
This adds an icon style selector in which users can choose the customer account link icon.
* Display on the frontend depending on the icon style
* Rename attributes
* Refactor block rendering
* Improve styling
* Make the account link dynamic
* Add alignment menu
* Get dashboardUrl with getSettings and add fallback
* Add link to account settings
* Add tests
* Fix test
* Change display title
* Split css file
* Switch to SSR
* Add styles to the front end
* Address latest feedback
* Remove experimental flag
Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>
* Mini Cart block - added notice support woocommerce/woocommerce-blocks#6941
Mini Cart block - added notice support
* set isDismissible to true
* address feedback
* improve layout
* fix style and update close button label
* fix UI when the admin bar is visible
* Split out dismissible notices
* fix css
Co-authored-by: Mike Jolley <mike.jolley@me.com>
* Add cart view switcher
* Attribute based switched POC
* Tidy up view handling
* Mini cart
* Not sure who clint is. Typo - rename to clientId
* Avoid string casting in TS
* Add margin to title
* Set custom source to prevent currentView saving to post content.
Note this also removes `save` which does not exist in Gutenberg.
* Remove higher order component from withViewSwitcher
* Import view switcher in main file
* Add to side effects
* Move view switcher import
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
* Empty commit for release pull request
* Update the readme file with 9.1.1 release changes
* Product Query: Add `Sorted by title` preset. (https://github.com/woocommerce/woocommerce-blocks/pull/7949)
* Add `Sort by title` preset.
* sorted, thanks @nerrad
* Update the readme file with woocommerce/woocommerce-blocks#7949 changes
* 9.1.1 Release: Add testing docs
* Atomic Block: fix ancestor definition (https://github.com/woocommerce/woocommerce-blocks/pull/7947)
* Fix the incorrect layout of Rating and Price in Classic Template and Products block (https://github.com/woocommerce/woocommerce-blocks/pull/7932)
* Fix the incorrect layout of Rating and Price in Classic Template
There were styles required in Rating Filter that were added globally and influenced the layout of Rating in Products block as well as Classic template. The styles were moved to the Rating Filter block
* Add dropdown version of Filter by Stock Status (https://github.com/woocommerce/woocommerce-blocks/pull/7831)
* Extend Filter by Stock Editor options with dropdown and single/multiple choice
* Add dropdown implementation for Filter by Stock Status
* Adjust font-sizes to the rest of the filters
* Add tests to Filter by Stock: dropdown and list variants
* Change test file extension from .js to .tsx, so it handles types as well
* Add E2E test to Filter by Stock checking if display style can be toggled
* When typing in Filter by Stock dropdown, handle the space so it highlights the suggestions
* Change the name of the filter blocks in the test files
* Remove unnecessary waiting step in E2E test for Filter by Stock
toMatchElement waits for an element for 30s by itself, hence waitForSelector usage was removed
* Improve the STOCK_STATUS_OPTIONS type handling
* Extract onDropdownChange function instead of inline arrow function
* Fix overlaping dropdown content with the wrapper when Filter by Stock was set to single
* Product Query: Add patterns (https://github.com/woocommerce/woocommerce-blocks/pull/7857)
* Product Query: First attempt at adding patterns
* Product Query: Update patterns and the default block template
* Product Query: And new and update existing patterns
* Product Query: Adjust layout of the Minimal Product Row pattern
* Product Query: Update pattern names
* Product Query: Polish spaces between blocks inside the patterns
* Product Query patterns: Link product titles and improve spacing between product elements
* Product Query patterns: Button font-size update
* Product Query patterns: Center the pagination
* Product Query patterns: Center the pagination for the default pattern
* Product Query patterns: Remove an empty column
* Product Query patterns: Remove an empty column from the product list with 1:1 images pattern
* Add dropdown version of Filter by Rating (https://github.com/woocommerce/woocommerce-blocks/pull/7771)
* Rename the setting section to match Filter by Attribute
* Add Display Style toggle to the block settings
* Set list as a default value of displayStyle for Filter by Rating
* Add dropdown variant of Filter by Rating
* Extend the Editor settings with selectType: single or multiple
* Adjust the styles of a FormTokenField to other dropdown
* Align Editor settings order and wording between Filter by Attribute and Rating
* Fix the issue with cut off corners of dropdown borders
* Provide translated screen reader messages and placeholder
* Revert the label property, which is necessary to display checkbox list
* Make classname for Rating component optional and remove styling in Filter by Rating
* Cover the case when filter with zero products needs string methods for comparison
* Handle Typescript errors and add ts-ignore annotations when necessary
* Remove explicit key prop assignment in Rating component
* Remove leftover property in type definition
* Refactor JSX element extension with custom properties to more robust way with object copy
* Filter by rating tests (https://github.com/woocommerce/woocommerce-blocks/pull/7845)
* Filter by Rating tests:
- List single
- List multiple
- Dropdown single
- Dropdown multiple
* Adjust the font-size of Filter by Rating dropdown to the rest of the filters
* Fix E2E tests after the Editor settings label has been changed
* Improve sorting in Filter by Rating dropdown
With this change the order of options is always descending: in the chips, suggestions, active filters and URL
* Change the name of the filter blocks in the test files
* Prevent single dropdown input to overflow the wrapper
The issue is fixed in three filters, hence a new shared styles file is created at the path assets/js/blocks/shared/styles/style.css
* Remove the unused styles of active options in Filter by Rating
Chosen options in Filter by Rating list have been bolded. That was the only filter that was doing it. Class was removed, but not the styles themselves which became obsolete. Removing the leftover styles then
* Change the approach of shared styles to fix the dropdown issue in filters
Instead of using direct classes, rewrite it to mixin and include in the filters
* Fix the Filter by Rating with Products block
The problem was with the Products block, that there was incorrect initial value of product ratings query
* Align the logic of getting the filters from URL for Filter by Rating with Filter by Stock
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
* Product Query - Enable "Inherit Query from template" option (https://github.com/woocommerce/woocommerce-blocks/pull/7641)
* Add Inherit Query from template option
* Update label
* Product Elements: Fix block settings (https://github.com/woocommerce/woocommerce-blocks/pull/7914)
* Product Elements: Fix block settings
* Rating: Fix inactive star color
* Product Rating: Fix color inheritance
* StyleAttributesUtils: Fix PHP notices and invalid CSS output (https://github.com/woocommerce/woocommerce-blocks/pull/7909)
* StyleAttributesUtils: Fix PHP notices and invalid CSS output. Closeswoocommerce/woocommerce-blocks#7899.
* StyleAttributesUtils: Fix border radius and width support
* StyleAttributesUtils: Fix border radius and border color support
* StyleAttributesUtils: Include additional checks to deal with PHP warnings
* StyleAttributesUtils: Improve the custom border array check
* Update MiniCart.php to fix price total amount on page load prices are including tax (https://github.com/woocommerce/woocommerce-blocks/pull/7832)
* Update MiniCart.php
Added an update to the '$cart_contents_total' variable on the 'get_cart_price_markup' function if $cart->display_prices_including_tax is active. Currently displaying wrong amount total on page load if items are already in the basket.
* Update MiniCart.php
Removed white spaces?
* Update MiniCart.php
Fixed IF statement
* Remove whitespace at end of line
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Product Query: implement compatibility with Filter by Rating block (https://github.com/woocommerce/woocommerce-blocks/pull/7792)
* Product Query: implement compatibility with Filter by Rating block woocommerce/woocommerce-blocks#7631
Product Query: implement compatibility with Filter by Rating block
* address feedback
* address feedback
* add comment
* add new zip file link
* add missing class
* add testing instructions about woocommerce/woocommerce-blocks#7947
* add new zip file link
* Update docs/internal-developers/testing/releases/911.md
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Update docs/internal-developers/testing/releases/911.md
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Update docs/internal-developers/testing/releases/911.md
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Update docs/internal-developers/testing/releases/911.md
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Update docs/internal-developers/testing/releases/911.md
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Bumping version strings to new version.
* Remove feature flag from Products block (https://github.com/woocommerce/woocommerce-blocks/pull/8001)
* Remove feature flag from Products block
* Remove Products block from feature flags documentation
* Empty commit for release pull request
* Update changelog
* Add zip file link
* Bumping version strings to new version.
* Enable Product SKU and Product Stock Indicator in Core (https://github.com/woocommerce/woocommerce-blocks/pull/8009)
* Update changelog
* Update changelog
* Empty commit for release pull request
* Bumping version strings to new version.
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Daniel Dudzic <daniel.dudzic@automattic.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
Co-authored-by: kmanijak <karol.manijak@automattic.com>
Co-authored-by: Luke O'Regan <oregan.luke@gmail.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Empty commit for release pull request
* Update the readme file with 9.1.1 release changes
* Product Query: Add `Sorted by title` preset. (https://github.com/woocommerce/woocommerce-blocks/pull/7949)
* Add `Sort by title` preset.
* sorted, thanks @nerrad
* Update the readme file with woocommerce/woocommerce-blocks#7949 changes
* 9.1.1 Release: Add testing docs
* Atomic Block: fix ancestor definition (https://github.com/woocommerce/woocommerce-blocks/pull/7947)
* Fix the incorrect layout of Rating and Price in Classic Template and Products block (https://github.com/woocommerce/woocommerce-blocks/pull/7932)
* Fix the incorrect layout of Rating and Price in Classic Template
There were styles required in Rating Filter that were added globally and influenced the layout of Rating in Products block as well as Classic template. The styles were moved to the Rating Filter block
* Add dropdown version of Filter by Stock Status (https://github.com/woocommerce/woocommerce-blocks/pull/7831)
* Extend Filter by Stock Editor options with dropdown and single/multiple choice
* Add dropdown implementation for Filter by Stock Status
* Adjust font-sizes to the rest of the filters
* Add tests to Filter by Stock: dropdown and list variants
* Change test file extension from .js to .tsx, so it handles types as well
* Add E2E test to Filter by Stock checking if display style can be toggled
* When typing in Filter by Stock dropdown, handle the space so it highlights the suggestions
* Change the name of the filter blocks in the test files
* Remove unnecessary waiting step in E2E test for Filter by Stock
toMatchElement waits for an element for 30s by itself, hence waitForSelector usage was removed
* Improve the STOCK_STATUS_OPTIONS type handling
* Extract onDropdownChange function instead of inline arrow function
* Fix overlaping dropdown content with the wrapper when Filter by Stock was set to single
* Product Query: Add patterns (https://github.com/woocommerce/woocommerce-blocks/pull/7857)
* Product Query: First attempt at adding patterns
* Product Query: Update patterns and the default block template
* Product Query: And new and update existing patterns
* Product Query: Adjust layout of the Minimal Product Row pattern
* Product Query: Update pattern names
* Product Query: Polish spaces between blocks inside the patterns
* Product Query patterns: Link product titles and improve spacing between product elements
* Product Query patterns: Button font-size update
* Product Query patterns: Center the pagination
* Product Query patterns: Center the pagination for the default pattern
* Product Query patterns: Remove an empty column
* Product Query patterns: Remove an empty column from the product list with 1:1 images pattern
* Add dropdown version of Filter by Rating (https://github.com/woocommerce/woocommerce-blocks/pull/7771)
* Rename the setting section to match Filter by Attribute
* Add Display Style toggle to the block settings
* Set list as a default value of displayStyle for Filter by Rating
* Add dropdown variant of Filter by Rating
* Extend the Editor settings with selectType: single or multiple
* Adjust the styles of a FormTokenField to other dropdown
* Align Editor settings order and wording between Filter by Attribute and Rating
* Fix the issue with cut off corners of dropdown borders
* Provide translated screen reader messages and placeholder
* Revert the label property, which is necessary to display checkbox list
* Make classname for Rating component optional and remove styling in Filter by Rating
* Cover the case when filter with zero products needs string methods for comparison
* Handle Typescript errors and add ts-ignore annotations when necessary
* Remove explicit key prop assignment in Rating component
* Remove leftover property in type definition
* Refactor JSX element extension with custom properties to more robust way with object copy
* Filter by rating tests (https://github.com/woocommerce/woocommerce-blocks/pull/7845)
* Filter by Rating tests:
- List single
- List multiple
- Dropdown single
- Dropdown multiple
* Adjust the font-size of Filter by Rating dropdown to the rest of the filters
* Fix E2E tests after the Editor settings label has been changed
* Improve sorting in Filter by Rating dropdown
With this change the order of options is always descending: in the chips, suggestions, active filters and URL
* Change the name of the filter blocks in the test files
* Prevent single dropdown input to overflow the wrapper
The issue is fixed in three filters, hence a new shared styles file is created at the path assets/js/blocks/shared/styles/style.css
* Remove the unused styles of active options in Filter by Rating
Chosen options in Filter by Rating list have been bolded. That was the only filter that was doing it. Class was removed, but not the styles themselves which became obsolete. Removing the leftover styles then
* Change the approach of shared styles to fix the dropdown issue in filters
Instead of using direct classes, rewrite it to mixin and include in the filters
* Fix the Filter by Rating with Products block
The problem was with the Products block, that there was incorrect initial value of product ratings query
* Align the logic of getting the filters from URL for Filter by Rating with Filter by Stock
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
* Product Query - Enable "Inherit Query from template" option (https://github.com/woocommerce/woocommerce-blocks/pull/7641)
* Add Inherit Query from template option
* Update label
* Product Elements: Fix block settings (https://github.com/woocommerce/woocommerce-blocks/pull/7914)
* Product Elements: Fix block settings
* Rating: Fix inactive star color
* Product Rating: Fix color inheritance
* StyleAttributesUtils: Fix PHP notices and invalid CSS output (https://github.com/woocommerce/woocommerce-blocks/pull/7909)
* StyleAttributesUtils: Fix PHP notices and invalid CSS output. Closeswoocommerce/woocommerce-blocks#7899.
* StyleAttributesUtils: Fix border radius and width support
* StyleAttributesUtils: Fix border radius and border color support
* StyleAttributesUtils: Include additional checks to deal with PHP warnings
* StyleAttributesUtils: Improve the custom border array check
* Update MiniCart.php to fix price total amount on page load prices are including tax (https://github.com/woocommerce/woocommerce-blocks/pull/7832)
* Update MiniCart.php
Added an update to the '$cart_contents_total' variable on the 'get_cart_price_markup' function if $cart->display_prices_including_tax is active. Currently displaying wrong amount total on page load if items are already in the basket.
* Update MiniCart.php
Removed white spaces?
* Update MiniCart.php
Fixed IF statement
* Remove whitespace at end of line
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Product Query: implement compatibility with Filter by Rating block (https://github.com/woocommerce/woocommerce-blocks/pull/7792)
* Product Query: implement compatibility with Filter by Rating block woocommerce/woocommerce-blocks#7631
Product Query: implement compatibility with Filter by Rating block
* address feedback
* address feedback
* add comment
* add new zip file link
* add missing class
* add testing instructions about woocommerce/woocommerce-blocks#7947
* add new zip file link
* Update docs/internal-developers/testing/releases/911.md
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Update docs/internal-developers/testing/releases/911.md
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Update docs/internal-developers/testing/releases/911.md
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Update docs/internal-developers/testing/releases/911.md
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Update docs/internal-developers/testing/releases/911.md
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Bumping version strings to new version.
* Remove feature flag from Products block (https://github.com/woocommerce/woocommerce-blocks/pull/8001)
* Remove feature flag from Products block
* Remove Products block from feature flags documentation
* Empty commit for release pull request
* Update changelog
* Add zip file link
* Bumping version strings to new version.
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Daniel Dudzic <daniel.dudzic@automattic.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
Co-authored-by: kmanijak <karol.manijak@automattic.com>
Co-authored-by: Luke O'Regan <oregan.luke@gmail.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Rename configurateFilterProductsByAttributeBlock() to configurateFilterByAttributeBlock()
* Rename configurateFilterProductsByAttributeBlock() to configureAttributeFilterBlock()
* Add Mini Cart button styles to Button component
* Add wp-element-button class to Button component
* Don't load opinionated button styles in TT3 and Zaino
* Remove bold styles from Mini Cart buttons
* Refactor Store Notices
Move snackbar hiding filter before notice creation
Implements showApplyCouponNotice
Refactor context providers
Use STORE_NOTICE_CONTEXTS
use refs to track notice containers
Refactor ref usage
Use existing noticeContexts
* Move new notice code to checkout package
* Combine store and snackbars
* Update noticeContexts imports
* Remove context provider
* Update data store
* Fix 502
* Add new error contexts
* Force types
* Unnecessary reorder of imports
* Fix global handling
* Document forceType
* Optional props are undefined
* Remove function name
* Missing condition
* Remove context prop
* Define ACTION_TYPES
* Remove controls
* Update assets/js/base/context/event-emit/utils.ts
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* CONTACT_INFORMATION
* Remove ref from registerContainer
* Abstract container locating methods
* pass context correctly when displaying notices
* Remove debugging buttons
* Update filter usage - remove useMemo so filter can work inline
* Refactor existing error notices from the API (https://github.com/woocommerce/woocommerce-blocks/pull/7728)
* Update API type defs
* Move create notice utils
* Replace useCheckoutNotices with new contexts
* processCheckoutResponseHeaders should check headers are defined
* Scroll to error notices only if we're not editing a field
* Error handling utils
* processErrorResponse when pushing changes
* processErrorResponse when processing checkout
* remove formatStoreApiErrorMessage
* Add todo for cart errors
* Remove unused deps
* unused imports
* Fix linting warnings
* Unused dep
* Update assets/js/types/type-defs/api-response.ts
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Add todo
* Use generic
* remove const
* Update array types
* Phone should be in address blocks
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Update store name to wc/store/store-notices
* Fix assertResponseIsValid
* Funnel woocommerce_rest_invalid_email_address to the correct place
* woocommerce_rest_missing_email_address
* Move comments around
* Move data back into const
* Spacing
* Remove spacing
* Remove forced snack bar and styling
* Move notices within wrapper
* Remove type
* hasStoreNoticesContainer rename
* Group by status/context
* Remove global context
* Remove white space
* remove changes to simplify diff
* white space
* Move comment to typescript
* List style
* showApplyCouponNotice docs
* See if scrollIntoView exists
* fix notice tests
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Respect core settings for showing the Checkout block
* Add account creation option from core to checkout context provider
* Fix TS errors
* Adjust display logic of <LoginPrompt />
* Update assets/js/blocks/checkout/block.tsx
Co-authored-by: Mike Jolley <mike.jolley@me.com>
* Rename <LoginPrompt> to <MustLoginPrompt>
* Show space between login text and login link
* Fix TS error
Co-authored-by: Mike Jolley <mike.jolley@me.com>
* Add receiveCart thunk
* Add mapCartResponseToCart helper
* Add getItemsPendingQuantityUpdate selector
* Update cart resolvers to be thunks
* Remove RECEIVE_CART action and replace with SET_CART_DATA
receiveCart will turn into a thunk.
* Add notifyQuantityChanges functions
* Remove receiveCart from action type definition, replace with setCartData
* Move apiFetchWithHeaders out of controls
This will just be a normal function since we'll be updating actions to thunks which will use this instead of a control.
* Include thunks in actions file
* Update receiveCart action to setCartData
* Update applyCoupon action to a thunk
* Update useStoreCartCoupons to get action from correct place
* Update StoreCartCoupon types
* Add types for Thunk and ThunkReturnType in mapped-types
* Change applyCoupon to a thunk
* Get applyCoupon, removeCoupon, receiveApplyingCoupon from useDispatch
This is to separate the concerns of actions vs. selectors. Previously the actions were fetched during useSelect which is not a pattern we use anywhere else in the codebase. Since we updated the MapToDispatch type, we can now get correctly typed thunks from the data store.
* Improve apiFetchWithHeaders typings
* Convert removeCoupon from generator to thunk
* Add applyCoupon and removeCoupon to CartAction type
* Remove unused old-style type-def
* Add receiveApplyingCoupon & receiveRemovingCoupon to StoreCartCoupon
* Correct issues with StoreCartCoupon type
These were not intended to reflect the actions in data store, rather the functions offered by the useStoreCartCoupons hook.
* Update applyExtensionCartUpdate to a thunk
* Update addItemToCart to thunk
* Add ResolveSelectFromMap type that works with thunks
* Add CartDispatchFromMap and CartResolveSelectFromMap types
We can add this to all data stores to get them working with thunks properly.
* Add docs and update generic name in ResolveSelectFromMap
* Add correct types for thunk resolvers in cart data store
* Update removeItemFromCart to thunk
* Update apiFetchWithHeaders to use generic
* Update selectShippingRate to thunk
* Update resolver tests to test correct thunk functionality
* Update updateCustomerData to thunk
* Update reducer test to reflect new action name
* Update comments on CartDispatchFromMap and CartResolveSelectFromMap
* Add quantity_limits to preview cart
* Make notices speak when shown
* Remove copilot comment
* Add isWithinQuantityLimits function
This is because we shouldn't show a notice if the quantity limits change, but the item's quantity is still OK.
* Add tests for notifyQuantityChanges
* Show notice when multiple_of is updated
* Update test to test for multiple_of changes
* Remove empty export
* Remove controls from cart data store
Not needed anymore since the exported value from the shared-controls file was empty.
* Export a control and async function for apiFetchWithHeaders
This is required because async functions cannot be called from sync generators.
* Use control version of apiFetchWithHeaders in the collections store
* Improve comments and remove incorrect TypeScript
* Update assets/js/data/cart/actions.ts
Co-authored-by: Mike Jolley <mike.jolley@me.com>
* Update ResolveSelectFromMap to include selectors too
* Update TS in actions
* Use finally to remove duplicate code
* remove item pending delete/qty update after action runs in all cases
This will also reset the state when the request to remove it/change quantity errors
* Remove unnecessary type from param.
Not needed because we have TS now. The description can stay though, it is useful.
* Update snackbar wording to use active voice
* Remove old WP version check
* Set max quantity to high number instead of null
This would only happen in a niche case, and would require several TS changes to fix, so it's better to set it as a number here. 9999 should be high enough, and is the default quantity limit set below in get_product_quantity_limit
* Set code on woocommerce_rest_cart_invalid_key to 409
This is so the cart is returned in the response, so the client can update.
* Fix typo in comment and add CartSelectFromMap
* Remove unnecessary docblock
* Add getItemsPendingDelete selector
This is needed so we can show a notice for items that are unexpectedly removed from the cart. We need to know which ones are pending delete so we can skip showing the notice for them.
* Add type for notifyQuantityChanges args and change args to object
* Add notifyIfRemoved function
This will check items that have been removed and show a notice for them.
* Fix TS in receiveCart & pass itemsPendingDelete to notifyQuantiyChanges
* Update wording on removal notice
* Update types for notifyQuantityChanges args
* Update tests to reflect new wording and args being an object
* Check item is truth before running comparison of keys
* Update tests for unexpectedly and expectedly removed items
* Ignore print_r to satisfy phpcs
* Update PHP tests to reflect correct response code when deleting items
* Remove unnecessary controls and dispatch events directly from thunk
Co-authored-by: Mike Jolley <mike.jolley@me.com>
* Convert cart-checkout/totals/shipping component to TypeScript.
* Change hasRates tyep to boolean and fix renderOption type
* fix type for renderOption in ShippingRatesControlProps
* WIP: Make place order editable
* Remove obsolete undefined
* Wrap <ReturnToCartButton> within <Noninteractive>
* Rename const from submitButtonText to paymentMethodButtonLabel
* Simplify defaultValue logic
* Empty commit for release pull request
* Update the readme file with 9.1.1 release changes
* Product Query: Add `Sorted by title` preset. (https://github.com/woocommerce/woocommerce-blocks/pull/7949)
* Add `Sort by title` preset.
* sorted, thanks @nerrad
* Update the readme file with woocommerce/woocommerce-blocks#7949 changes
* 9.1.1 Release: Add testing docs
* Atomic Block: fix ancestor definition (https://github.com/woocommerce/woocommerce-blocks/pull/7947)
* Fix the incorrect layout of Rating and Price in Classic Template and Products block (https://github.com/woocommerce/woocommerce-blocks/pull/7932)
* Fix the incorrect layout of Rating and Price in Classic Template
There were styles required in Rating Filter that were added globally and influenced the layout of Rating in Products block as well as Classic template. The styles were moved to the Rating Filter block
* Add dropdown version of Filter by Stock Status (https://github.com/woocommerce/woocommerce-blocks/pull/7831)
* Extend Filter by Stock Editor options with dropdown and single/multiple choice
* Add dropdown implementation for Filter by Stock Status
* Adjust font-sizes to the rest of the filters
* Add tests to Filter by Stock: dropdown and list variants
* Change test file extension from .js to .tsx, so it handles types as well
* Add E2E test to Filter by Stock checking if display style can be toggled
* When typing in Filter by Stock dropdown, handle the space so it highlights the suggestions
* Change the name of the filter blocks in the test files
* Remove unnecessary waiting step in E2E test for Filter by Stock
toMatchElement waits for an element for 30s by itself, hence waitForSelector usage was removed
* Improve the STOCK_STATUS_OPTIONS type handling
* Extract onDropdownChange function instead of inline arrow function
* Fix overlaping dropdown content with the wrapper when Filter by Stock was set to single
* Product Query: Add patterns (https://github.com/woocommerce/woocommerce-blocks/pull/7857)
* Product Query: First attempt at adding patterns
* Product Query: Update patterns and the default block template
* Product Query: And new and update existing patterns
* Product Query: Adjust layout of the Minimal Product Row pattern
* Product Query: Update pattern names
* Product Query: Polish spaces between blocks inside the patterns
* Product Query patterns: Link product titles and improve spacing between product elements
* Product Query patterns: Button font-size update
* Product Query patterns: Center the pagination
* Product Query patterns: Center the pagination for the default pattern
* Product Query patterns: Remove an empty column
* Product Query patterns: Remove an empty column from the product list with 1:1 images pattern
* Add dropdown version of Filter by Rating (https://github.com/woocommerce/woocommerce-blocks/pull/7771)
* Rename the setting section to match Filter by Attribute
* Add Display Style toggle to the block settings
* Set list as a default value of displayStyle for Filter by Rating
* Add dropdown variant of Filter by Rating
* Extend the Editor settings with selectType: single or multiple
* Adjust the styles of a FormTokenField to other dropdown
* Align Editor settings order and wording between Filter by Attribute and Rating
* Fix the issue with cut off corners of dropdown borders
* Provide translated screen reader messages and placeholder
* Revert the label property, which is necessary to display checkbox list
* Make classname for Rating component optional and remove styling in Filter by Rating
* Cover the case when filter with zero products needs string methods for comparison
* Handle Typescript errors and add ts-ignore annotations when necessary
* Remove explicit key prop assignment in Rating component
* Remove leftover property in type definition
* Refactor JSX element extension with custom properties to more robust way with object copy
* Filter by rating tests (https://github.com/woocommerce/woocommerce-blocks/pull/7845)
* Filter by Rating tests:
- List single
- List multiple
- Dropdown single
- Dropdown multiple
* Adjust the font-size of Filter by Rating dropdown to the rest of the filters
* Fix E2E tests after the Editor settings label has been changed
* Improve sorting in Filter by Rating dropdown
With this change the order of options is always descending: in the chips, suggestions, active filters and URL
* Change the name of the filter blocks in the test files
* Prevent single dropdown input to overflow the wrapper
The issue is fixed in three filters, hence a new shared styles file is created at the path assets/js/blocks/shared/styles/style.css
* Remove the unused styles of active options in Filter by Rating
Chosen options in Filter by Rating list have been bolded. That was the only filter that was doing it. Class was removed, but not the styles themselves which became obsolete. Removing the leftover styles then
* Change the approach of shared styles to fix the dropdown issue in filters
Instead of using direct classes, rewrite it to mixin and include in the filters
* Fix the Filter by Rating with Products block
The problem was with the Products block, that there was incorrect initial value of product ratings query
* Align the logic of getting the filters from URL for Filter by Rating with Filter by Stock
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
* Product Query - Enable "Inherit Query from template" option (https://github.com/woocommerce/woocommerce-blocks/pull/7641)
* Add Inherit Query from template option
* Update label
* Product Elements: Fix block settings (https://github.com/woocommerce/woocommerce-blocks/pull/7914)
* Product Elements: Fix block settings
* Rating: Fix inactive star color
* Product Rating: Fix color inheritance
* StyleAttributesUtils: Fix PHP notices and invalid CSS output (https://github.com/woocommerce/woocommerce-blocks/pull/7909)
* StyleAttributesUtils: Fix PHP notices and invalid CSS output. Closeswoocommerce/woocommerce-blocks#7899.
* StyleAttributesUtils: Fix border radius and width support
* StyleAttributesUtils: Fix border radius and border color support
* StyleAttributesUtils: Include additional checks to deal with PHP warnings
* StyleAttributesUtils: Improve the custom border array check
* Update MiniCart.php to fix price total amount on page load prices are including tax (https://github.com/woocommerce/woocommerce-blocks/pull/7832)
* Update MiniCart.php
Added an update to the '$cart_contents_total' variable on the 'get_cart_price_markup' function if $cart->display_prices_including_tax is active. Currently displaying wrong amount total on page load if items are already in the basket.
* Update MiniCart.php
Removed white spaces?
* Update MiniCart.php
Fixed IF statement
* Remove whitespace at end of line
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Product Query: implement compatibility with Filter by Rating block (https://github.com/woocommerce/woocommerce-blocks/pull/7792)
* Product Query: implement compatibility with Filter by Rating block woocommerce/woocommerce-blocks#7631
Product Query: implement compatibility with Filter by Rating block
* address feedback
* address feedback
* add comment
* add new zip file link
* add missing class
* add testing instructions about woocommerce/woocommerce-blocks#7947
* add new zip file link
* Update docs/internal-developers/testing/releases/911.md
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Update docs/internal-developers/testing/releases/911.md
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Update docs/internal-developers/testing/releases/911.md
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Update docs/internal-developers/testing/releases/911.md
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Update docs/internal-developers/testing/releases/911.md
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Bumping version strings to new version.
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Daniel Dudzic <daniel.dudzic@automattic.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
Co-authored-by: kmanijak <karol.manijak@automattic.com>
Co-authored-by: Luke O'Regan <oregan.luke@gmail.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Add type for lock attribute in isBlockLocked
* Add getMissingBlocks function
* Add findBlockPosition function
* Refactor useForcedLayout to use registry batch & insert multiple blocks
* Improve comment on getMissingBlocks function
* Fix the incorrect layout of Rating and Price in Classic Template
There were styles required in Rating Filter that were added globally and influenced the layout of Rating in Products block as well as Classic template. The styles were moved to the Rating Filter block
* Extend Filter by Stock Editor options with dropdown and single/multiple choice
* Add dropdown implementation for Filter by Stock Status
* Adjust font-sizes to the rest of the filters
* Add tests to Filter by Stock: dropdown and list variants
* Change test file extension from .js to .tsx, so it handles types as well
* Add E2E test to Filter by Stock checking if display style can be toggled
* When typing in Filter by Stock dropdown, handle the space so it highlights the suggestions
* Change the name of the filter blocks in the test files
* Remove unnecessary waiting step in E2E test for Filter by Stock
toMatchElement waits for an element for 30s by itself, hence waitForSelector usage was removed
* Improve the STOCK_STATUS_OPTIONS type handling
* Extract onDropdownChange function instead of inline arrow function
* Fix overlaping dropdown content with the wrapper when Filter by Stock was set to single
* Make Cart and Checkout buttons editable
* Make shopping button editable
* Remove obsolete dot from the “Empty Mini Cart view” title
* Ensure to keep the existing styles
* Improve name of start shopping button label
* Prevent potential TS error
* Edit Proceed to Checkout button
* Don't allow empty button and remove console log
* extract default button label into a variable
* Feedback from Nadir & Niels
Co-authored-by: Niels Lange <info@nielslange.de>
* Product Query: First attempt at adding patterns
* Product Query: Update patterns and the default block template
* Product Query: And new and update existing patterns
* Product Query: Adjust layout of the Minimal Product Row pattern
* Product Query: Update pattern names
* Product Query: Polish spaces between blocks inside the patterns
* Product Query patterns: Link product titles and improve spacing between product elements
* Product Query patterns: Button font-size update
* Product Query patterns: Center the pagination
* Product Query patterns: Center the pagination for the default pattern
* Product Query patterns: Remove an empty column
* Product Query patterns: Remove an empty column from the product list with 1:1 images pattern
* Rename the setting section to match Filter by Attribute
* Add Display Style toggle to the block settings
* Set list as a default value of displayStyle for Filter by Rating
* Add dropdown variant of Filter by Rating
* Extend the Editor settings with selectType: single or multiple
* Adjust the styles of a FormTokenField to other dropdown
* Align Editor settings order and wording between Filter by Attribute and Rating
* Fix the issue with cut off corners of dropdown borders
* Provide translated screen reader messages and placeholder
* Revert the label property, which is necessary to display checkbox list
* Make classname for Rating component optional and remove styling in Filter by Rating
* Cover the case when filter with zero products needs string methods for comparison
* Handle Typescript errors and add ts-ignore annotations when necessary
* Remove explicit key prop assignment in Rating component
* Remove leftover property in type definition
* Refactor JSX element extension with custom properties to more robust way with object copy
* Filter by rating tests (https://github.com/woocommerce/woocommerce-blocks/pull/7845)
* Filter by Rating tests:
- List single
- List multiple
- Dropdown single
- Dropdown multiple
* Adjust the font-size of Filter by Rating dropdown to the rest of the filters
* Fix E2E tests after the Editor settings label has been changed
* Improve sorting in Filter by Rating dropdown
With this change the order of options is always descending: in the chips, suggestions, active filters and URL
* Change the name of the filter blocks in the test files
* Prevent single dropdown input to overflow the wrapper
The issue is fixed in three filters, hence a new shared styles file is created at the path assets/js/blocks/shared/styles/style.css
* Remove the unused styles of active options in Filter by Rating
Chosen options in Filter by Rating list have been bolded. That was the only filter that was doing it. Class was removed, but not the styles themselves which became obsolete. Removing the leftover styles then
* Change the approach of shared styles to fix the dropdown issue in filters
Instead of using direct classes, rewrite it to mixin and include in the filters
* Fix the Filter by Rating with Products block
The problem was with the Products block, that there was incorrect initial value of product ratings query
* Align the logic of getting the filters from URL for Filter by Rating with Filter by Stock
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
* A notice is now displayed in the editor whenever the Filter by Rating block is used in a store that has no products with ratings. Additionally, users can now preview/update the content, settings, and color for the filter even when the store doesn't have any ratings yet.
* StyleAttributesUtils: Fix PHP notices and invalid CSS output. Closeswoocommerce/woocommerce-blocks#7899.
* StyleAttributesUtils: Fix border radius and width support
* StyleAttributesUtils: Fix border radius and border color support
* StyleAttributesUtils: Include additional checks to deal with PHP warnings
* StyleAttributesUtils: Improve the custom border array check
* add more clarity about the responsibility of reviewing/merging the PR on WC Core during the release process
* Update .github/release-initial-checklist.md
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Update MiniCart.php
Added an update to the '$cart_contents_total' variable on the 'get_cart_price_markup' function if $cart->display_prices_including_tax is active. Currently displaying wrong amount total on page load if items are already in the basket.
* Update MiniCart.php
Removed white spaces?
* Update MiniCart.php
Fixed IF statement
* Remove whitespace at end of line
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Update hex color val to currentColor.
* Remove fill attributes on SVG
Having the fill attributes explicitly defined on the SVG was setting the
icon to purple in unexpected cases.
This also reverts the quick attempt to adjust CSS selector for a fix, as
it was the incorrect approach.
* Allows custom validation rules to be applied to fields - in this case, email address
* Add local state to only push valid changes
* Do not need required
* unused isString
* Move to push level
* Update packages/checkout/components/text-input/validated-text-input.tsx
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Update packages/checkout/components/text-input/validated-text-input.tsx
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Update packages/checkout/components/text-input/validated-text-input.tsx
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Update packages/checkout/components/text-input/validated-text-input.tsx
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Validate when the data store changes
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Creates a new block variation based on the core “Post Excerpt” called “Product Summary”.
* Brands it as our old “Product Summary” atomic element.
* Creates a utility function to allow easy creation of such variations.
As much as we can, we should use core blocks when the functionality is mostly overlapping. In the case of the Post Title block, we don't need to add and maintain our own block most likely, so we should just brand the Post Title block instead.
This PR does the following:
* Creates a new block variation based on the core “Post Title” called “Product Title”.
* Brands it as our old “Product Title” atomic element.
* Use this variation as the default within the Product Query template.
* Also removes some old code used for variations before the namespace attribute was available on the core Query Loop and repurposes it to create this variation.
* Product Query: add Feedback Prompt in inspector
The prompt doesn't appear at the very bottom as there isn't
currently any straightforward way to do this in the block variation.
More investigation is required.
* Product Query: Change icon, description and name
* Product Query: switch to Feature plugin flag
* Add all currently available atomic blocks to the default Product Query template
* Update feature flags doc
* Change SKU and Stock Indicator feature flags
* Change feature flags docs
* Add title prop to the `FeedbackPrompt` and add a title to the Product Query one
* Hacky solution to display the feedback block at the bottom
The order of the inspector controls is set in Gutenberg.
We can hack our way down by hooking to the “color” group and
display our feedback there.
Other panels would be displayed below that if added, such as borders
and margin.
* Reduce Product Query default template
* Fix e2e tests after Product Query block name change (https://github.com/woocommerce/woocommerce-blocks/pull/7840)
* Product Query: Add a better default pattern (https://github.com/woocommerce/woocommerce-blocks/pull/7833)
* Product Query: Add a better default pattern
* Product Price: Add bottom margin
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: Daniel Dudzic <daniel.dudzic@automattic.com>