Project portfolio Browse selected work

Shopify Plus Upgrade Monthly Fee Reduction + Up to $4800 Development Fee Credit - Exclusive WesWoo Offer

Search
Galleries & detail viewing

Loading and retry feedback

Simulate a failed load and inspect the original list. Allow success and retry. Distinguish an exhausted list from a request that can be retried.

A collection says products failed to load. How can I tell two causes apart?

Read the failed request’s status, content type and body. We served the same list a 503, then HTML with a 200, then valid JSON. Both failures preserved A. A valid response appended B and repeating it did not append a second B.

Establish whether this endpoint promises JSON or rendered theme-section HTML before choosing the parser. Record the observed status and type, keep earlier results visible and follow the endpoint’s retry contract.

Compare results, scope and replay code

503 and 200 HTML yielded HTTP 503 and Unexpected content type respectively. Visible items remained A.

After valid JSON and a repeated request, the list remained A, B.

This fixture endpoint promises JSON. A Shopify endpoint designed to return section HTML needs a different test. The original post supplied no failing response, so its root cause remains undetermined.

async function loadNext(url) {
  const res=await fetch(url,{headers:{Accept:'application/json'}});
  if(!res.ok)throw Error('HTTP '+res.status);
  if(!res.headers.get('content-type')?.includes('application/json'))throw Error('Unexpected content type');
  const data=await res.json();
  if(!Array.isArray(data.items))throw Error('Missing items');
  return data.items;
}

WESWOO tested Chrome 157.0.8103.79. In a clean directory with Node.js 22 or newer, run npm install playwright, then npx playwright install chromium, then node weswoo-retry.cjs.

Download replay script (.cjs)

Original question · Shopify · Section Rendering API · MDN · Response.ok

Load more repeats the first products. Which two parts of the request should I compare?

Compare the initial and next request URLs, especially page and sort. Follow the server’s next link and compare IDs before and after appending. If the response already contains repeats, investigate the source.

A local server offered two sorted pages. We repeated page one, requested page two without its sort, and followed the full next link.

Compare results, scope and replay code

Both broken requests produced P1, P1. The full next link yielded P1, P2, P3, and the last response carried no next link.

This separate question reports duplicate items. An earlier post reported a delayed error with no response capture. The two symptoms have different evidence requirements. This fixture does not identify either store’s backend.

Tested in Chrome 157.0.8103.79. In a clean directory with Node.js 22 or later run, in order, npm install playwright → npx playwright install chromium → node weswoo-next-products.cjs.

Download replay script (.cjs)

Original question · Shopify · paginate · Shopify · Section Rendering API

Fail the second page, retain the first and retry the same cursor twice. The demo preserves old items on failure. A live paginator must also handle duplicate and reordered successful responses.

The failed request preserved both existing items. Retry produced four. A successful load alone cannot reveal whether failure clears the original list.

Reproduce the test and inspect the readings

With two results visible, simulate a failed load, clear the failure and retry. Count visible items each time.

908 and 316 px, both preferences
2 then 2 then 4

WESWOO loaded this example’s published HTML, CSS and JavaScript in standalone Chrome at 700 px viewport height. Both motion preferences were tested at each width.

2026-11-24 · Chrome 157.0.8103.79

Download test conditions and raw readings (JSON)

View the phone and desktop observations

WESWOO · 24 November 2026. We enabled reduced motion at phone width and used the default motion setting at desktop width. These observations come from the live example.

Window / preview widthActionObserved result
390 / 316 pxLoad moreLoad more kept Shokz and Termino in place, appended INIU and FMS, and reported four of four examples.
1440 / 908 pxLoad moreLoad more kept Shokz and Termino in place, appended INIU and FMS, and reported four of four examples.

Preparing preview

How the effect works

Keep the items shoppers already found

Enable the failure simulation and choose Load more. Retry without losing the two visible results.

Example source code

View 3 source filesHTML · CSS · MJS
results-loading-retry.html
<section class="fx load-demo" lang="en" aria-label="Load more results demo">
  <h2>Load more results</h2>
  <p class="intro">See how a list handles loading and retries without losing its current items.</p>
  <ul class="results" aria-busy="false"><li><figure><img src="https://www.weswoo.com/wp-content/themes/weswoo/assets/images/case-brands/project-previews/shokz-openfit-preview.webp" alt="Shokz storefront screenshot"><figcaption>Shokz</figcaption></figure></li>
<li><figure><img src="https://www.weswoo.com/wp-content/themes/weswoo/assets/images/case-brands/project-previews/termino-preview.webp" alt="Termino storefront screenshot"><figcaption>Termino</figcaption></figure></li>
<li hidden><figure><img src="https://www.weswoo.com/wp-content/themes/weswoo/assets/images/case-brands/project-previews/iniu-preview.webp" alt="INIU storefront screenshot"><figcaption>INIU</figcaption></figure></li>
<li hidden><figure><img src="https://www.weswoo.com/wp-content/themes/weswoo/assets/images/case-brands/project-previews/fms-preview.webp" alt="FMS storefront screenshot"><figcaption>FMS</figcaption></figure></li></ul>
  <p class="status" role="status" data-status>Showing 2 of 4 examples.</p>
  <div class="row loader-actions">
    <button type="button" class="primary" data-load>Load more</button>
    <label><input type="checkbox" data-failure> Simulate a failed request</label>
  </div>
</section>

Integration and checks

Theme integration

3 steps
  1. Duplicate the theme

    Integrate and preview the example in a duplicate theme.

  2. Connect the section settings

    Replace demo copy and artwork with section settings and scope the styles to that section.

  3. Connect the editor lifecycle

    Use the lifecycle script for editor reloads, pausing offscreen and cleanup on unload.

Placement

  • Load-more controls, result refreshes and project lists.

Interaction

  • Block repeat requests, retain previous results on failure and append on success.

Touch and accessibility

  • Loading and errors use text; added results appear immediately with reduced motion.

Setup notes for this effect

Replace the sample delay with a real pagination request and preserve already-rendered products.

Before launch

Integration files
sections/ww-effect.liquid
{% comment %} WESWOO example shell. Add ONE effect's HTML inside .fx-slot. {% endcomment %}
{{ 'ww-effects.css' | asset_url | stylesheet_tag }}
<section id="ww-effect-{{ section.id }}" data-ww-effect-section>
  <h2>{{ section.settings.heading | escape }}</h2>
  <button type="button" data-effect-toggle aria-pressed="false">Play / pause effect</button>
  <div class="fx-slot">
    {% comment %} Insert the chosen .fx element here; read copy/images from section settings. {% endcomment %}
  </div>
</section>
<script type="module" src="{{ 'ww-effect-section.js' | asset_url }}"></script>
{% schema %}
{"name":"WESWOO effect","settings":[{"type":"text","id":"heading","label":"Heading","default":"Our story"}],"presets":[{"name":"WESWOO effect"}]}
{% endschema %}

Insert the selected effect into the shell. Each module loads one effect; multiple types need an explicit registry and Section mapping.

Sources and further reading

Scope and licensing

Examples are authored by WESWOO and credited open-source contributors; retain their applicable licenses. Project screens and photographs remain with their rights holders. Downloads use placeholders; replace them with imagery you may use.

Shopify/dawn · modal / slider base classesShopify/dawn · product media galleryShopify/dawn · license

References checked · 2026-11-24