Liquid and CSS should provide the normal storefront experience. Add JavaScript only for interaction that cannot be expressed cleanly without it.

Keep the first view light

  • Mark only important above-the-fold media as priority.
  • Lazy-load lower images and provide correct dimensions or aspect ratios.
  • Avoid downloading desktop-sized media for a small mobile card.
  • Keep global CSS small; load section-specific CSS with the section.
  • Avoid large libraries for one tiny effect.

Theme-owned server rendering

Casa and Starter assemble their Liquid trees in theme/assets/render.server.tsx. Use virtual:upstorr-theme-runtime-schema there for section Liquid sources, block/snippet/layout libraries, control packs, registrations, and theme assets. It leaves editor-only labels, presets, and global control definitions out of the rendering bundle. The Workbench still receives the complete editor catalog.

The existing virtual:upstorr-theme-editor-schema module keeps its full catalog for renderers that require it. Importing it explicitly also keeps it in a renderer that uses the smaller runtime catalog. Neither compiler catalog is available in theme/assets/theme.ts browser enhancements.

Make JavaScript repeat-safe

Upstorr navigation can replace page content without refreshing. Re-initialize after upstorr:storefront-navigation, but mark enhanced elements so listeners and observers are not attached twice.

Clean up timers, observers and document listeners that no longer own live elements. Respect reduced-motion preferences for animation.

theme check validates architecture and safety; it does not measure visual stability or interaction speed. Test real mobile hardware and a slower connection before merchant release.