feat: add slider on gallery images#4446
Conversation
|
@girishpanchal30, Could we remove the text like “Slide 1 of 6” that appears in the mobile view?
|
|
@vytisbulkevicius, are we going to provide this feature in Neve free theme? I noticed that the gallery layout and gallery slider options are already available through the Sparks plugin.
@girishpanchal30, When the Sparks plugin is active, there are a few conflicts:
|
|
@poonam279 yes, this should be available in Free. It's fine to still have the option in Sparks to control it, I forgot about this as well actually but I don't see a problem having it in Sparks with control. |
package.json
Outdated
| "gzip": false, | ||
| "running": false, | ||
| "limit": "33 KB", | ||
| "limit": "34.1 KB", |
There was a problem hiding this comment.
Here we have a little bit of problem. We need to find some creative solution in the written JS to make sure we get smallest size.
You can check with AI some variations of the code that can produce a smaller code when minified.
There was a problem hiding this comment.
@Soare-Robert-Daniel I have updated the code to reduce the file size with the latest commit. Please check it and let me know if any changes are needed.
|
@poonam279 I have fixed the conflicts when the Sparks for WooCommerce plugin is active. |
inc/core/front_end.php
Outdated
|
|
||
| if ( class_exists( 'WooCommerce', false ) && is_woocommerce() ) { | ||
| wp_register_script( 'neve-shop-script', NEVE_ASSETS_URL . 'js/build/modern/shop.js', array(), NEVE_VERSION, true ); | ||
| wp_register_script( 'neve-shop-script', NEVE_ASSETS_URL . 'js/build/modern/shop.js', array( 'jquery' ), NEVE_VERSION, true ); |
There was a problem hiding this comment.
Here is an interesting discussion.
Using jQuery allowed us to reduce the size of the script, but we introduced a new dependancie that needs to be loaded in the page, so the total size will be this script + jQuery script size.
But jQuery is also loaded by WooCommerce, thus we can ignore its script size since it will be always present.
@HardeepAsrani, what do you think?
There was a problem hiding this comment.
Sorry, I missed this, but yea, I agreed if Woo loads JS so it's not an issue for us to use as well.
|
@girishpanchal30, there is still an issue when we do not enable the Gallery Thumbnails Slider option in Sparks and select the Left Grid Layout, then the gallery layout breaks on mobile. |
5bf43a6 to
20b367d
Compare
|
@poonam279 I have fixed it with the latest commit. Please check and let me know if any changes are needed. |
|
@girishpanchal30, I have noticed several issues with this commit.
The desktop view doesn't have the arrows at the correct place. Also, it shouldn't show the slider as the slider option is not enabled in the Spark
This is the test instance where you can check the issues: |
|
@poonam279, I have fixed all the mentioned issues with the latest commit. |
|
@girishpanchal30, The latest commit fixed previous issues but there are some new issues. The slider still works even when the Gallery Thumbnails Slider option is disabled in Sparks and Normal Grid Layout is selected. Also, the horizontal layout appears on desktop:
When we enable the Gallery Thumbnails Slider option in Sparks and select the Normal Grid Layout, the gallery doesn't appear on desktop and mobile.
|
|
@poonam279 I have fixed it with the latest commit. |
|
Thank you @girishpanchal30, this commit fixed many issues but one is still there. If you have the Sparks plugin active and the default Normal layout selected, the Horizontal layout still appears on desktop. On mobile, it works as expected.
|
|
@poonam279 I have fixed it with the latest commit. Please check and let me know if any changes are needed. |
|
🎉 This PR is included in version 4.2.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This reverts commit 8cd27f3.
Revert "feat: add slider on gallery images (#4446)"












Summary
Add the vertical slider on a desktop and the horizontal slider on a mobile device to the gallery image of a single product.
Will affect the visual aspect of the product
YES
Screenshots
Desktop View:

Mobile View:

Check before Pull Request is ready:
Closes https://github.com/Codeinwp/neve-pro-addon/issues/2508