Skip to content
This repository was archived by the owner on Jan 26, 2024. It is now read-only.

Commit 724732f

Browse files
authored
Merge branch 'develop' into bugfix/ui-improvements
2 parents 0661ce5 + 9cec3dc commit 724732f

File tree

5 files changed

+19
-9
lines changed

5 files changed

+19
-9
lines changed

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [1.8.3] - 2019.02.27
88

9-
10-
# Added
9+
### Added
1110
- New reactive helper to check online state. Usage: `import { onlineHelper } from '@vue-storefront/core/helpers'` and then `onlineHelper.isOnline` - @patzick (#2510)
1211

1312
### Fixed
1413
- Problem with placing second order (unbinding payment methods after first order) - @patzick (#2195, #2503)
1514
- Remaking order on user orders page - @patzick (#2480)
15+
- state.ts not bound in the module-template - @pkarw (#2496)
1616
- Validation in the Myprofile section for postcode field - @pkarw (#1317)
1717
- Non-integer qty of product added to the cart - @pkarw (#2517)
1818

@@ -43,6 +43,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4343
- fix price is never below 0 and user can't add 0 or below 0 products to cart @RakowskiPrzemyslaw (#2437)
4444
- Check for placing single order in case of error in any payment module - @patzick (#2409)
4545
- Display prices in products added in offline mode. - @patzick (#2450)
46+
- Improved styles on recommentation filters - @patzick (#2458)
4647

4748
### Deprecated / Removed
4849
- `@vue-storefront/store` package deprecated - @filrak

core/modules/catalog/store/product/actions.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import Vue from 'vue'
22
import { ActionTree } from 'vuex'
33
import * as types from './mutation-types'
4-
import { breadCrumbRoutes, productThumbnailPath } from '@vue-storefront/core/helpers'
4+
import { breadCrumbRoutes, productThumbnailPath, isServer } from '@vue-storefront/core/helpers'
55
import { currentStoreView } from '@vue-storefront/core/lib/multistore'
66
import { configureProductAsync,
77
doPlatformPricesSync,
@@ -617,18 +617,20 @@ const actions: ActionTree<ProductState, RootState> = {
617617
const productFields = Object.keys(product).filter(fieldName => {
618618
return rootStore.state.config.entities.product.standardSystemFields.indexOf(fieldName) < 0 // don't load metadata info for standard fields
619619
})
620-
subloaders.push(context.dispatch('attribute/list', { // load attributes to be shown on the product details - the request is now async
620+
const attributesPromise = context.dispatch('attribute/list', { // load attributes to be shown on the product details - the request is now async
621621
filterValues: rootStore.state.config.entities.product.useDynamicAttributeLoader ? productFields : null,
622622
only_visible: rootStore.state.config.entities.product.useDynamicAttributeLoader ? true : false,
623623
only_user_defined: true,
624624
includeFields: rootStore.state.config.entities.optimize ? rootStore.state.config.entities.attribute.includeFields : null
625-
}, { root: true }))
625+
}, { root: true }) // TODO: it might be refactored to kind of: `await context.dispatch('attributes/list) - or using new Promise() .. to wait for attributes to be loaded before executing the next action. However it may decrease the performance - so for now we're just waiting with the breadcrumbs
626626
if (Vue.prototype.$isServer) {
627+
subloaders.push(context.dispatch('setupBreadcrumbs', { product: product }))
627628
subloaders.push(context.dispatch('filterUnavailableVariants', { product: product }))
628629
} else {
630+
attributesPromise.then(() => context.dispatch('setupBreadcrumbs', { product: product })) // if this is client's side request postpone breadcrumbs setup till attributes are loaded to avoid too-early breadcrumb switch #2469
629631
context.dispatch('filterUnavailableVariants', { product: product }) // exec async
630632
}
631-
subloaders.push(context.dispatch('setupBreadcrumbs', { product: product }))
633+
subloaders.push(attributesPromise)
632634

633635
// subloaders.push(context.dispatch('setupVariants', { product: product })) -- moved to "product/single"
634636
/* if (product.type_id === 'grouped' || product.type_id === 'bundle') { -- moved to "product/single"

src/modules/module-template/store/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ import { ExampleState } from '../types/ExampleState'
33
import { mutations } from './mutations'
44
import { getters } from './getters'
55
import { actions } from './actions'
6+
import { state } from './state'
67

78
export const module: Module<ExampleState, any> = {
89
namespaced: true,
910
mutations,
1011
actions,
11-
getters
12+
getters,
13+
state
1214
}

src/themes/default/components/core/GenericSelector.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export default {
2626
height: 40px;
2727
padding-left: 8px;
2828
padding-right: 8px;
29+
min-width: 50px;
2930
3031
&:hover,
3132
&:focus {

src/themes/default/components/core/blocks/Category/Sidebar.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@
5252
:content="price.label"
5353
/>
5454
</div>
55-
<div v-else>
55+
<div v-else class="sidebar__inline-selecors">
5656
<generic-selector
5757
context="category"
58-
class="price-select mb10 block"
58+
class="mr10 mb10 block"
5959
:code="filterIndex"
6060
v-for="(option, index) in filter"
6161
:key="index"
@@ -108,5 +108,9 @@ export default {
108108
align-items: center;
109109
min-height: 47px;
110110
}
111+
112+
&__inline-selecors {
113+
display: flex;
114+
}
111115
}
112116
</style>

0 commit comments

Comments
 (0)