Shopify / dawn

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

Product Page: Update `View in your space` to match selected 3D model #1860

Open LucasLacerdaUX opened 2 years ago

LucasLacerdaUX commented 2 years ago

Describe the current behavior In Dawn, the View in your space button in the product page always matches the first 3D model regardless of which media is being displayed on the slider.

This was an intentional design decision at the time of its implementation to minimize the JS dependancy, but we can revisit it now that the Slider component has evolved.

Describe the expected behavior In most themes in the Theme Store, whenever the selected media changes to a different 3D Model, the View in your space button is updated to match its id.

If a different type of media like a video or image is selected, the button should revert back to the first 3D model in the product gallery.

Current vs Expected

Version information (Dawn, browsers and operating systems)

mohinht commented 2 years ago

Hello @LucasLacerdaUX

I've resolved the issue in my theme. I've removed the "first_3d_model" AR object. Because in this button, only the "first_3d_model" id is passed. So, I've displayed the "View in your space" button according to each "3d-model" media. Then I can pass each "3d-model media" id.

I think we don't need to show the "View in your space" button for all media. When we select "AR object", we need to show the "View in your space" button for certain "3D-model" media.

Thank you!