Blog
Practical notes on JavaScript tooling, module systems and the platform decisions behind the work we do
-
Shopify API Version Upgrade: The Quarterly Job
Shopify ships an API version every quarter and supports each for 12 months, so pin the version, read the health report and upgrade on a schedule.
-
Shopify Optional Scopes: Ask When You Need Them
Shopify optional scopes let your app request read_orders in context instead of at install, and revoke it when the merchant turns the feature off.
-
Animate height: auto in CSS: interpolate-size or Grid
interpolate-size: allow-keywords animates height: auto in Chromium only, so here is the grid fallback to ship for Firefox and Safari.
-
Shopify Checkout Branding API: What Replaced It
The Shopify checkout branding API moved to checkoutAndAccountsConfigurationUpdate, one configuration covering checkout, customer accounts and sign-in.
-
Shopify Collection Filters in Liquid: Links or Form
Shopify collection filters in Liquid come from the filter object: a GET form to pick values, url_to_remove links to clear them, and one URL contract.
-
JavaScript String Length Lies About Emoji
JavaScript string length counts UTF-16 code units, so one family emoji reads as 11; Intl.Segmenter counts the characters a user actually sees.
-
Shopify Payment Customization Function: Hide COD
How to hide, rename or reorder checkout payment methods with a Shopify payment customization function, and where it silently will not run.
-
Shopify Storefront API Variant Selection at 2048
Shopify products can hold 2048 variants now, so resolve the shopper's choice with selectedOrFirstAvailableVariant instead of fetching the whole list.
-
JavaScript Iterator Helpers: Drop the Spread
Iterator helpers put map, filter and take on any Map, Set or generator, so the chain runs lazily and never builds an intermediate array.
-
Hydrogen Analytics Events: Subscribe, Don't Re-Track
Hydrogen publishes eight analytics events; subscribe to them once with useAnalytics instead of hand-rolling a view event in every route.
-
Shopify Session Token Verification in Node
Verify a Shopify session token yourself: the HS256 signature check, the four claims to validate, and which forged tokens it rejects.
-
Sec-Fetch-Site: Block Cross-Site POSTs Early
Sec-Fetch-Site lets your server reject cross-site POSTs before auth runs, for CSRF protection that needs no token and no client changes.