Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix selector for Quick Add Bulk #3421

Merged
merged 3 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions assets/quick-add-bulk.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,9 @@ if (!customElements.get('quick-add-bulk')) {
getSectionsToRender() {
return [
{
id: `quick-add-bulk-${this.dataset.id}-${this.closest('.collection').dataset.id}`,
section: this.closest('.collection').dataset.id,
selector: `#quick-add-bulk-${this.dataset.id}-${this.closest('.collection').dataset.id}`
id: `quick-add-bulk-${this.dataset.id}-${this.closest('.collection-quick-add-bulk').dataset.id}`,
section: this.closest('.collection-quick-add-bulk').dataset.id,
selector: `#quick-add-bulk-${this.dataset.id}-${this.closest('.collection-quick-add-bulk').dataset.id}`
},
{
id: 'cart-icon-bubble',
Expand Down
2 changes: 1 addition & 1 deletion sections/featured-collection.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
class="color-{{ section.settings.color_scheme }} isolate gradient"
>
<div
class="collection section-{{ section.id }}-padding{% if section.settings.full_width %} collection--full-width{% endif %}"
class="collection{% if section.settings.quick_add == 'bulk' %} collection-quick-add-bulk{% endif %} section-{{ section.id }}-padding{% if section.settings.full_width %} collection--full-width{% endif %}"
id="collection-{{ section.id }}"
data-id="{{ section.id }}"
>
Expand Down Expand Up @@ -103,16 +103,16 @@
style="--animation-order: {{ forloop.index }};"
{% endif %}
>
{% render 'card-product',
card_product: product,
media_aspect_ratio: section.settings.image_ratio,
image_shape: section.settings.image_shape,
show_secondary_image: section.settings.show_secondary_image,
show_vendor: section.settings.show_vendor,
show_rating: section.settings.show_rating,
section_id: section.id,
quick_add: section.settings.quick_add
%}

Check warning on line 115 in sections/featured-collection.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/featured-collection.liquid#L106-L115

[NestedSnippet] Too many nested snippets

Check warning on line 115 in sections/featured-collection.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/featured-collection.liquid#L106-L115

[NestedSnippet] Too many nested snippets

Check warning on line 115 in sections/featured-collection.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/featured-collection.liquid#L106-L115

[NestedSnippet] Too many nested snippets

Check warning on line 115 in sections/featured-collection.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/featured-collection.liquid#L106-L115

[NestedSnippet] Too many nested snippets

Check warning on line 115 in sections/featured-collection.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/featured-collection.liquid#L106-L115

[NestedSnippet] Too many nested snippets

Check warning on line 115 in sections/featured-collection.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/featured-collection.liquid#L106-L115

[NestedSnippet] Too many nested snippets

Check warning on line 115 in sections/featured-collection.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/featured-collection.liquid#L106-L115

[NestedSnippet] Too many nested snippets

Check warning on line 115 in sections/featured-collection.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/featured-collection.liquid#L106-L115

[NestedSnippet] Too many nested snippets

Check warning on line 115 in sections/featured-collection.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/featured-collection.liquid#L106-L115

[NestedSnippet] Too many nested snippets

Check warning on line 115 in sections/featured-collection.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/featured-collection.liquid#L106-L115

[NestedSnippet] Too many nested snippets

Check warning on line 115 in sections/featured-collection.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/featured-collection.liquid#L106-L115

[NestedSnippet] Too many nested snippets

Check warning on line 115 in sections/featured-collection.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/featured-collection.liquid#L106-L115

[NestedSnippet] Too many nested snippets

Check warning on line 115 in sections/featured-collection.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/featured-collection.liquid#L106-L115

[NestedSnippet] Too many nested snippets

Check warning on line 115 in sections/featured-collection.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/featured-collection.liquid#L106-L115

[NestedSnippet] Too many nested snippets
</li>
{%- else -%}
{%- for i in (1..section.settings.columns_desktop) -%}
Expand All @@ -133,12 +133,12 @@
endcase
%}
{%- assign placeholder_image = 'product-apparel-' | append: ridx -%}
{% render 'card-product',
show_vendor: section.settings.show_vendor,
media_aspect_ratio: section.settings.image_ratio,
image_shape: section.settings.image_shape,
placeholder_image: placeholder_image
%}

Check warning on line 141 in sections/featured-collection.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/featured-collection.liquid#L136-L141

[NestedSnippet] Too many nested snippets

Check warning on line 141 in sections/featured-collection.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/featured-collection.liquid#L136-L141

[NestedSnippet] Too many nested snippets

Check warning on line 141 in sections/featured-collection.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/featured-collection.liquid#L136-L141

[NestedSnippet] Too many nested snippets

Check warning on line 141 in sections/featured-collection.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/featured-collection.liquid#L136-L141

[NestedSnippet] Too many nested snippets

Check warning on line 141 in sections/featured-collection.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/featured-collection.liquid#L136-L141

[NestedSnippet] Too many nested snippets

Check warning on line 141 in sections/featured-collection.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/featured-collection.liquid#L136-L141

[NestedSnippet] Too many nested snippets

Check warning on line 141 in sections/featured-collection.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/featured-collection.liquid#L136-L141

[NestedSnippet] Too many nested snippets

Check warning on line 141 in sections/featured-collection.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/featured-collection.liquid#L136-L141

[NestedSnippet] Too many nested snippets

Check warning on line 141 in sections/featured-collection.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/featured-collection.liquid#L136-L141

[NestedSnippet] Too many nested snippets

Check warning on line 141 in sections/featured-collection.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/featured-collection.liquid#L136-L141

[NestedSnippet] Too many nested snippets

Check warning on line 141 in sections/featured-collection.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/featured-collection.liquid#L136-L141

[NestedSnippet] Too many nested snippets

Check warning on line 141 in sections/featured-collection.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/featured-collection.liquid#L136-L141

[NestedSnippet] Too many nested snippets

Check warning on line 141 in sections/featured-collection.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/featured-collection.liquid#L136-L141

[NestedSnippet] Too many nested snippets

Check warning on line 141 in sections/featured-collection.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/featured-collection.liquid#L136-L141

[NestedSnippet] Too many nested snippets
</li>
{%- endfor -%}
{%- endfor -%}
Expand Down Expand Up @@ -190,7 +190,7 @@
</div>
</div>

{% schema %}

Check notice on line 193 in sections/featured-collection.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/featured-collection.liquid#L193

[SchemaJsonFormat] JSON formatting could be improved
{
"name": "t:sections.featured-collection.name",
"tag": "section",
Expand Down
3 changes: 2 additions & 1 deletion sections/main-collection-product-grid.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,15 @@
{%- else -%}
<div
class="collection{% if section.settings.filter_type != 'vertical' %} page-width{% endif %}"
data-id="{{ section.id }}"
>
<div class="loading-overlay gradient"></div>
<ul
id="product-grid"
data-id="{{ section.id }}"
class="
grid product-grid grid--{{ section.settings.columns_mobile }}-col-tablet-down
grid--{{ section.settings.columns_desktop }}-col-desktop
{% if section.settings.quick_add == 'bulk' %} collection-quick-add-bulk{% endif %}
"
>
{%- for product in collection.products -%}
Expand All @@ -161,17 +162,17 @@
style="--animation-order: {{ forloop.index }};"
{% endif %}
>
{% render 'card-product',
card_product: product,
media_aspect_ratio: section.settings.image_ratio,
image_shape: section.settings.image_shape,
show_secondary_image: section.settings.show_secondary_image,
show_vendor: section.settings.show_vendor,
show_rating: section.settings.show_rating,
lazy_load: lazy_load,
quick_add: section.settings.quick_add,
section_id: section.id
%}

Check warning on line 175 in sections/main-collection-product-grid.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/main-collection-product-grid.liquid#L165-L175

[NestedSnippet] Too many nested snippets

Check warning on line 175 in sections/main-collection-product-grid.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/main-collection-product-grid.liquid#L165-L175

[NestedSnippet] Too many nested snippets

Check warning on line 175 in sections/main-collection-product-grid.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/main-collection-product-grid.liquid#L165-L175

[NestedSnippet] Too many nested snippets

Check warning on line 175 in sections/main-collection-product-grid.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/main-collection-product-grid.liquid#L165-L175

[NestedSnippet] Too many nested snippets

Check warning on line 175 in sections/main-collection-product-grid.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/main-collection-product-grid.liquid#L165-L175

[NestedSnippet] Too many nested snippets

Check warning on line 175 in sections/main-collection-product-grid.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/main-collection-product-grid.liquid#L165-L175

[NestedSnippet] Too many nested snippets

Check warning on line 175 in sections/main-collection-product-grid.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/main-collection-product-grid.liquid#L165-L175

[NestedSnippet] Too many nested snippets

Check warning on line 175 in sections/main-collection-product-grid.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/main-collection-product-grid.liquid#L165-L175

[NestedSnippet] Too many nested snippets

Check warning on line 175 in sections/main-collection-product-grid.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/main-collection-product-grid.liquid#L165-L175

[NestedSnippet] Too many nested snippets

Check warning on line 175 in sections/main-collection-product-grid.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/main-collection-product-grid.liquid#L165-L175

[NestedSnippet] Too many nested snippets

Check warning on line 175 in sections/main-collection-product-grid.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/main-collection-product-grid.liquid#L165-L175

[NestedSnippet] Too many nested snippets

Check warning on line 175 in sections/main-collection-product-grid.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/main-collection-product-grid.liquid#L165-L175

[NestedSnippet] Too many nested snippets

Check warning on line 175 in sections/main-collection-product-grid.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/main-collection-product-grid.liquid#L165-L175

[NestedSnippet] Too many nested snippets

Check warning on line 175 in sections/main-collection-product-grid.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/main-collection-product-grid.liquid#L165-L175

[NestedSnippet] Too many nested snippets
</li>
{%- endfor -%}
</ul>
Expand Down
Loading