woocommerce / pinterest-for-woocommerce

A native Pinterest integration for WooCommerce. Development is managed by Ventures.
https://woo.com/products/pinterest-for-woocommerce/
GNU General Public License v3.0
22 stars 9 forks source link

Add Twenty Twenty-Four compatibility. #975

Closed budzanowski closed 3 months ago

budzanowski commented 3 months ago

Changes proposed in this Pull Request:

Closes #973 .

The absolute positioning of the element does not work with Twenty Twenty-Four because the immediate parent is not a positioned element in this theme.

The element is positioned relative to its closest positioned ancestor (if any) or to the initial containing block. Its final position is determined by the values of top, right, bottom, and left.

From https://developer.mozilla.org/en-US/docs/Web/CSS/position#absolute

For this reason we need to detect the new parent .wp-block-post.product and unset position values. We are sill leaving the absolute label to keep the button stacked over the image on hover.

Screenshots:

image

Detailed test instructions:

  1. Switch to Twenty Twenty-Four
  2. Hover over a produc
  3. Pin button should be visible an clickable
  4. Repeat with Storefront to confirm that there is no regression