Skip to content

Conversation

@hritikchaudhary
Copy link
Owner

Fixes woocommerce#9627

Changes in the PR:

  • This PR aims to fix all newly detected broken links

WooCommerce Visibility

  • WooCommerce Core
  • Feature plugin
  • Experimental

dinhtungdu and others added 4 commits August 11, 2023 06:28
Co-authored-by: Luigi <[email protected]>

- Updates the `@wordpress/e2e-test-utils-playwright` package to use the npm release.
- Removes hard-coded WP version in `.wp-env.json` to use the latest Core release.
- Fixes failing Playwright tests when using WP 6.3.
- Pins the core version (6.2.2) for Jest E2E tests so they can keep passing. We decided not to fix those tests because we're moving to Playwright.
…#10361)

* Update router to hydrate only interactive regions

* Rename link directive to navigation-link

* Add navigation directives to Query and Pagination blocks

* Enable the Interactivity API by default

* Remove client-side navigation meta tag

* Cache initial regions

* Move data-wc-interactive from query to query-pagination

* Add woo prefix to navigation id

* Add keys and move wc-interactive back to the query block

* Reuse root fragments for each interactive region

* Fix navigation-id retrieval

* Introduce interactivity to Product Collection block and navigation enhancements

This commit brings significant improvements to the ProductCollection block.

1. A new property `parsed_block` is added to the class to hold the block with its attributes before it gets rendered. This allows for more complex manipulations of the block and its attributes.

2. Interactivity has been added to the product collection block. The block is marked as an interactive region so it can be updated during client-side navigation. The `add_navigation_id_directive` method is responsible for adding this functionality. This ensures better UX as users navigate through the products.

3. Navigation links inside the Query Pagination block are also made interactive. The `add_navigation_link_directives` function is responsible for this. All anchor tags in the pagination are given the `data-wc-navigation-link` attribute with relevant navigation payload. This includes prefetching and scroll behavior. The pagination links are given unique keys for 'previous' and 'next' navigation.

4. The `render_block` filter hook has been used to add these functionalities to the product collection and query pagination blocks during render.

* Disable scroll

---------

