Shopify / dawn

Shopify's first source available reference theme, with Online Store 2.0 features and performance built-in.
Other
2.55k stars 3.46k forks source link

Refactor slider component #2057

Open metamoni opened 2 years ago

metamoni commented 2 years ago

Following a bug where the "Add to cart" button was disabled when the media position changes to "Right", we noticed that the slider component needs some refactoring.

See original comment posted by @ludoboludo in https://github.com/Shopify/dawn/pull/2053#discussion_r999701389_

I guess ideally the right media column would never be a <slider-component>. Only the thumbnails get to be a slider if the desktop layout is set to thumbnail carousel which shouldn't impact the media gallery. Though that would mean a lot of rework and CSS styling tweak most likely.

Vortify-tech commented 3 weeks ago

I have a Dawn theme version 15.2.0 , I added the the option value next to the option name as : Color: red issue is that when i am changing the variant the selected value doesn't change it value until i refresh the page, I uses the attribute data-selected-value in span but this is not working.

Here is my Added attribute:

{{ option.name }}: {{ option.selected_value }}
{% render 'product-variant-options', product: product, option: option, block: block %}

Why the value is not changing on spot?

uniforx commented 2 weeks ago

In addition .. if the variant changes, the custom liquids based on the variant won´t update.

I found a fix for this in an older version of Dawn for myself https://community.shopify.com/c/technische-fragen-antworten/must-reload-product-page-after-changing-variant/m-p/1735157#M18774 BUT this should be fixed for all in the future.