Short description of issue
We’re evaluating partials to replace the Section Rendering API in our theme (variant changes, quick views, upsells). Two limitations block that: requests can’t combine section_id and partials (they return 400), and the @shopify/partial-rendering import map is only injected on pages whose initial render contains a {% partial %}, so content loaded later via AJAX can’t use the package.
Reproduction steps
Issue 1: section_id + partials
- Wrap a block of a product section in
{% partial 'product-variant-selector' %}. ?partials=product-variant-selector→ 200 (one<template>, 4.1 KB)?section_id=<section-id>→ 200 (full section, 18.5 KB)?section_id=<section-id>&partials=product-variant-selector→ 400, empty body- Same with a section outside the template (
?section_id=product-modal&partials=…) → 400
Issue 2: import map injection
- Open a collection page with no
{% partial %}in its initial render. document.querySelector('script[type="importmap"]')→ null- Insert content with partials via AJAX (e.g. a quick view), then
import('@shopify/partial-rendering')→ fails (specifier can’t be resolved) - On a page that renders a
{% partial %}, the import map is present and it works.
Additional info
Why it matters: quick views, upsells and drawers are often rendered via section_id because those sections aren’t in the product template, so they can’t use partials today.
Workarounds:
1. section_id:
An alternate template with {% layout none %}, requested with ?view=modal&partials=… (works, but merchants can see and assign it in the admin).
2. Import map:
An empty {% partial %} in the layout so it’s injected on every page.
Questions:
- Is
section_id+partialsplanned? If not, could the docs say so and the 400 include an error message? - Could the import map be injected on every page, or the docs mention it for dynamically loaded content?
Related (Firefox ignores the import map): @shopify/partial-rendering fails to load in Firefox: import map is output after module scripts in content_for_header
What type of topic is this
Feature request