From fe29debe2004a0b24e9e43772376c669d0fa1ab9 Mon Sep 17 00:00:00 2001 From: Sergio Tamayo Date: Mon, 16 Mar 2026 15:44:54 -0500 Subject: [PATCH 1/3] Perf: Add mobile toggle to disable heavy reveals and transitions --- assets/base.css | 23 +++++++++++++++++++++++ config/settings_schema.json | 7 +++++++ layout/theme.liquid | 2 +- 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/assets/base.css b/assets/base.css index 91012cce3..2f141d692 100644 --- a/assets/base.css +++ b/assets/base.css @@ -3748,6 +3748,29 @@ fly-to-cart.fly-to-cart--sticky { } } +/* ============================================================================ + Mobile Performance - Disabled Animations Override + ============================================================================ */ +@media screen and (max-width: 749px) { + body.animations-disabled-mobile * { + /* Disable all CSS Scroll-Driven reveals (native feature used heavily in this theme) */ + animation-timeline: none !important; + } + + body.animations-disabled-mobile .slide__content { + /* Specifically prevent the slide reveal animation to load instantly */ + animation: none !important; + opacity: 1 !important; + translate: 0 0 !important; + } + + /* Disable costly View Transition animations on mobile */ + body.animations-disabled-mobile::view-transition-old(*), + body.animations-disabled-mobile::view-transition-new(*) { + animation: none !important; + } +} + @keyframes search-element-slide-out-bottom { 0% { transform: translateY(0); diff --git a/config/settings_schema.json b/config/settings_schema.json index 9a27dce58..d299bd625 100644 --- a/config/settings_schema.json +++ b/config/settings_schema.json @@ -1403,6 +1403,13 @@ "label": "t:settings.add_to_cart_animation", "default": true }, + { + "type": "checkbox", + "id": "disable_animations_mobile", + "label": "Disable animations on mobile", + "info": "Improves performance by disabling scroll reveals and page transitions on small screens.", + "default": true + }, { "type": "select", "id": "card_hover_effect", diff --git a/layout/theme.liquid b/layout/theme.liquid index 2b6b6a151..085987f94 100644 --- a/layout/theme.liquid +++ b/layout/theme.liquid @@ -38,7 +38,7 @@ {{ content_for_header }} - + {% render 'skip-to-content-link', href: '#MainContent', text: 'accessibility.skip_to_text' %}
{% sections 'header-group' %} From b0a3ebcc8500e42dd413ef16212bae3bee5e3729 Mon Sep 17 00:00:00 2001 From: Sergio Tamayo Date: Wed, 18 Mar 2026 00:18:16 -0500 Subject: [PATCH 2/3] Perf: JS load strategy + UpsellPlus gating --- layout/theme.liquid | 10 +++++++++- sections/header.liquid | 2 ++ snippets/scripts.liquid | 5 +---- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/layout/theme.liquid b/layout/theme.liquid index 085987f94..bdd2259c9 100644 --- a/layout/theme.liquid +++ b/layout/theme.liquid @@ -35,7 +35,15 @@ {%- render 'theme-editor' -%} {% endif %} - {{ content_for_header }} + {%- capture cfh -%}{{ content_for_header }}{%- endcapture -%} + {%- if cart.item_count == 0 -%} + {% comment %} + Conditionally disable UpsellPlus scripts when the cart is empty to improve performance. + Using 'upsell' and 'Upsell' as substrings based on the implementation plan. + {% endcomment %} + {%- assign cfh = cfh | replace: 'upsell', 'disabled-upsell' | replace: 'Upsell', 'disabled-Upsell' -%} + {%- endif -%} + {{ cfh }} diff --git a/sections/header.liquid b/sections/header.liquid index f6b3a8a7f..886b3afa5 100644 --- a/sections/header.liquid +++ b/sections/header.liquid @@ -396,6 +396,8 @@ {% stylesheet %} diff --git a/snippets/scripts.liquid b/snippets/scripts.liquid index 514fdbe70..d6739c126 100644 --- a/snippets/scripts.liquid +++ b/snippets/scripts.liquid @@ -32,10 +32,7 @@ Date: Wed, 18 Mar 2026 00:45:24 -0500 Subject: [PATCH 3/3] CSS render-blocking & Critical CSS --- layout/theme.liquid | 14 ++++++++++++++ snippets/stylesheets.liquid | 4 +++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/layout/theme.liquid b/layout/theme.liquid index bdd2259c9..d96745704 100644 --- a/layout/theme.liquid +++ b/layout/theme.liquid @@ -25,6 +25,20 @@ {% endif %} {%- render 'meta-tags' -%} + + + {%- render 'stylesheets' -%} {%- render 'fonts' -%} {%- render 'scripts' -%} diff --git a/snippets/stylesheets.liquid b/snippets/stylesheets.liquid index 88668ee40..1bd69db9b 100644 --- a/snippets/stylesheets.liquid +++ b/snippets/stylesheets.liquid @@ -1,2 +1,4 @@ {{ 'overflow-list.css' | asset_url | preload_tag: as: 'style' }} -{{ 'base.css' | asset_url | stylesheet_tag: preload: true }} + + +