Skip to content

Commit b84ddc0

Browse files
authored
Merge pull request #2394 from DivanteLtd/develop
Release 1.8
2 parents 8e60b15 + d7fc2d9 commit b84ddc0

File tree

295 files changed

+2880
-1616
lines changed

Some content is hidden

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

295 files changed

+2880
-1616
lines changed

CHANGELOG.md

Lines changed: 64 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,67 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7-
## [Unreleased]
8-
- Fix SSR mismatch in `compare` and `wishlist` modules. Load data from local cache after component is mounted - @patzick (#2321)
7+
## [1.8.0] - 2019.02.07
8+
Additional migration tips are available [here](https://github.com/DivanteLtd/vue-storefront/blob/master/docs/guide/upgrade-notes/README.md).
9+
10+
### Added
11+
- Chinese translation added - @wadereye (#2265)
12+
- Categories filter in search view - @kjugi, @patzick (#1710)
13+
- AsyncDataLoader feature - @pkarw (#2300)
14+
- Events list page in docs - @jablpiotrek (#776)
15+
- Keyboard support for account and cookie close buttons - @anqaka (#2258)
16+
- Support typescript in build scripts - @marlass, @patzick (#2260, #2273, #2324)
17+
- Possibility to have sticky notifications - @phoenixdev-kl (#2307)
18+
- Added a scss to manage global form style - @lorenaramonda (#2316)
19+
- Manage products with zero price - @MarcoGrecoBitbull (#2327)
20+
21+
### Changed / Improved
22+
- Theme structure improvements - @filrak (#2223)
23+
- Type interfaces and refactor - @filrak (#2227, #2267)
24+
- Changed beforeRegistration and afterRegistration hooks signature. Now it contains only one object VSF. The subfields are the same as before so changing `beforeRegistration( Vue, config, store, isServer )` to `beforeRegistration({ Vue, config, store, isServer })`(and same with `afterRegistration`) is enough to make a proper migration to new API. - @filrak (#2330)
25+
- Typo fixes - @youanden, Micheledinocera (#2229, #2329)
26+
- Bundle products price calculation fix - @pkarw (#2371)
27+
- Added hotjar snippet and dixed isServer flag in module hooks - @lukeromanowicz (#840)
28+
- Location of type files - @kruchy8 (#2226)
29+
- Improved theme registration - @lukeromanowicz (#2233)
30+
- SSR renderings for logged in users - @vue-kacper (#2234)
31+
- ElasticSearch fuzzy search - @qbo-tech (#2340, #2354)
32+
- Documentation improvements - @martaradziszewska, @wilfriedwolf, @fvillata, @pkarw (#2210, #2244, #2289, #2369)
33+
- Support regional characters in urls - @Aekal (#2243)
34+
- `store/lib/search` has been moved to `core/lib/search` - @lukeromanowicz (#2225)
35+
- `store/lib/multistore` has been moved to `core/lib/multistore` - @lukeromanowicz (#2224)
36+
- BaseSelect syntax improvements - @jszczech (#2237)
37+
- Optional cart discounts display on side cart - @mcspronko (#1758)
38+
- Special price dates checking - backport of @igloczek's (#2245)
39+
- Category filters reset functionality on mobile - @vue-kacper, @patzick, @renatocason (#2262)
40+
- Improve sortBy mobile view - @martaradziszewska (#2251)
41+
- Slide animations to menu, search, wishlist and minicart components - @Aekal (#2256)
42+
- Fixed wishlist store module to not be lazy loaded - @vue-kacper (#2249)
43+
- Share webpack typescript config with docker container - @lukeromanowicz (#2269)
44+
- After checkout create logged-in cart for logged-in users if using order Direct Backend Sync - @grimasod (#2302)
45+
- Output cache clearing supports versioning - @igloczek (#2333, #2359)
46+
- Cash on delivery + Shipping addresses fixed for virtual products - @pkarw (#2366)
47+
- Improved static pages caching strategy - @pkarw (#2281)
48+
- Magento 2.3 MSI work-around (it's still not supported fully) - @pkarw (#2366)
49+
- Product zoom picture centered - @ptylek (#2178)
50+
- Fixed tracking in analytics module - @jahvi (#2278)
51+
- Improved merge the store modules array with extended module config - @DaanKouters (#2274)
52+
- ElasticSearch fuzzy search, scoring, boosting + other improvements - @qbo-tech (#2340)
53+
- Turned off compression plugin, nginx serves brotli compression  — @patzick (#2254)
54+
- Improved user account menu UX on desktop - @vue-kacper (#2363)
55+
- Added About us missing route - @lorenaramonda (#2320)
56+
- Fixed used variable for products count in category - @renatocason (#2304)
57+
- Override console with logger - @daaru00 (#2235)
58+
- Fixed variable call about feedback email - @PhantomDraven (#2318)
59+
- Output cache clearing versioning - @igloczek (#2333)
60+
- Improved paddings on select fields - @patzick (#2361)
61+
- Fixed lack of modal backdrop - @vue-kacper, @giuliachiola (#2319)
62+
- Form validations and improvements - @vue-kacper (#2348, #2349, #2347)
63+
- Changing product quantity in catr - @mdanilowicz (#2345)
64+
- Product attribute values as array - @afirlejczyk (#2379)
65+
- Improved fetching customAttributes - @afirlejczyk (#2107)
66+
- Removed compare button from product mobile view - @patzick (#2370)
67+
- Configurable options attribute descriptor - @pkarw (#2384)
968

1069
## [1.7.3] - 2019.01.31
1170
### Fixed
@@ -20,9 +79,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2079
- url_key adjustment after m2vs fix - @pkarw (#2215)
2180
- Service worker removed from dev mode because of the side effects - @pkarw
2281
- `networkFirst` first caching strategy for /api/catalog - @pkarw
23-
- Special price dates checking - backport of @igloczek's (#2245)
2482
- SSR detection in components - @patzick (#2173)
2583

84+
### Added
85+
- Hotjar extension (#840)
86+
2687
### Changed
2788
- compress banner images - @patzick (#2280)
2889
- Dynamic attributes loader (#2137)

config/default.json

Lines changed: 37 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
"useUrlDispatcher": false
2121
},
2222
"console": {
23-
"verbosityLevel": "only-errors"
23+
"showErrorOnProduction" : true,
24+
"verbosityLevel": "display-everything"
2425
},
2526
"redis": {
2627
"host": "localhost",
@@ -39,7 +40,34 @@
3940
"csrTimeout": 5000,
4041
"ssrTimeout": 1000,
4142
"queryMethod": "GET",
42-
"disableLocalStorageQueriesCache": true
43+
"disableLocalStorageQueriesCache": true,
44+
"searchScoring": {
45+
"attributes": {
46+
"attribute_code": {
47+
"scoreValues": { "attribute_value": { "weight": 1 } }
48+
}
49+
},
50+
"fuzziness": 2,
51+
"cutoff_frequency": 0.01,
52+
"max_expansions": 3,
53+
"minimum_should_match": "75%",
54+
"prefix_length": 2,
55+
"boost_mode": "multiply",
56+
"score_mode": "multiply",
57+
"max_boost": 100,
58+
"function_min_score": 1
59+
},
60+
"searchableAttributes": {
61+
"name": {
62+
"boost": 4
63+
},
64+
"sku": {
65+
"boost": 2
66+
},
67+
"category.name": {
68+
"boost": 1
69+
}
70+
}
4371
},
4472
"ssr": {
4573
"templates": {
@@ -206,6 +234,7 @@
206234
"setCustomProductOptions": true,
207235
"setConfigurableProductOptions": true,
208236
"askBeforeRemoveProduct": true,
237+
"displayItemDiscounts": true,
209238
"create_endpoint": "http://localhost:8080/api/cart/create?token={{token}}",
210239
"updateitem_endpoint": "http://localhost:8080/api/cart/update?token={{token}}&cartId={{cartId}}",
211240
"deleteitem_endpoint": "http://localhost:8080/api/cart/delete?token={{token}}&cartId={{cartId}}",
@@ -226,7 +255,7 @@
226255
"configurableChildrenStockPrefetchDynamic": false,
227256
"configurableChildrenStockPrefetchStaticPrefetchCount": 8,
228257
"filterUnavailableVariants": false,
229-
"listOutOfStockProducts": false,
258+
"listOutOfStockProducts": true,
230259
"preventConfigurableChildrenDirectAccess": true,
231260
"alwaysSyncPlatformPricesOver": false,
232261
"clearPricesBeforePlatformSync": false,
@@ -367,6 +396,9 @@
367396
"analytics": {
368397
"id": false
369398
},
399+
"hotjar": {
400+
"id": false
401+
},
370402
"cms": {
371403
"endpoint": "http://localhost:8080/api/ext/cms-data/cms{{type}}/{{cmsId}}",
372404
"endpointIdentifier": "http://localhost:8080/api/ext/cms-data/cms{{type}}Identifier/{{cmsIdentifier}}/storeId/{{storeId}}"
@@ -378,14 +410,7 @@
378410
"max_count": 500
379411
},
380412
"usePriceTiers": false,
381-
"boost": {
382-
"name": 3,
383-
"category.name": 1,
384-
"short_description": 1,
385-
"description": 1,
386-
"sku": 1,
387-
"configurable_children.sku": 1
388-
},
413+
"useZeroPriceProduct": true,
389414
"query": {
390415
"inspirations": {
391416
"filter": [
@@ -422,3 +447,4 @@
422447
}
423448

424449
}
450+

core/app.ts

Lines changed: 17 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import { Store } from 'vuex'
2-
import RootState from '@vue-storefront/store/types/RootState'
2+
import RootState from '@vue-storefront/core/types/RootState'
33
import Vue from 'vue'
44
import buildTimeConfig from 'config'
55
import { isServer } from '@vue-storefront/core/helpers'
6+
import { Logger } from '@vue-storefront/core/lib/logger'
67

78
// Plugins
89
import i18n from '@vue-storefront/i18n'
@@ -18,14 +19,16 @@ import { getApolloProvider } from './scripts/resolvers/resolveGraphQL'
1819

1920
// TODO simplify by removing global mixins, plugins and filters - it can be done in normal 'vue' way
2021
import { registerTheme } from '@vue-storefront/core/lib/themes'
22+
import { themeEntry } from 'theme/index.js'
2123
import { registerModules } from '@vue-storefront/core/lib/module'
22-
import { prepareStoreView } from '@vue-storefront/store/lib/multistore'
23-
import { plugins, mixins, filters } from '@vue-storefront/core/compatibility/lib/themes'
24+
import { prepareStoreView } from '@vue-storefront/core/lib/multistore'
25+
26+
import * as coreMixins from '@vue-storefront/core/mixins'
27+
import * as coreFilters from '@vue-storefront/core/filters'
28+
import * as corePlugins from '@vue-storefront/core/compatibility/plugins'
29+
2430
import { once } from '@vue-storefront/core/helpers'
2531
import { takeOverConsole } from '@vue-storefront/core/helpers/log'
26-
27-
// Entrys
28-
import App from 'theme/App.vue'
2932
import store from '@vue-storefront/store'
3033

3134
import { enabledModules } from './modules-entry'
@@ -57,13 +60,6 @@ let router: VueRouter = null
5760

5861
Vue.use(VueRouter)
5962

60-
// Will be depreciated in 1.7. Now we are using Logger instead of logs
61-
if (buildTimeConfig.console.verbosityLevel !== 'display-everything' && process.env.NODE_ENV === 'production') {
62-
once('__TAKE_OVER_CONSOLE__', () => {
63-
takeOverConsole(buildTimeConfig.console.verbosityLevel)
64-
})
65-
}
66-
6763
const createApp = async (ssrContext, config): Promise<{app: Vue, router: VueRouter, store: Store<RootState>}> => {
6864
router = createRouter()
6965
// sync router with vuex 'router' store
@@ -86,36 +82,28 @@ const createApp = async (ssrContext, config): Promise<{app: Vue, router: VueRou
8682

8783
// to depreciate in near future
8884
once('__VUE_EXTEND__', () => {
89-
console.debug('Registering Vue plugins')
90-
require('theme/plugins')
91-
const pluginsObject = plugins()
92-
Object.keys(pluginsObject).forEach(key => {
93-
Vue.use(pluginsObject[key])
85+
Object.keys(corePlugins).forEach(key => {
86+
Vue.use(corePlugins[key])
9487
})
9588

96-
console.debug('Registering Vue mixins')
97-
const mixinsObject = mixins()
98-
Object.keys(mixinsObject).forEach(key => {
99-
Vue.mixin(mixinsObject[key])
89+
Object.keys(coreMixins).forEach(key => {
90+
Vue.mixin(coreMixins[key])
10091
})
10192
})
10293

103-
const filtersObject = filters()
104-
Object.keys(filtersObject).forEach(key => {
105-
Vue.filter(key, filtersObject[key])
94+
Object.keys(coreFilters).forEach(key => {
95+
Vue.filter(key, coreFilters[key])
10696
})
10797

10898
let vueOptions = {
10999
router,
110100
store,
111101
i18n,
112-
render: h => h(App)
102+
render: h => h(themeEntry)
113103
}
114104

115105
const apolloProvider = await getApolloProvider()
116-
if (apolloProvider) {
117-
Object.assign(vueOptions, {provider: apolloProvider})
118-
}
106+
if (apolloProvider) Object.assign(vueOptions, {provider: apolloProvider})
119107

120108
const app = new Vue(vueOptions)
121109

core/build/dev-server.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ let baseServerConfig = require('./webpack.server.config')
88
const themeRoot = require('./theme-path')
99
const extendedConfig = require(path.join(themeRoot, '/webpack.config.js'))
1010

11-
let clientConfig = extendedConfig(baseClientConfig, { isClient: true, isDev: true })
12-
let serverConfig = extendedConfig(baseServerConfig, { isClient: false, isDev: true })
11+
let clientConfig = extendedConfig(baseClientConfig, { isClient: true, isDev: true }).default;
12+
let serverConfig = extendedConfig(baseServerConfig, { isClient: false, isDev: true }).default;
1313

1414
module.exports = function setupDevServer (app, cb) {
1515
let bundle

core/build/theme-path.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const path = require('path')
22
const detectInstalled = require('detect-installed')
33
const config = require('./config.json')
44

5-
let themePath = '';
5+
let themePath = ''
66
let themeName = config.theme
77

88
if (detectInstalled.sync(config.theme, { local: true })) {

core/build/webpack.base.config.js renamed to core/build/webpack.base.config.ts

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
const path = require('path')
2-
const config = require('config')
3-
const fs = require('fs')
4-
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin')
5-
const VueLoaderPlugin = require('vue-loader/lib/plugin')
6-
const autoprefixer = require('autoprefixer')
7-
const HTMLPlugin = require('html-webpack-plugin')
1+
import path from 'path';
2+
import config from 'config';
3+
import fs from 'fs';
4+
import CaseSensitivePathsPlugin from 'case-sensitive-paths-webpack-plugin';
5+
import VueLoaderPlugin from 'vue-loader/lib/plugin';
6+
import autoprefixer from 'autoprefixer';
7+
import HTMLPlugin from 'html-webpack-plugin';
88
// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
9-
const webpack = require('webpack')
9+
import webpack from 'webpack';
1010

1111
fs.writeFileSync(
1212
path.resolve(__dirname, './config.json'),
@@ -15,14 +15,14 @@ fs.writeFileSync(
1515

1616
const themesRoot = '../../src/themes'
1717

18-
const themeRoot = require('./theme-path')
18+
import themeRoot from './theme-path';
1919
const themeResources = themeRoot + '/resource'
2020
const themeCSS = themeRoot + '/css'
2121
const themeApp = themeRoot + '/App.vue'
2222
const themedIndex = path.join(themeRoot, 'index.template.html')
23-
const themedIndexMinimal = path.join(themeRoot, 'index.minimal.template.html')
24-
const themedIndexBasic = path.join(themeRoot, 'index.basic.template.html')
25-
const themedIndexAmp = path.join(themeRoot, 'index.amp.template.html')
23+
const themedIndexMinimal = path.join(themeRoot, '/templates/index.minimal.template.html')
24+
const themedIndexBasic = path.join(themeRoot, '/templates/index.basic.template.html')
25+
const themedIndexAmp = path.join(themeRoot, '/templates/index.amp.template.html')
2626

2727
const translationPreprocessor = require('@vue-storefront/i18n/scripts/translation.preprocessor.js')
2828
translationPreprocessor([
@@ -44,7 +44,7 @@ const postcssConfig = {
4444
};
4545
const isProd = process.env.NODE_ENV === 'production'
4646
// todo: usemultipage-webpack-plugin for multistore
47-
module.exports = {
47+
export default {
4848
plugins: [
4949
new webpack.ProgressPlugin(),
5050
// new BundleAnalyzerPlugin({
@@ -107,7 +107,10 @@ module.exports = {
107107
'theme': themeRoot,
108108
'theme/app': themeApp,
109109
'theme/css': themeCSS,
110-
'theme/resource': themeResources
110+
'theme/resource': themeResources,
111+
112+
// Backward compatible
113+
'@vue-storefront/store/lib/multistore' : path.resolve(__dirname, '../lib/multistore.ts'),
111114
}
112115
},
113116
module: {

core/build/webpack.client.config.js renamed to core/build/webpack.client.config.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
const webpack = require('webpack')
2-
const merge = require('webpack-merge')
3-
const base = require('./webpack.base.config')
4-
const VueSSRClientPlugin = require('vue-server-renderer/client-plugin')
1+
import webpack from 'webpack'
2+
import merge from 'webpack-merge'
3+
import base from './webpack.base.config'
4+
import VueSSRClientPlugin from 'vue-server-renderer/client-plugin'
55
// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
66

77
const config = merge(base, {
@@ -14,7 +14,7 @@ const config = merge(base, {
1414
chunks: 'all',
1515
},
1616
},
17-
},
17+
},
1818
runtimeChunk: {
1919
name: "manifest",
2020
}
@@ -35,4 +35,4 @@ const config = merge(base, {
3535
]
3636
})
3737

38-
module.exports = config;
38+
export default config;

core/build/webpack.prod.client.config.js

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)