diff --git a/CHANGELOG.md b/CHANGELOG.md index 52cb2f88ee..b010e87959 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,9 +16,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed problem with cutting image height in category page on 1024px+ screen res - @AdKamil (#3781) - Fixed null value of search input - @AdKamil (#3778) - Fixed product sorting - @AdKamil (#3785) +- Fixed sorting on category page and product tile sizing - @andrzejewsky (#3817) - Redirect from simple product using url_path - @benjick (#3804) - ## [1.11.0-rc.2] - 2019.10.31 ### Added diff --git a/core/modules/catalog-next/store/category/actions.ts b/core/modules/catalog-next/store/category/actions.ts index 82703450dc..cf1ba8c136 100644 --- a/core/modules/catalog-next/store/category/actions.ts +++ b/core/modules/catalog-next/store/category/actions.ts @@ -34,7 +34,7 @@ const actions: ActionTree = { let filterQr = buildFilterProductsQuery(searchCategory, searchQuery.filters) const {items, perPage, start, total, aggregations} = await quickSearchByQuery({ query: filterQr, - sort: searchQuery.sort, + sort: searchQuery.sort || 'updated_at:desc', includeFields: entities.productList.includeFields, excludeFields: entities.productList.excludeFields, size: pageSize diff --git a/core/modules/user/test/unit/store/mutations.spec.ts b/core/modules/user/test/unit/store/mutations.spec.ts index ee29db182e..9ddca62aab 100644 --- a/core/modules/user/test/unit/store/mutations.spec.ts +++ b/core/modules/user/test/unit/store/mutations.spec.ts @@ -50,11 +50,13 @@ describe('User mutations', () => { describe('USER_START_SESSION', () => { it('should assign session_started', () => { + const sessionDate = new Date() + const stateMock = { - session_started: new Date() + session_started: sessionDate } const expectedState = { - session_started: new Date() + session_started: sessionDate } const wrapper = (mutations: any) => mutations[types.USER_START_SESSION](stateMock) @@ -163,5 +165,4 @@ describe('User mutations', () => { expect(stateMock).toEqual(expectedState) }) }) - }) diff --git a/src/themes/default/components/core/ProductTile.vue b/src/themes/default/components/core/ProductTile.vue index 59e87cd895..101b4dbf71 100644 --- a/src/themes/default/components/core/ProductTile.vue +++ b/src/themes/default/components/core/ProductTile.vue @@ -198,14 +198,11 @@ $color-white: color(white); .product-cover { overflow: hidden; - max-height: 300px; + &__thumb { padding-bottom: calc(143.88% / (164.5 / 100)); @media screen and (min-width: 768px) { - padding-bottom: calc(250% / (276.5 / 100)); - } - @media screen and (min-width: 1024px) { - padding-bottom: calc(200% / (276.5 / 100)); + padding-bottom: calc(300% / (276.5 / 100)); } opacity: 0.8; will-change: opacity, transform; diff --git a/src/themes/default/components/core/SortBy.vue b/src/themes/default/components/core/SortBy.vue index f05b15ef29..ddec54e72b 100644 --- a/src/themes/default/components/core/SortBy.vue +++ b/src/themes/default/components/core/SortBy.vue @@ -41,7 +41,7 @@ export default { value: { handler () { const defaultVariant = this.value && this.value.length ? this.value : products.defaultSortBy.attribute - this.sortby = this.sortingVariants.find(variant => variant.id === defaultVariant) + this.sortby = this.sortingVariants.find(variant => variant.id.includes(defaultVariant)) }, immediate: true }