Skip to content

Commit e763ade

Browse files
authored
Merge branch 'release' into move-ai-sidebar
2 parents 8078ad1 + 8469d8e commit e763ade

10 files changed

Lines changed: 190 additions & 139 deletions

File tree

_dropin-enrichments/product-details/containers.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,7 @@
1919
"description": "The `ProductOptions` container manages and displays product options on the product details page."
2020
},
2121
"ProductDetails": {
22-
"parameters": {
23-
"onAddToCart": {
24-
"description": "Callback when the user adds the product to the cart. Use to show custom confirmation, trigger analytics, or navigate to the cart."
25-
}
26-
},
27-
"description": "Displays product details for the Product Details drop-in."
22+
"description": "Deprecated; not used in Commerce boilerplate. Compose smaller containers from this topic."
2823
},
2924
"ProductDownloadableOptions": {
3025
"description": "Displays product downloadable options for the Product Details drop-in."

astro.sidebar.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ export function generateSidebar() {
373373
{ label: 'Overview', link: '/dropins/product-details/containers/' },
374374
{ label: 'ProductAttributes', link: '/dropins/product-details/containers/product-attributes/' },
375375
{ label: 'ProductDescription', link: '/dropins/product-details/containers/product-description/' },
376-
{ label: 'ProductDetails', link: '/dropins/product-details/containers/product-details/' },
376+
{ label: 'ProductDetails container (deprecated)', link: '/dropins/product-details/containers/product-details/' },
377377
{ label: 'ProductDownloadableOptions', link: '/dropins/product-details/containers/product-downloadable-options/' },
378378
{ label: 'ProductGallery', link: '/dropins/product-details/containers/product-gallery/' },
379379
{ label: 'ProductGiftCardOptions', link: '/dropins/product-details/containers/product-gift-card-options/' },

scripts/GENERATOR-BUGS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ This file tracks bugs found in documentation generators, their fixes, and any ma
2727
- Fix container sidebar entries:
2828
- Cart Containers → MiniCart (fix typo: `minicart``mini-cart`)
2929
- Order Containers → OrderHeader, OrderStatus
30-
- Product Details Containers → ProductDetails, ProductGiftCardOptions (fix typo: `product-giftcard-options``product-gift-card-options`)
30+
- Product Details Containers → ProductDetails container (deprecated), ProductGiftCardOptions (fix typo: `product-giftcard-options``product-gift-card-options`)
3131
- **Prevention**:
3232
- ✅ Added sidebar validation script (`scripts/validate-sidebar-updates.js`)
3333
- ✅ Integrated validation into test suite

src/content/docs/boilerplate/updates.mdx

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -329,12 +329,12 @@ While early-adopter projects require more comprehensive selective updates, align
329329

330330
### Previous architecture (slot-based customization)
331331

332-
Early versions of `@dropins/storefront-pdp` used a single `ProductDetails` container with predefined slots. You could customize by:
332+
Older `@dropins/storefront-pdp` releases used the monolithic `ProductDetails` container (deprecated) with predefined slots. That pattern is deprecated and not a part of the Commerce boilerplate. It should not be used for new work. In that legacy model, teams could only:
333333

334-
- Creating custom slot implementations for different sections of the page
335-
- Working within the constraints of the single-container structure
336-
- Limited ability to rearrange or completely replace sections of the PDP
337-
- Complex styling workarounds to achieve desired layouts
334+
- Create custom slot implementations for different sections of the page
335+
- Work within the constraints of a single-container structure
336+
- Rearrange or replace PDP sections with limited flexibility
337+
- Rely on complex styling workarounds to reach custom layouts
338338

339339
### New architecture (container-based composition)
340340

@@ -368,10 +368,12 @@ When updating your PDP block from slot-based to container-based:
368368
1. Update dependencies
369369

370370
```javascript
371-
// Old: Single container with slots
372-
import { ProductDetails } from '@dropins/storefront-pdp/containers/ProductDetails.js';
371+
import { render as pdpRendered } from '@dropins/storefront-pdp/render.js';
373372

374-
// New: Multiple independent containers
373+
// Before: Single container with slots
374+
import { ProductDetails } from '@dropins/storefront-pdp/containers/ProductDetails.js'; // (deprecated)
375+
376+
// After: multiple independent containers
375377
import ProductHeader from '@dropins/storefront-pdp/containers/ProductHeader.js';
376378
import ProductPrice from '@dropins/storefront-pdp/containers/ProductPrice.js';
377379
import ProductGallery from '@dropins/storefront-pdp/containers/ProductGallery.js';
@@ -387,18 +389,19 @@ When updating your PDP block from slot-based to container-based:
387389
Replace the single container render with multiple container renders:
388390

389391
```javascript
390-
// Old: Single render with slot configuration
391-
await productRenderer.render(ProductDetails, {
392-
slots: {
393-
Title: (ctx) => Title(ctx, block),
394-
Options: (ctx) => Options(ctx, block),
395-
// ... other slots
396-
}
397-
})(block);
398-
399-
// New: Multiple container renders
392+
// Before: Single render with slot configuration
393+
await pdpRendered.render(
394+
ProductDetails, // (deprecated)
395+
{
396+
slots: {
397+
/* custom slot implementations */
398+
},
399+
},
400+
)($pdpRoot);
401+
402+
// After: multiple container renders to layout regions
400403
await pdpRendered.render(ProductHeader, {})($header);
401-
await pdpRendered.render(ProductPrice, {})($price);
404+
await pdpRendered.render(ProductPrice, {})($price);
402405
await pdpRendered.render(ProductGallery, { controls: 'thumbnailsColumn' })($gallery);
403406
// ... other containers
404407
```

src/content/docs/dropins/all/branding.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Branding with <Term>design tokens</Term> is the quickest way to customize your s
3333
The following diagram shows a small branding change. When we override the default value of a single shape token, we override the default border-radius of the `Button` in the storefront's <Term>library components</Term>, which changes the look and feel of drop-in components that use it.
3434

3535
<Diagram caption="How to override the drop-in design tokens.">
36-
![Flowchart of how CSS variables and design tokens map from project configuration into rendered Adobe Commerce drop-in components](@images/brand/howtobrand.svg)
36+
![Flowchart showing how CSS variables and design tokens from your project map into Button styling and other library components used by drop-ins](@images/brand/howtobrand.svg)
3737
</Diagram>
3838

3939
<CodeImport code={base} title="All default design tokens" lang="css" frame="none" />

src/content/docs/dropins/product-details/containers/index.mdx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Product Details Containers
3-
description: Overview of containers available in the Product Details drop-in.
3+
description: Overview of Product Details drop-in containers. Add to Cart and wishlist buttons use block composition, not the slots on this drop-in's composed containers (see the Slots topic).
44
sidebar:
55
label: Overview
66
order: 1
@@ -9,7 +9,7 @@ sidebar:
99
import { Aside } from '@astrojs/starlight/components';
1010
import TableWrapper from '@components/TableWrapper.astro';
1111

12-
The **Product Details** drop-in provides pre-built container components for integrating into your storefront.
12+
The Product Details drop-in provides pre-built container components for integrating into your storefront.
1313

1414
<div style="background-color: var(--sl-color-blue-low); border-left: 4px solid var(--sl-color-blue); padding: 0.75rem 1rem; border-radius: 0.25rem; margin: 1rem 0;">
1515
<strong>Version: 3.0.2</strong>
@@ -21,14 +21,20 @@ Containers are pre-built UI components that combine functionality, state managem
2121

2222
## Available Containers
2323

24+
<Aside type="caution">
25+
The monolithic `ProductDetails` container is deprecated. It is not used in the Commerce boilerplate. Do not use it for new work. Compose the smaller containers in this table instead (for example, [ProductHeader](/dropins/product-details/containers/product-header/), [ProductGallery](/dropins/product-details/containers/product-gallery/), [ProductPrice](/dropins/product-details/containers/product-price/), and [ProductOptions](/dropins/product-details/containers/product-options/)), then use [Slots](/dropins/product-details/slots/) on each container when you need slot-based customization.
26+
</Aside>
27+
28+
Add to Cart, Add to Wishlist, and similar primary actions are not provided through the Product Details slots in the [Slots](/dropins/product-details/slots/) table. The storefront composes them in the product-details block using separate mount points and the Wishlist or cart patterns described in [Add to Cart and Add to Wishlist](/dropins/product-details/slots/#add-to-cart-and-add-to-wishlist) on that page.
29+
2430
<TableWrapper nowrap={[0]}>
2531

2632
| Container | Description |
2733
| --------- | ----------- |
2834
| [ProductAttributes](/dropins/product-details/containers/product-attributes/) | Configure the `ProductAttributes` container for the product details page drop-in component. |
2935
| [ProductDownloadableOptions](/dropins/product-details/containers/product-downloadable-options/) | Renders the downloadable link selection UI for downloadable product types. |
3036
| [ProductDescription](/dropins/product-details/containers/product-description/) | Configure the `ProductDescription` container for the product details page drop-in component. |
31-
| [ProductDetails](/dropins/product-details/containers/product-details/) | ADOBE CONFIDENTIAL. |
37+
| [ProductDetails container (deprecated)](/dropins/product-details/containers/product-details/) | Deprecated monolithic container. See the caution above and the linked topic for configuration and slots. |
3238
| [ProductGallery](/dropins/product-details/containers/product-gallery/) | Configure the `ProductGallery` container for the product details page drop-in component. |
3339
| [ProductGiftCardOptions](/dropins/product-details/containers/product-gift-card-options/) | *Enrichment needed - add description to `_dropin-enrichments/product-details/containers.json`* |
3440
| [ProductHeader](/dropins/product-details/containers/product-header/) | Configure the `ProductHeader` container for the product details page drop-in component. |
Lines changed: 45 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,87 @@
11
---
2-
title: ProductDetails Container
3-
description: Learn about the ProductDetails container in the Product Details drop-in.
4-
sidebar:
5-
label: ProductDetails
2+
title: ProductDetails container (deprecated)
3+
description: Learn about the deprecated monolithic ProductDetails container for legacy Adobe Commerce storefront PDP code. Prefer composed containers for new work.
64
---
75

86
import { Aside } from '@astrojs/starlight/components';
97
import TableWrapper from '@components/TableWrapper.astro';
108

11-
ADOBE CONFIDENTIAL
9+
<Aside type="caution" title="Deprecated">
10+
The monolithic `ProductDetails` container is deprecated. It is not used in the Commerce boilerplate. Do not use it for new work. Compose the smaller containers from the [containers overview](/dropins/product-details/containers/) instead. For slot-by-slot examples, see [ProductDetails (deprecated) slots](/dropins/product-details/slots/#productdetails-deprecated-slots). For migration context, see [Product details page architectural evolution](/boilerplate/updates/#product-details-page-architectural-evolution).
11+
</Aside>
12+
13+
The legacy `ProductDetails` container (deprecated) renders a full product details experience from one component. This topic lists configuration parameters and slot names for older integrations.
1214

1315
<div style="background-color: var(--sl-color-blue-low); border-left: 4px solid var(--sl-color-blue); padding: 0.75rem 1rem; border-radius: 0.25rem; margin: 1rem 0;">
1416
<strong>Version: 3.0.2</strong>
1517
</div>
1618

1719
## Configuration
1820

19-
The `ProductDetails` container provides the following configuration options:
21+
The `ProductDetails` container (deprecated) provides the following configuration options:
2022

21-
<TableWrapper nowrap={[0,1]}>
23+
<TableWrapper nowrap={[0, 1]}>
2224

2325
| Parameter | Type | Req? | Description |
2426
|---|---|---|---|
25-
| `sku` | `string` | Yes | |
26-
| `productData` | `ProductModel` | No | |
27-
| `hideSku` | `boolean` | No | |
28-
| `hideQuantity` | `boolean` | No | |
29-
| `hideShortDescription` | `boolean` | No | |
30-
| `hideDescription` | `boolean` | No | |
31-
| `hideAttributes` | `boolean` | No | |
32-
| `hideSelectedOptionValue` | `boolean` | No | |
33-
| `hideURLParams` | `boolean` | No | |
34-
| `carousel` | `CarouselConfig` | No | |
35-
| `optionsConfig` | `OptionsConfig` | No | |
36-
| `useACDL` | `boolean` | No | |
37-
| `onAddToCart` | `function` | No | Callback function triggered when add to cart |
38-
| `zoomType` | `'zoom' \| 'overlay'` | No | |
39-
| `closeButton` | `boolean` | No | |
40-
| `disableDropdownPreselection` | `boolean` | No | |
27+
| `sku` | `string` | Yes | SKU of the product to load. |
28+
| `productData` | `ProductModel` | No | Optional pre-fetched product data. |
29+
| `hideSku` | `boolean` | No | Hides the SKU when set to `true`. |
30+
| `hideQuantity` | `boolean` | No | Hides the quantity selector when set to `true`. |
31+
| `hideShortDescription` | `boolean` | No | Hides the short description when set to `true`. |
32+
| `hideDescription` | `boolean` | No | Hides the long description when set to `true`. |
33+
| `hideAttributes` | `boolean` | No | Hides the attributes block when set to `true`. |
34+
| `hideSelectedOptionValue` | `boolean` | No | Hides the selected option value display when set to `true`. |
35+
| `hideURLParams` | `boolean` | No | Stops reading product context from URL parameters when set to `true`. |
36+
| `carousel` | `CarouselConfig` | No | Carousel configuration for the gallery. |
37+
| `optionsConfig` | `OptionsConfig` | No | Options UI configuration. |
38+
| `useACDL` | `boolean` | No | Enables Adobe Client Data Layer integration when set to `true`. |
39+
| `onAddToCart` | `function` | No | Callback invoked when the shopper adds to cart. |
40+
| `zoomType` | `'zoom' \| 'overlay'` | No | Image zoom behavior. |
41+
| `closeButton` | `boolean` | No | Shows or hides a close control where applicable. |
42+
| `disableDropdownPreselection` | `boolean` | No | Disables preselecting the first dropdown option when set to `true`. |
4143

4244
</TableWrapper>
4345

4446
## Slots
4547

46-
This container exposes the following slots for customization:
48+
This container exposes the following slots for customization. For examples and TypeScript shapes, see [ProductDetails (deprecated) slots](/dropins/product-details/slots/#productdetails-deprecated-slots).
4749

48-
<TableWrapper nowrap={[0,1]}>
50+
<TableWrapper nowrap={[0, 1]}>
4951

5052
| Slot | Type | Required | Description |
5153
|------|------|----------|-------------|
52-
| `Title` | `SlotProps` | No | |
53-
| `SKU` | `SlotProps` | No | |
54-
| `RegularPrice` | `SlotProps` | No | |
55-
| `SpecialPrice` | `SlotProps` | No | |
56-
| `Options` | `SlotProps` | No | |
57-
| `Quantity` | `SlotProps` | No | |
58-
| `Actions` | `SlotProps` | No | |
59-
| `ShortDescription` | `SlotProps` | No | |
60-
| `Description` | `SlotProps` | No | |
61-
| `Attributes` | `SlotProps` | No | |
62-
| `Breadcrumbs` | `SlotProps` | No | |
63-
| `GalleryContent` | `SlotProps` | No | |
64-
| `InfoContent` | `SlotProps` | No | |
65-
| `Content` | `SlotProps` | No | |
54+
| `Title` | `SlotProps` | No | Title area of the PDP. |
55+
| `SKU` | `SlotProps` | No | SKU line. |
56+
| `RegularPrice` | `SlotProps` | No | Regular price display. |
57+
| `SpecialPrice` | `SlotProps` | No | Special or sale price display. |
58+
| `Options` | `SlotProps` | No | Configurable options UI. |
59+
| `Quantity` | `SlotProps` | No | Quantity selector. |
60+
| `Actions` | `SlotProps` | No | Primary actions region (for example, add to cart). |
61+
| `ShortDescription` | `SlotProps` | No | Short description block. |
62+
| `Description` | `SlotProps` | No | Long description block. |
63+
| `Attributes` | `SlotProps` | No | Attributes list. |
64+
| `Breadcrumbs` | `SlotProps` | No | Breadcrumb trail. |
65+
| `GalleryContent` | `SlotProps` | No | Gallery region content. |
66+
| `InfoContent` | `SlotProps` | No | Secondary info column content. |
67+
| `Content` | `SlotProps` | No | General content region. |
6668

6769
</TableWrapper>
6870

6971
## Usage
7072

71-
The following example demonstrates how to use the `ProductDetails` container:
73+
The following example shows how older code rendered the `ProductDetails` container (deprecated):
7274

7375
```js
7476
import { render as provider } from '@dropins/storefront-pdp/render.js';
75-
import { ProductDetails } from '@dropins/storefront-pdp/containers/ProductDetails.js';
77+
import { ProductDetails } from '@dropins/storefront-pdp/containers/ProductDetails.js'; // (deprecated)
7678

7779
await provider.render(ProductDetails, {
78-
sku: "PRODUCT-SKU-123",
80+
sku: 'PRODUCT-SKU-123',
7981
productData: productData,
8082
hideSku: true,
8183
slots: {
8284
// Add custom slot implementations here
83-
}
85+
},
8486
})(block);
8587
```
86-
87-
88-

src/content/docs/dropins/product-details/containers/product-quantity.mdx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,12 @@ The `ProductQuantity` container provides the following configuration options:
2727
The following example demonstrates how to configure the `ProductQuantity` container:
2828

2929
```js
30-
return productRenderer.render(ProductDetails, {
30+
import { render as provider } from '@dropins/storefront-pdp/render.js';
31+
import ProductQuantity from '@dropins/storefront-pdp/containers/ProductQuantity.js';
32+
33+
await provider.render(ProductQuantity, {
3134
onValue: (value) => console.log(value),
32-
});
33-
```
35+
})(mountElement);
36+
```
37+
38+
Replace `mountElement` with the DOM node where the quantity control should appear.

0 commit comments

Comments
 (0)