Skip to content

Commit

Permalink
CR fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
tolerants committed Oct 15, 2024
1 parent 4f99bee commit 7047bb6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,19 @@
}

&__category-target {
@include helper-effect-transition(max-height);
overflow: hidden;
max-height: rem(10000);
opacity: 1;
@include helper-effect-transition(grid-template-rows);
display: grid;
grid-template-rows: 1fr;

&--hidden {
max-height: 0;
opacity: 0;
grid-template-rows: 0fr;
}
}

&__category-target-inner {
overflow: hidden;
}

&__category-toggle-button {
color: $setting-color-gray-3;
@include helper-effect-transition(transform);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
{% endif %}
{% endfor %}

{% if quantity > 0 %}
{% if quantity > 0 or (quantity == 0 and data.isEmptyCategoryFilterValueVisible) %}
{% if data.filterPath is not empty %}
{% set currentUrl = url(data.filterPath, {categoryPath: (app.request.attributes.get('categoryPath'))}) %}
{% else %}
Expand All @@ -52,6 +52,7 @@
{% set targetCategoryClassName = config.jsName ~ '__category-target-' ~ categoryNamePrepared %}
{% set targetTogglerClassName = config.jsName ~ '__toggler-target-' ~ categoryNamePrepared %}
{% set classToToggle = config.name ~ '__category-target' %}
{% set categoryTargetInner = config.name ~ '__category-target-inner' %}
{% set classToToggleModifier = classToToggle ~ '--hidden' %}
{% set toggleButtonClassName = config.name ~ '__category-toggle-button' %}

Expand Down Expand Up @@ -99,16 +100,18 @@

{% if hasChildren %}
<div class="{{ classToToggle }} {{ targetCategoryClassName }}">
{% include molecule('filter-category', 'CatalogPage') with {
data: {
filter: data.filter,
filterPath: data.filterPath,
categories: categoryNode.children,
levelMenu: data.levelMenu + 1,
parentJsName: data.parentJsName,
isEmptyCategoryFilterValueVisible: data.isEmptyCategoryFilterValueVisible,
},
} only %}
<div class="{{ categoryTargetInner }}">
{% include molecule('filter-category', 'CatalogPage') with {
data: {
filter: data.filter,
filterPath: data.filterPath,
categories: categoryNode.children,
levelMenu: data.levelMenu + 1,
parentJsName: data.parentJsName,
isEmptyCategoryFilterValueVisible: data.isEmptyCategoryFilterValueVisible,
},
} only %}
</div>
</div>
{% endif %}
</div>
Expand Down

0 comments on commit 7047bb6

Please sign in to comment.