Skip to content

Commit 5673e2c

Browse files
Merge branch 'main' into harms3d
* main: Update 1 translation file (Shopify#3847) Fix cart performance measurement to exclude debounce delays (Shopify#3833) Update 1 translation file (Shopify#3841) Update main from the latest release branch (Shopify#3828) remove accessibility labels for hidden elements in the product page (Shopify#3826) Update translations: Shopify#3803 (Shopify#3817) Create stale.yml (Shopify#3816) Surface Nested Cart Lines (Shopify#3803) add an aria label for product quantity (Shopify#3809) Update 2 translation files (Shopify#3814) Update translations: buyer (Shopify#3812) Update translations: merchant (Shopify#3811) Improve unit price display with the `unit_price_with_measurement_filter` (Shopify#3805) Update translations: merchant (Shopify#3793)
2 parents b7ddb79 + 28c420b commit 5673e2c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+334
-172
lines changed

.github/workflows/stale.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
2+
#
3+
# You can adjust the behavior by modifying this file.
4+
# For more information, see:
5+
# https://github.com/actions/stale
6+
name: Mark stale issues and pull requests
7+
8+
on:
9+
schedule:
10+
- cron: '38 16 * * *'
11+
12+
jobs:
13+
stale:
14+
15+
runs-on: ubuntu-latest
16+
permissions:
17+
issues: write
18+
pull-requests: write
19+
20+
steps:
21+
- uses: actions/stale@v5
22+
with:
23+
repo-token: ${{ secrets.GITHUB_TOKEN }}
24+
stale-issue-message: 'This issue has been marked as stale due to inactivity for 60 days. Please comment or update if this is still relevant, otherwise it will be closed in 7 days.'
25+
stale-pr-message: 'This pull request has been marked as stale due to inactivity for 60 days. If no further activity occurs, it will be closed in 7 days.'
26+
stale-issue-label: 'inactive'
27+
stale-pr-label: 'inactive'

assets/cart.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,9 @@ class CartItems extends HTMLElement {
145145
}
146146

147147
updateQuantity(line, quantity, event, name, variantId) {
148+
const eventTarget = event.currentTarget instanceof CartRemoveButton ? 'clear' : 'change';
149+
const cartPerformanceUpdateMarker = CartPerformance.createStartingMarker(`${eventTarget}:user-action`);
150+
148151
this.enableLoading(line);
149152

150153
const body = JSON.stringify({
@@ -153,7 +156,6 @@ class CartItems extends HTMLElement {
153156
sections: this.getSectionsToRender().map((section) => section.section),
154157
sections_url: window.location.pathname,
155158
});
156-
const eventTarget = event.currentTarget instanceof CartRemoveButton ? 'clear' : 'change';
157159

158160
fetch(`${routes.cart_change_url}`, { ...fetchConfig(), ...{ body } })
159161
.then((response) => {
@@ -162,7 +164,7 @@ class CartItems extends HTMLElement {
162164
.then((state) => {
163165
const parsedState = JSON.parse(state);
164166

165-
CartPerformance.measure(`${eventTarget}:paint-updated-sections"`, () => {
167+
CartPerformance.measure(`${eventTarget}:paint-updated-sections`, () => {
166168
const quantityElement =
167169
document.getElementById(`Quantity-${line}`) || document.getElementById(`Drawer-quantity-${line}`);
168170
const items = document.querySelectorAll('.cart-item');
@@ -182,7 +184,8 @@ class CartItems extends HTMLElement {
182184

183185
this.getSectionsToRender().forEach((section) => {
184186
const elementToReplace =
185-
document.getElementById(section.id).querySelector(section.selector) || document.getElementById(section.id);
187+
document.getElementById(section.id).querySelector(section.selector) ||
188+
document.getElementById(section.id);
186189
elementToReplace.innerHTML = this.getSectionInnerHTML(
187190
parsedState.sections[section.section],
188191
section.selector
@@ -212,8 +215,6 @@ class CartItems extends HTMLElement {
212215
}
213216
});
214217

215-
CartPerformance.measureFromEvent(`${eventTarget}:user-action`, event);
216-
217218
publish(PUB_SUB_EVENTS.cartUpdate, { source: 'cart-items', cartData: parsedState, variantId: variantId });
218219
})
219220
.catch(() => {
@@ -223,6 +224,7 @@ class CartItems extends HTMLElement {
223224
})
224225
.finally(() => {
225226
this.disableLoading(line);
227+
CartPerformance.measureFromMarker(`${eventTarget}:user-action`, cartPerformanceUpdateMarker);
226228
});
227229
}
228230

@@ -284,8 +286,9 @@ if (!customElements.get('cart-note')) {
284286
'input',
285287
debounce((event) => {
286288
const body = JSON.stringify({ note: event.target.value });
287-
fetch(`${routes.cart_update_url}`, { ...fetchConfig(), ...{ body } })
288-
.then(() => CartPerformance.measureFromEvent('note-update:user-action', event));
289+
fetch(`${routes.cart_update_url}`, { ...fetchConfig(), ...{ body } }).then(() =>
290+
CartPerformance.measureFromEvent('note-update:user-action', event)
291+
);
289292
}, ON_CHANGE_DEBOUNCE_TIMER)
290293
);
291294
}

assets/component-cart-drawer.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,11 @@ cart-drawer-items {
218218
max-width: 100%;
219219
}
220220

221+
.cart-drawer .cart-item__nested-line .cart-item__image {
222+
max-width: 60%;
223+
float: right;
224+
}
225+
221226
.cart-drawer .cart-items thead {
222227
margin-bottom: 0.5rem;
223228
}
@@ -255,6 +260,10 @@ cart-drawer-items {
255260
padding-top: 1.7rem;
256261
}
257262

263+
.cart-drawer .cart-items .cart-item__nested-line td:not(.cart-item__quantity) {
264+
padding-top: 1rem;
265+
}
266+
258267
.cart-drawer .cart-item > td + td {
259268
padding-left: 1rem;
260269
}

assets/component-cart-items.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@ cart-items .title-wrapper-with-link {
3232
align-items: flex-start;
3333
}
3434

35+
.cart-item__nested-line .cart-item__image-container {
36+
min-width: calc(10rem / var(--font-body-scale));
37+
justify-content: right;
38+
img {
39+
width: 60%;
40+
}
41+
}
42+
3543
.cart-item__image-container:after {
3644
content: none;
3745
}
@@ -237,6 +245,10 @@ cart-remove-button .icon-remove {
237245
margin-bottom: 3.5rem;
238246
}
239247

248+
.cart-item:has(+ .cart-item__nested-line) {
249+
margin-bottom: 1.5rem;
250+
}
251+
240252
.cart-item:last-child {
241253
margin-bottom: 0;
242254
}
@@ -290,6 +302,10 @@ cart-remove-button .icon-remove {
290302
padding-top: 4rem;
291303
}
292304

305+
.cart-items .cart-item__nested-line td {
306+
padding-top: 1rem;
307+
}
308+
293309
.cart-item {
294310
display: table-row;
295311
}

assets/component-price.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,5 @@
9696
letter-spacing: 0.04rem;
9797
line-height: calc(1 + 0.2 / var(--font-body-scale));
9898
margin-top: 0.2rem;
99-
text-transform: uppercase;
10099
color: rgba(var(--color-foreground), 0.7);
101100
}

assets/customer.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,6 @@
644644
letter-spacing: 0.07rem;
645645
line-height: calc(1 + 0.2 / var(--font-body-scale));
646646
margin-top: 0.2rem;
647-
text-transform: uppercase;
648647
color: rgba(var(--color-foreground), 0.7);
649648
}
650649

assets/product-info.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,19 @@ if (!customElements.get('product-info')) {
372372
}
373373
} else {
374374
current.innerHTML = updated.innerHTML;
375+
if (selector === '.quantity__label') {
376+
const updatedAriaLabelledBy = updated.getAttribute('aria-labelledby');
377+
if (updatedAriaLabelledBy) {
378+
current.setAttribute('aria-labelledby', updatedAriaLabelledBy);
379+
// Update the referenced visually hidden element
380+
const labelId = updatedAriaLabelledBy;
381+
const currentHiddenLabel = document.getElementById(labelId);
382+
const updatedHiddenLabel = html.getElementById(labelId);
383+
if (currentHiddenLabel && updatedHiddenLabel) {
384+
currentHiddenLabel.textContent = updatedHiddenLabel.textContent;
385+
}
386+
}
387+
}
375388
}
376389
}
377390
}

config/settings_schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
"name": "theme_info",
44
"theme_name": "Dawn Harms3D",
5-
"theme_version": "15.3.0",
5+
"theme_version": "15.4.0",
66
"theme_author": "Harms3D / Nils Schönwald",
77
"theme_documentation_url": "https://github.com/schoenwaldnils/dawn",
88
"theme_support_url": "https://github.com/schoenwaldnils/dawn"

locales/bg.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,8 @@
129129
"in_cart_html": "<span class=\"quantity-cart\">{{ quantity }}</span> в количката",
130130
"note": "Преглед на правилата за количества",
131131
"min_of": "Мин. {{ quantity }}",
132-
"max_of": "Макс. {{ quantity }}"
132+
"max_of": "Макс. {{ quantity }}",
133+
"in_cart_aria_label": "Количество ({{ quantity }} в количката)"
133134
},
134135
"price": {
135136
"from_price_html": "От {{ price }}",
@@ -163,6 +164,7 @@
163164
"load_video": "Пускане на видео {{ index }} във визуализатора на галерията",
164165
"image_available": "Изображение {{ index }} вече е налично във визуализатора на галерията"
165166
},
167+
"nested_label": "{{ title }} за {{ parent_title }}",
166168
"view_full_details": "Покажи пълните подробности",
167169
"shipping_policy_html": "<a href=\"{{ link }}\">Доставката</a> се изчислява при плащане.",
168170
"choose_options": "Изберете опции",

locales/cs.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,8 @@
138138
"in_cart_html": "<span class=\"quantity-cart\">{{ quantity }}</span> v košíku",
139139
"note": "Zobrazit pravidla množství",
140140
"min_of": "Minimum {{ quantity }}",
141-
"max_of": "Maximum {{ quantity }}"
141+
"max_of": "Maximum {{ quantity }}",
142+
"in_cart_aria_label": "Množství ({{ quantity }} v košíku)"
142143
},
143144
"price": {
144145
"from_price_html": "Od {{ price }}",
@@ -165,6 +166,7 @@
165166
"load_video": "Přehrát video {{ index }} v zobrazení galerie",
166167
"image_available": "Obrázek {{ index }} je nyní k dispozici v zobrazení galerie"
167168
},
169+
"nested_label": "{{ title }} pro {{ parent_title }}",
168170
"view_full_details": "Zobrazit veškeré podrobnosti",
169171
"shipping_policy_html": "<a href=\"{{ link }}\">Poštovné</a> se vypočítá na pokladně.",
170172
"choose_options": "Výběr možností",

0 commit comments

Comments
 (0)