Splide is dead, is another implementation planned?

I completely agree with the addition of new features to the slider and it’s strange why no new features have been added to the nestable slider element for a long time.

In fact, the only problem I see is that the Nestable slider element creates a lot of CLS. Just add a slider at the top of the page to see how much it hurts performance.

image

usually when you leave stuff floating moving while loading they create lots of performance or lighthouse issues (learn which lighthouse issues comes from what they are all easy to avoid)

layout shift almost always related to how you setup the dom and styles/css

Even if I don’t add any elements in the Nestable slider, the CLS is still there. But the pro slider from the bricks extras plugin works very well and has no CLS.

The main reason is because in BricksExtras we’re checking for the slider to make sure the splide CSS is added early (with the rest of the page CSS) if there’s one found on the page. With Bricks native slider, it’s relying on the default enqueue function, which adds the CSS later in the footer meaning there’s a slight delay in the styling being applied on page load. It’s one of the main reasons we made that element (as well as some of the missing features).

4 Likes

Images break in various ways in Splide when lazily loading. I’ve reported this in the past. The solution? Disable lazy loading. So yeah, Splide does have issues.

I’ve been researching splide for a while now. It seems like splide is fully responsive to needs, as friends have said. But I’m not sure whether this will continue to be the case in the future.

I was initially a fan of the splide change. But now I’ve come to the conclusion that it’s not and if the bricks team does a little bit of development and adds new features to it and works on improving its css loading as @wplit said, I don’t think there will be a need to migrate for at least the next few years.

I don’t know what will happen to Splide. Because I don’t remember a similar case where its development suddenly stopped. Is Splide stopped forever? Or is it possible that another person or team will take over its development?

Anyway, I think developing new features and improving existing ones will help a lot to keep Splide alive in Bricks. New features like:

  • Grid slider
  • Free drag
  • Offset slide (Right, Center, Left)
  • Auto Scroll (smooth)
  • and improved CSS loading
3 Likes

agreed here. impressive given the size of it really. it does everything 90% of uses cases call for without the bloat of the others. if you are after the extras, then dequeue splide and load whatever library you wish.

although i’m guilty, at the end of the day, sliders… there’s a better way.

Maybe in a future we won’t need JS libraries for sliders at all.

If you know there is a nestable slider in specific page, use this enqueuing method in your child theme to load Splide CSS in head tag.

add_action( 'wp_enqueue_scripts', 'enqueue_brick_splide_assets', 5, 1);
function enqueue_brick_splide_assets() {
	// is_archive(432), is_product(123), etc
	if ( bricks_is_frontend() && is_page(234) ) {	
		wp_register_style( 'bricks-splide', BRICKS_URL_ASSETS . 'css/libs/splide-layer.min.css', [ 'bricks-frontend' ], filemtime( BRICKS_PATH_ASSETS . 'css/libs/splide-layer.min.css' ) );
		wp_enqueue_style( 'bricks-splide');
	}
}

To dynamically detect a nestable slider on a page, use the same method Bricks uses to check for controls or elements. Refer to the implementation in assets.php at line 164 as a guide.

Bricks provides filters and exposes the underlying Splide instance, allowing you to natively implement advanced features like URL Hash Navigation, Intersection detection, Auto-scroll and others. Here’s my own customization

nested slider

10 Likes

You have created some cool custom features :ok_hand: I hope the bricks team will consider it natively and improve the loading of the sliders css. It really needs improvement.

Hi @bricksonemore i want to make a slider like yours for the single product page, sync both sliders and add videos, images and gifs on the same slider. Can you help me with that :grin:

you can download the child theme here free, v.1.0.4 coming soon with new woo features, bug fixed, reduce package file size by remove documentation files and replace with youtube link.

https://www.youtube.com/@Brickscodes

4 Likes

It look amazing, most with extend slide function