Co-authored-by: David Arenas <[email protected]>
…e and Text pattern (woocommerce#10479)

* Add placeholder images and update text styles for the Alternating Image and Text pattern.

* Address code review.

* add spacing.

* streamline the styles.
@nielslange nielslange force-pushed the issue/9627-fix-newly-detected-broken-links branch from 3cd0856 to 8cae02f Compare August 11, 2023 09:47
gigitux and others added 25 commits August 11, 2023 14:12
* Fix the `on sale` badge for product blocks

* Fix in the editor
woocommerce#10426)

* Fix incorrect icon color when Product Gallery is selected

* Fix incorrect icon color when block is selected

* Remove unnecessary style

* Fix icon alignment

* Fix alignment for the icon

* Fix icon alignment
* Create wc-all-block-styles chunk with all the styles for classic themes (woocommerce#10543)

* add testing instructions and changelog

* bump version to 10.8.3

* Empty commit for release pull request

* add zip link

* Fix the `on sale` badge for product blocks (woocommerce#10550)

* Fix the `on sale` badge for product blocks

* Fix in the editor

* Update changelog and testing instructions

* update zip link

* fix testing instructions

---------

Co-authored-by: Luigi Teschio <[email protected]>
Co-authored-by: github-actions <[email protected]>
Co-authored-by: Alba Rincón <[email protected]>
* Fix express button display in the Cart block

When multiple buttons are displayed they don't appear stacked. This PR fixes a regression;

* Fix editor experience
…10532)

* Create selectAndVerifyShippingOption method

* Add goToCheckout util

* Add emptyCart util

* Add selectAndVerifyShippingOption to FrontendUtils class

* Add initial checkout shopper test file and a shipping options test

* Remove selectAndVerifyShippingOptions from frontendUtils

* Re-add selectAndVerifyShippingOption to checkout block test

* Move cart and checkout blocks into their own directories

* Create CheckoutPage class to keep utils for checkout

* Use CheckoutPage class in Checkout tests

* Update name of test suite

* Remove nested describe

* Move to correct folder, make selectAndVerifyShippingOption return

* Remove networkidle and goToCheckout from frontendutils

* Add placeOrder util

* Add fillBilingDetails util to checkout page

* Add fillShippingDetails util to checkout page

* Add fillInCheckoutWithTestData util to checkout page

* Add checkCustomerPushCompleted util to checkout page

* Change test to focus on free shipping and flat rate in separate tests

* Instead of waiting for selector, just wait for the shipping name

* Check element visibility instead of count

* Use postcode id rather than autocomplete value

* Don't instantiate FrontendUtils

* Delete tests that have been moved to playwright

* Add test to side effects project because it adds items to cart

* Remove unused method

* Go to cart page before removing items

This is to ensure the cart data store is loaded

* Empty cart before proceeding with tests

* Re-implement goToCheckout to frontendUtils

* Remove check for whether customer data has been pushed

Rely instead on order complete page to check for address details.

* Ensure request to set shipping option is complete

* Get email address from page not billing form (its not there)

* Move testData to class property

* Add verifyAddressDetails util

* Make test check for setting different addresses and shipping in same run

* Remove User can have different shipping and billing addresses from jest

* Pass in playwright's request to the frontend utils file

* Update emptyCart function to use API requests to empty the cart

* Pass request utils to frontendUtils class

* Update frontendUtils to use requestUtils for API requests
…mmerce#10515)

* Open links from the Editor in the top frame, not editor iframe

* Remove leftover

* Change the _top to _blank for external links
…merce#10540)

* Add E2E tests for Product Collection with Compatibility Layer

* Remove unnecessary changes

* Rename the file so it covers side effects and improve imports

* Rename the file to the correct suffix - side_effects instead of side-effects
* Product-details: Add margin spacing controls

* Add additional div to allow custom styling
…0636)

* Remove client side navigation from Products beta block

Changes:
- Removed the `add_navigation_id_directive` method and its associated filter. This method previously added a `data-wc-navigation-id` attribute to the query block for client-side navigation, which is no longer required.
- Removed the `add_navigation_link_directives` method and its associated filter. This method previously added interactive directives to pagination links inside the Query Pagination block. This specific functionality has been removed as it is no longer needed.
- Introduced a new method `mark_block_as_interactive`, which is designed to mark the Product Query as an interactive region so that interactive elements can work inside it. This is achieved using the 'data-wc-interactive' attribute.

* add data-wc-interactive to product button block

* Remove unnecessary code

As we have added `data-wc-interactive` on Product button therefore we don't need to add it in Product Query block.

* Boolean attribute doesn't need explicit value equal to true

* Skip failing i18n-related E2E tests

* Skip failing i18n-related E2E test

---------

Co-authored-by: Luigi <[email protected]>
Co-authored-by: Niels Lange <[email protected]>
* Fix "On sale" badge class for shop

* Add class to sale badge
@nielslange nielslange force-pushed the issue/9627-fix-newly-detected-broken-links branch from 334d75d to eefe8e8 Compare August 17, 2023 14:46
nefeline and others added 8 commits August 17, 2023 15:04
…th (woocommerce#10600)

* Testimonials Single Pattern: Update the styles for the image and add and alt text.

* Update the layout type of the comlumn iwth the content to constrained and update padding to 32px for the columns wrapper.

* Vertical align image to the center.
…ction (woocommerce#10267)

* WIP of Upgrade Notice state

* Extend the state options with seeing option

* Move the logic to the dedicated folder

* Subscribe only if not reverted

* Refactor the way UpgradeNotice is rendered

* Simplify the logic of keeping the Upgrade Notice state in local storage

* Improve types organisation

* Lift the functions interacting with local storage to the Inspector Controls of Product Colelction

* Simplify logic of showing Upgrade Notice

* Disable auto migration

* Refactoring

* Use useLocalStorageState hook

* Fix incorrect merge

* Final improvements

* Allow to display Upgrade Notice after revert and manual upgrade

* Fix incorrect merge

* Improve the unsubscribe process

* Trigger auto-update from Product Collection only

* Remove weird console.log

* Abstract manual update from Product Query

* Fix the taxQuery migration from Product Collection to Products

* Product Collection - logic to hide upgrade notice (woocommerce#10494)

* Add timestamp to each upgrade notice status change

* Revert back only Product Collections converted from Products block

* Make the time threshold configurable

* Add logic that hides the Upgrade Notice after some amount of displays

* Fix the taxQuery migration from Product Collection to Products

* Change the way to count Product Collection entries

* Fix the problem of multiple display counter increments with Product Collection

* Update Upgrade Notice visibility conditions

* Add contiions to unmark Product Collection as converted from Products

* Change variable name

* Change variable t to time name for better readibility. Improve types

* Replace useState with useRef

* Remove unecessary props passed to UpgradeNotice
* load Interactivity API in Bootstrap.php file

* fix comment

* update visibility function

* remove blank line

* remove comment

* remove logic to not load Interactivity API
…commerce#10641)

* Fix: Made migration migrate block templates in the current theme

* Update src/BlockTemplatesController.php

Co-authored-by: Paulo Arromba <[email protected]>

* Move migration and status codes to BlockTemplateMigrationUtils

---------

Co-authored-by: Paulo Arromba <[email protected]>
@nielslange nielslange force-pushed the issue/9627-fix-newly-detected-broken-links branch from eefe8e8 to 01979cd Compare August 21, 2023 09:09
kmanijak and others added 5 commits August 21, 2023 13:52
…erce#10674)

* Create the new patterns dictionary

* Fix prompts and keys
… block themes (woocommerce#10608)

* Skipped requests regarding WP/WC setup, to avoid issues with the pages not existing yet when migrating page content to templates.

* Skipped requests regarding WP-CLI to avoid issues with the pages not existing yet when migrating page content to templates.

* Added check for woocommerce_db_version option

* Add check for occurred migration to skip template injection

* corrected if clause

* Update src/BlockTemplatesController.php

Co-authored-by: Mike Jolley <[email protected]>

* Added maintenance mode to migration exception. Added trace value to has_migrated options

* Merge with new migration logic.

* Set correct post terms for wp_template content

* updated comment

---------

Co-authored-by: Mike Jolley <[email protected]>
…rce#10555)

* Prevent block from loading frontend scripts

* Fix issue with Product Gallery not being registered on the Editor

* Fix php cs error
@nielslange nielslange force-pushed the issue/9627-fix-newly-detected-broken-links branch from 01979cd to 7e8c5d0 Compare August 22, 2023 07:58
@nielslange nielslange force-pushed the issue/9627-fix-newly-detected-broken-links branch from 7e8c5d0 to 552f936 Compare August 22, 2023 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.