* Remove data attributes from being saved in html of All products block
* added old save in deprecated
* Addressed review comments
---------
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
Co-authored-by: Roy Ho <roykho77@gmail.com>
* Remove order and checkout order endpoint feature flag
* Remove Order Route and Checkout Order Route from experimental flag list
* Remove order and checkout order endpoint feature flag
* Remove Order Route and Checkout Order Route from experimental flag list
* Update e2e tests selector
* Revert "Update e2e tests selector"
This reverts commit 2a6b561a883c701be1da2ffc39200cd19a85f1e3.
---------
Co-authored-by: Niels Lange <info@nielslange.de>
* Fix bug, it was always returning {'ai_content_generated':true} even in case of error
* Refactor PatternImages to extract static helper method to PatternImagesHelper and rename to PatternUpdater
* Fix use on patterns
* Update the pattern content using AI as well
* Make API requests in parallel
* Fix prompt and update patterns with generated content
* Return default content if patterns content is empty
* Fix patterns and failed responses
* Add timeout to the request multiple function
* Replace square by landscape
* Remove todo
* Return error on content update error
* Ensure the pattern content exists within the wc_blocks_patterns_content option: if it doesn't exist, fetch the default content from the default dictionary instead.
---------
Co-authored-by: Patricia Hillebrandt <patriciahillebrandt@gmail.com>
* Add condition to register blocks and variation in single product template
* Improve the fix by providing default ancestor value to block registered for single product
* add E2E test
* add insert block
---------
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
* Product Gallery: Fix conflicts between block settings and CSS
* Product Gallery: Final CSS polishes
* Product Gallery: Minor CSS refactor
* Product Gallery: Revert the minor css refactor
* add custom class on the main div
* Product Gallery: Combine inner block styles and optimize them
* Product Gallery Inner Blocks: Remove imports to no longer existing stylesheet files
* Product Gallery: Change all references from wp-block to wc-block
* Product Gallery Inner Blocks: Remove loading of non-existent inner blocks stylesheet files
* Product Gallery: Add additional class to ensure correct width for single product gallery despite of the Next/Previous mode selected
* Product Gallery: Add final polishing
* fix zoom
* Product Gallery Thumbnails: Fix css
* Product Gallery Large Image Next Previous Buttons: Skip failing tests
---------
Co-authored-by: Luigi <gigitux@gmail.com>
* Upgrade terser-webpack-plugin to version 4.2.3
* Upgrade webpack-bundle-analyzer to 4.7.0
* Upgrade to Webpack version 5
* Upgrade @wordpress/dependency-extraction-webpack-plugin to 4.6.0
* Upgrade dependency copy-webpack-plugin to version 11.0.0
* Upgrade dependency terser-webpack-plugin to version 5.3.6
* Replace webpack-rtl-plugin with the new @automattic/webpack-rtl-plugin
* Replace module.issuer with the new ModuleGraph API
There is a warning appearing in the console when running the application. This is due to the fact that the module.issuer has been deprecated on Webpack 5 and replaced with the new ModuleGraph API. This commit replaces the deprecated API with the new one.
* Upgrade babel and babel plugins to latest version
* Replace jsonpFunction with the new uniqueName property
Add a unique name of the webpack build to avoid multiple webpack runtimes to conflict when using globals. It defaults to output.library name or the package name from package.json in the context, if both aren't found, it is set to an ''.
* Replace cacheDirectory inline configuration with options.cacheDirectory
* Upgrade @wordpress/e2e-tests dependency to version 5.6.0
* Remove babel-plugin-transform-react-jsx dependency
Remove babel-plugin-transform-react-jsx dependency because it is already included in @wordpress/babel-preset-default
* Remove unnecessary Babel dependencies
Remove some unnecessary babel dependencies that are already included in the @babel/preset-env package.
* Upgrade puppeteer dependency to version 16.2.0
* Remove caret from package.json dependencies
* Fix Storybook build error
This commit fixes the Storybook build error that was being caused because of Storybook by default uses Webpack 4, but since we are currently upgrading our webpack to version 5, we need to install some required dependencies and also explicitly tell Storybook to use Webpack 5.
* Fix package-lock.json after merging with trunk
* Add own webpack-rtl-plugin implementation to the project
Before upgrading Webpack to version 5, we were using the original `webpack-rtl-plugin` released by Romain Berger; unfortunately, this plugin is not compatible with Webpack 5, so we replaced it with `@automattic/webpack-rtl-plugin`. The problem is that `@automattic/webpack-rtl-plugin` by default generates files with the '.rtl.css' suffix and does not provide a way to change that.
This commit adds our own implementation of the `webpack-rtl-plugin` (adapted from `@automattic/webpack-rtl-plugin`) that is compatible with Webpack 5 and allows us to change the suffix of the generated files to follow the recommended way defined by Wordpress (https://codex.wordpress.org/Right-to-Left_Language_Support)
* Change conditional clause to be multiline
* Fix package-lock.json after merge with trunk
* Fix package-lock.json after merge with trunk
* Rename files to fix ESLint errors
This commit renames files that have the .js extension but contain JSX code. This is causing ESLint to throw errors because by default our Eslint configuration expects only files with the .jsx extension to contain JSX code.
* Fix package-lock.json file
* Add is-plain-obj module to the transformIgnorePatterns of jest config
* Update package-lock.json
* Fix package-lock.json
* Upgrade @wordpress/i18n dependency to version 4.31.0
* Update package-lock.json
* Update composer lock file
* Fix Webpack config for Webpack 5
* Add the package-lock.json
* Remove unsupported config from webpack
* Fix error with Webpack build
* Add wait for network idle to the tests
* Attempt to fix e2e test
* Restore promise.all
* Upgrade puppeteer to v17.1.3
* Upgrade expect-puppeteer
* Update expect-puppeteer
* Downgrade expect-puppeteer
* Revert "Upgrade puppeteer to v17.1.3"
This reverts commit 61ed52a56f131961f3970b6fb22cdd8b540bada3.
* Upgrade Puppeteer to version 17.1.3
* Fix executionContext.frame is not a function error
* Fix e2e tests
* Remove isExperimentalBuild from Product Gallery inner blocks
* Upgrade Webpack and Webpack-cli to latest version
* Upgrade postcss and mini-css plugins
* Fix error with mini-cart block
* Fix styling error with filter blocks
* Fix issue when running unit tests
* Fix storybook script not loading
* Fix a11y issue in Storybook
* Fix error when multiple isExperimentalBuild was being used
* Prevent error when layout is not present in the attributes object
* Update `chunkIds` to `named` in Webpack
* Add cache groups to the Webpack configs
* Main block types for confirmation
* Initial blocks
* Styling and placeholders
* Make blocks experimental
* Update summary icon
* Add name/description for status block and missing text descriptions in the block.
Closeswoocommerce/woocommerce-blocks#10057
* Order confirmation: Convert Order Details Templates to Blocks (https://github.com/woocommerce/woocommerce-blocks/pull/10095)
* Move code from templates into the details block
* Details -> Totals
* Downloads block
* Sample content for downloads block
* Add block icon
* Add conversion template (https://github.com/woocommerce/woocommerce-blocks/pull/10077)
* Update inner block name
* Add default title constant
* Revert "Add default title constant"
This reverts commit 1dd3bbfecc1be83c367b1ab064f5032ea58cb678.
* Add global styles for order confirmation status block (https://github.com/woocommerce/woocommerce-blocks/pull/10164)
* Implement style controls
* Prevent link color spilling over onto wrapper
* Add styles and remove class names
* Remove __experimentalWritingMode
* Add global styles for order confirmation summary block (https://github.com/woocommerce/woocommerce-blocks/pull/10179)
* Styles for summary
* Remove __experimentalWritingMode
* Add table styles for order details (https://github.com/woocommerce/woocommerce-blocks/pull/10185)
* Add table styles for order details
* __experimentalFontWeight
* Add link styles
* Handle preview link styles
* Unauthenticated views for Order Confirmation template (https://github.com/woocommerce/woocommerce-blocks/pull/10414)
* Different views by permission
* check user id matches when logged out
* Add order confirmation wrapper block (https://github.com/woocommerce/woocommerce-blocks/pull/10286)
* Add a heading wrapper block
* Register the BillingWrapper Block server side
* Fix exception 'render_content' error
* Add the Billing Wrapper Block to the template
* Fix wrong block name error
* Fix php error
* Conditionally render Billing Address within the Wrapper
* Fix parent rendering
* Clean up code (remove billing address from the template)
* Update titles, descriptions, and icons of the billing Block and inner block
* Fix broken block by removing the "parent" keyword
* Use a user-friendly title and description for the Billing Wrapper
* Update Billing Wrapper Block's title case
Co-authored-by: Mike Jolley <mike.jolley@me.com>
* Fix PHP failing unit test
---------
Co-authored-by: Mike Jolley <mike.jolley@me.com>
* Remove "thanks" for authenticated page
* Introduce shipping wrapper based on billing wrapper
Closeswoocommerce/woocommerce-blocks#10053
* Order confirmation block: Verify email address for guest customers (https://github.com/woocommerce/woocommerce-blocks/pull/10567)
* Add verify step for guest orders
* Render content to pass through block content
* Revert package changes
* Customer orders cannot use email to verify
* Add style controls for order shipping and billing address blocks (https://github.com/woocommerce/woocommerce-blocks/pull/10633)
* Order confirmation block styling (https://github.com/woocommerce/woocommerce-blocks/pull/10780)
* Add missing heading to order details
* Summary block spacing
* Update css variables
* table styles
* Inherit border styles for cells
* Alignment and address styles
* Add downloads wrapper
* Style controls
* Fix typo
* Update Download Wrapper's Icon
* Fix TS error
* Disable Download Block's server side rendering in the editor
This fixes the loading after each style change from the style controls
* Clean up Downloads render functions
* Fix client side Downloads Block's table border
* Download + Total wrappers and tables styling
* small screen
* Remove server side render for previews
---------
Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
* Shorten template description
* Update test address data
* Avoid leaking order key in permission form
* Remove todo
* Make email form required.
* Remove edit page link
* Remove empty columns from address wrapper
* Remove IIFE
* typo
* Update description to mention billing
* Adjust link scss
* Fix wrapper markup and spacing controls
* Add link preview in editor
* Add initial E2E setup for the Order Confirmation Block (https://github.com/woocommerce/woocommerce-blocks/pull/10840)
* Fix WC_DateTime check
* Move form outside of block markup
* Add additional information block (https://github.com/woocommerce/woocommerce-blocks/pull/10842)
* Add block which contains hooks
* Use skeleton for placeholder instead of illustration
* Remove duplicate methods
* Remove duplicate align tag
* Update meta styles
* Tests for order confirmation conditional blocks (https://github.com/woocommerce/woocommerce-blocks/pull/10972)
* Add tests for conditional blocks
* Move setup into test
* Add E2E to the the Order Confirmation Block (https://github.com/woocommerce/woocommerce-blocks/pull/10863)
* Add editor util functions
* Update editor template E2E test
* Add the "exact" property for consistency
* Skip test
Can't get the element in the page. More investigation needed! Skipping
for now.
* Fix "transformIntoBlocks" logic
* Add tests for logged in user
* Fix "beforeAll" config
* Confirm downloads section is visible when logged in
* Create "verifyOrderConfirmationDetails" util function
* Add logged in test case
* Add Guest user test case
* Fix editor e2e testing
* Apply a proper teardown
* Fix failing tests after logout
* Ensure we are logged in before visiting the editor
* Ensure to have shipping selected
* Wait for changes to be saved on the editor
* Ensure shipping options is selected
* Remove comment
* Ensure we are logged in before going to the admin page
* Mark the Order Confirmation as a side effect test
* OrderConfirmation blocks are not experimental
* resolve merge conflict
* Revert package lock changes
* Fix enqueue_assets
* Fix CSS 404s
* Make template tests more robust
* Fix page URL for default confirmation page
* Try afterEach to log back in
* Skip guest/logout use cases
Login out causes other tests to fail. We will implement these case when
the multiple sign in roles are introduced in the codebase.
* Remove tests requiring login out & add comments
* Remove unused util functions
* Hide confirmation blocks from post editor
---------
Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
* Add escaping to unescaped style attribute variable
* Empty commit for release pull request
* update testing instructions
* bump version to 11.1.1
* add zip link
---------
Co-authored-by: Daniel W. Robert <danielwrobert@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Luigi <gigitux@gmail.com>
* Fix "On sale" badge class for shop
* Add class to sale badge
* Product Gallery Thumbnails: Remove empty markup from the frontend when no thumbnails are present
* Product Gallery Thumbnails: Minor null coalescing operator improvement
* Product Gallery Thumbnails: Remove the Thumbnails markup if there's only one image present
* Product Gallery Thumbnails: Minor null coalescing operator improvement
---------
Co-authored-by: Alba Rincón <alba.rincon@automattic.com>
Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>
* Features Flags and Experimental Interfaces doc: Update blocks behind the experimental flag
* Product Gallery Next Previous: Add missing experimental flag
* Rename checkout template slug
* Remove redirect and custom title
* Classic shortcode block for checkout
* Empty title
* WIP placeholder
* Change blockified template
* Prefix cart and checkout templates with "Page: "
* Template migration routine
* Apply same treatment to cart template
* Notices
* Update placeholder text
* Classic shortcodes block
* Page content wrapper for templates
* Update default
* Do not save attributes
* Update templates
* Remove cart classic template
* Reverted endpoints for Cart & Checkout templates. This reverts PR 9406
* Migrate page content wrapper.
* Removed useless method arg. Minor tweaks.
* Skip migration if the theme has a template file for this page.
* Removed impossible condition.
* Migrate page content wrapper.
* Remove TemplateNotice in favour of DefaultNotice
* Documentation links in shortcode placeholder
* Hide cart and checkout page selector when using block themes
* Unused var
* Add tests for template changes
* Revert changes to classic-template
* Allow frontend redirect
* Unused file
* Bump version for updater
* Support x template naming as well as page-x
* Need to add item to cart to test checkout
* Fix header test by fixing utility for adding to cart
* Remove permalink tests
* Click body
* Wait for content to finish loading
* Wait for add to cart response when adding to cart without item name
* Wait for save before visiting frontend
* Set content instead of inserting block
* Perform test in site editor rather than page editor
* Prevent notice to set the default cart/checkout page from showing on the site editor.
---------
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
* Prevent changes in the selected shipping method when new rates are added or removed.
* Fix spacing as per the coding standards
* Remove additional new line space.
* Add the Verticals API client
* Add tests
* Refactor error handling
* Create first version of the prompt class
* Improve Vertical selector and add tests
* Remove testing code
* Update class comment
* Add PatternImages class
* Pass the dictionary as param
* Add tests
* Add `get_pattern_images` function and use it on patterns
* Add the Jetpack Connection Package as a dependency for WooCommerce Blocks.
* Introduce the new Configuration Class for registering and enabling the Jetpack connection for sites and users.
* Introduce the Connection class for making requests to the GPT AI API.
* Update the get_jwt_token method.
* Update the error messages for the get_jwt_token method.
* Update the register_site method.
* Update the Configuration class structure and add Dependency Injection.
* Update structure for the Connection Class.
* Update the return type for the get_jwt_token method.
* Update method visibility for get_site_id
* Update the name and params for methods within the Connection Class
* Add tests for the Connecction class.
* Update the Constructor for the Configuration class.
* Add the Patterns class.
* Move the get_image_url function to the PatternImages class and update the call in all patterns to address errors.
* Remove the functions.php file
* Update the VerticalsSelector class.
* Update the constructor for PatternImages.
* Update the Store API Route for Patterns.
* Update the create_patterns_content method to ensure it returns the results of update_option.
* Add the new Patterns route to the RoutesController class.
* Update the route path and remove the business description validation as that is done via create_patterns_content
* Introduce the PatternsSchema
* Update the prompt, errors messages and output format for the Verticals Selector.
* Fix the missing file error for the Patterns Dictionary.
* Introduce the new get_patterns_dictionary method and update the create_patterns_content method to better handle errors.
* Update the returned response for the endpoint.
* Add the get_item_response method to the PatternsSchema class.
* Update response for when allow_ai_connection option is not set.
* Enable authentication for the endpoint.
* Modify and temporarily remove some failing tests for the AI API: a separate PR will be opened to clear those out later.
* Add validation to the verticals_id.
* Remove reference to the src/Patterns/functions.php file.
* Update `alt` to be more generic, since the displayed images will vary
* Store Customization > Schedule an action to update the patterns content whenever the business description is changed (https://github.com/woocommerce/woocommerce-blocks/pull/10956)
* Introduce the new OptionUpdate class.
* Update the path to action schduler and add a file_exists check before attempting to schedule the action.
* Update the content in patterns from the BlockPatterns class instead.
* Remove return comment
---------
Co-authored-by: Alba Rincón <alba.rincon@automattic.com>
---------
Co-authored-by: Patricia Hillebrandt <patriciahillebrandt@gmail.com>
* Add the Jetpack Connection Package as a dependency for WooCommerce Blocks.
* Introduce the new Configuration Class for registering and enabling the Jetpack connection for sites and users.
* Introduce the Connection class for making requests to the GPT AI API.
* Update the get_jwt_token method.
* Update the error messages for the get_jwt_token method.
* Update the register_site method.
* Update the Configuration class structure and add Dependency Injection.
* Update structure for the Connection Class.
* Update the return type for the get_jwt_token method.
* Update method visibility for get_site_id
* Update the name and params for methods within the Connection Class
* Add tests for the Connecction class.
* Update the Constructor for the Configuration class.
* Add the Patterns class.
* Update the VerticalsSelector class.
* Update the constructor for PatternImages.
* Update the Store API Route for Patterns.
* Update the create_patterns_content method to ensure it returns the results of update_option.
* Add the new Patterns route to the RoutesController class.
* Update the route path and remove the business description validation as that is done via create_patterns_content
* Introduce the PatternsSchema
* Update the prompt, errors messages and output format for the Verticals Selector.
* Fix the missing file error for the Patterns Dictionary.
* Introduce the new get_patterns_dictionary method and update the create_patterns_content method to better handle errors.
* Update the returned response for the endpoint.
* Add the get_item_response method to the PatternsSchema class.
* Update response for when allow_ai_connection option is not set.
* Enable authentication for the endpoint.
* Modify and temporarily remove some failing tests for the AI API: a separate PR will be opened to clear those out later.