I'm very much looking forward to the new store design experience as I think it will solve a lot of pain points for merchants/clients. While I'm thrilled the snippet functionality has been included in the form of render, I'm a little concerned that there will no longer be support for dynamic includes. Being able to dynamically include snippets allows us to build things like custom icon and illustration libraries into the theme without having a single giant if/switch statement file to serve as a reference lookup.
Relevant forum threads where other developers have expressed concern over removal of this functionality:
Hey @nchan0154, we've been discussing this over in the Shopify Partners Slack Community, as well as a post here on the forums:
Sadly it doesn't look possible, and as such, it looks like it's a performance priority leading to it being cut
@CharlieCoppinge Thank you for alerting me to the slack thread and the related twitter conversation. I am aware that they have given "performance" as a reason for not including this functionality in the past, but I will also note that they had planned to deprecate 'include' entirely with NO replacement for snippets due to performance so at this point I'm just hoping that collectively we can emphasize how important this functionality is to us. Obviously I can't speak to overall engine performance, but I think it is on us as devs to use the functionality responsibly to make sure we don't build slow themes, and I can't say I've been worried about it's rendering performance in the past. For more context, here is a screenshot of the flame graph where we've dynamically included an icon based on a setting. I've circled where the snippet is in blue. ¯\_(ツ)_/¯
Thanks for chiming in @nchan0154 - very good points.
I think it is on us as devs to use the functionality responsibly to make sure we don't build slow themes
In my opinion, you've hit the nail on the head here.
Couple this with perhaps a greater emphasis and learning resources on optimization/page speed (optimization dashboard? testing tools? warnings?) and we're onto a winner.
Fair play to Shopify, I just came across this Tweet from a couiple of weeks back:
Apaprently a store performance tool is coming to us this month.
Definetly a step in the right direction, but it still stands that giving us access to more advanced tooling is still better than not.
Connect your PayPal account to allow your customers to checkout using the PayPal gateway a...By Ollie Jul 28, 2022