Skip to content

Commit

Permalink
Merge pull request #2394 from DivanteLtd/develop
Browse files Browse the repository at this point in the history
Release 1.8
  • Loading branch information
patzick authored Feb 7, 2019
2 parents 8e60b15 + d7fc2d9 commit b84ddc0
Show file tree
Hide file tree
Showing 295 changed files with 2,880 additions and 1,616 deletions.
67 changes: 64 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,67 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
- Fix SSR mismatch in `compare` and `wishlist` modules. Load data from local cache after component is mounted - @patzick (#2321)
## [1.8.0] - 2019.02.07
Additional migration tips are available [here](https://github.com/DivanteLtd/vue-storefront/blob/master/docs/guide/upgrade-notes/README.md).

### Added
- Chinese translation added - @wadereye (#2265)
- Categories filter in search view - @kjugi, @patzick (#1710)
- AsyncDataLoader feature - @pkarw (#2300)
- Events list page in docs - @jablpiotrek (#776)
- Keyboard support for account and cookie close buttons - @anqaka (#2258)
- Support typescript in build scripts - @marlass, @patzick (#2260, #2273, #2324)
- Possibility to have sticky notifications - @phoenixdev-kl (#2307)
- Added a scss to manage global form style - @lorenaramonda (#2316)
- Manage products with zero price - @MarcoGrecoBitbull (#2327)

### Changed / Improved
- Theme structure improvements - @filrak (#2223)
- Type interfaces and refactor - @filrak (#2227, #2267)
- 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)
- Typo fixes - @youanden, Micheledinocera (#2229, #2329)
- Bundle products price calculation fix - @pkarw (#2371)
- Added hotjar snippet and dixed isServer flag in module hooks - @lukeromanowicz (#840)
- Location of type files - @kruchy8 (#2226)
- Improved theme registration - @lukeromanowicz (#2233)
- SSR renderings for logged in users - @vue-kacper (#2234)
- ElasticSearch fuzzy search - @qbo-tech (#2340, #2354)
- Documentation improvements - @martaradziszewska, @wilfriedwolf, @fvillata, @pkarw (#2210, #2244, #2289, #2369)
- Support regional characters in urls - @Aekal (#2243)
- `store/lib/search` has been moved to `core/lib/search` - @lukeromanowicz (#2225)
- `store/lib/multistore` has been moved to `core/lib/multistore` - @lukeromanowicz (#2224)
- BaseSelect syntax improvements - @jszczech (#2237)
- Optional cart discounts display on side cart - @mcspronko (#1758)
- Special price dates checking - backport of @igloczek's (#2245)
- Category filters reset functionality on mobile - @vue-kacper, @patzick, @renatocason (#2262)
- Improve sortBy mobile view - @martaradziszewska (#2251)
- Slide animations to menu, search, wishlist and minicart components - @Aekal (#2256)
- Fixed wishlist store module to not be lazy loaded - @vue-kacper (#2249)
- Share webpack typescript config with docker container - @lukeromanowicz (#2269)
- After checkout create logged-in cart for logged-in users if using order Direct Backend Sync - @grimasod (#2302)
- Output cache clearing supports versioning - @igloczek (#2333, #2359)
- Cash on delivery + Shipping addresses fixed for virtual products - @pkarw (#2366)
- Improved static pages caching strategy - @pkarw (#2281)
- Magento 2.3 MSI work-around (it's still not supported fully) - @pkarw (#2366)
- Product zoom picture centered - @ptylek (#2178)
- Fixed tracking in analytics module - @jahvi (#2278)
- Improved merge the store modules array with extended module config - @DaanKouters (#2274)
- ElasticSearch fuzzy search, scoring, boosting + other improvements - @qbo-tech (#2340)
- Turned off compression plugin, nginx serves brotli compression  — @patzick (#2254)
- Improved user account menu UX on desktop - @vue-kacper (#2363)
- Added About us missing route - @lorenaramonda (#2320)
- Fixed used variable for products count in category - @renatocason (#2304)
- Override console with logger - @daaru00 (#2235)
- Fixed variable call about feedback email - @PhantomDraven (#2318)
- Output cache clearing versioning - @igloczek (#2333)
- Improved paddings on select fields - @patzick (#2361)
- Fixed lack of modal backdrop - @vue-kacper, @giuliachiola (#2319)
- Form validations and improvements - @vue-kacper (#2348, #2349, #2347)
- Changing product quantity in catr - @mdanilowicz (#2345)
- Product attribute values as array - @afirlejczyk (#2379)
- Improved fetching customAttributes - @afirlejczyk (#2107)
- Removed compare button from product mobile view - @patzick (#2370)
- Configurable options attribute descriptor - @pkarw (#2384)

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

### Added
- Hotjar extension (#840)

### Changed
- compress banner images - @patzick (#2280)
- Dynamic attributes loader (#2137)
Expand Down
48 changes: 37 additions & 11 deletions config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"useUrlDispatcher": false
},
"console": {
"verbosityLevel": "only-errors"
"showErrorOnProduction" : true,
"verbosityLevel": "display-everything"
},
"redis": {
"host": "localhost",
Expand All @@ -39,7 +40,34 @@
"csrTimeout": 5000,
"ssrTimeout": 1000,
"queryMethod": "GET",
"disableLocalStorageQueriesCache": true
"disableLocalStorageQueriesCache": true,
"searchScoring": {
"attributes": {
"attribute_code": {
"scoreValues": { "attribute_value": { "weight": 1 } }
}
},
"fuzziness": 2,
"cutoff_frequency": 0.01,
"max_expansions": 3,
"minimum_should_match": "75%",
"prefix_length": 2,
"boost_mode": "multiply",
"score_mode": "multiply",
"max_boost": 100,
"function_min_score": 1
},
"searchableAttributes": {
"name": {
"boost": 4
},
"sku": {
"boost": 2
},
"category.name": {
"boost": 1
}
}
},
"ssr": {
"templates": {
Expand Down Expand Up @@ -206,6 +234,7 @@
"setCustomProductOptions": true,
"setConfigurableProductOptions": true,
"askBeforeRemoveProduct": true,
"displayItemDiscounts": true,
"create_endpoint": "http://localhost:8080/api/cart/create?token={{token}}",
"updateitem_endpoint": "http://localhost:8080/api/cart/update?token={{token}}&cartId={{cartId}}",
"deleteitem_endpoint": "http://localhost:8080/api/cart/delete?token={{token}}&cartId={{cartId}}",
Expand All @@ -226,7 +255,7 @@
"configurableChildrenStockPrefetchDynamic": false,
"configurableChildrenStockPrefetchStaticPrefetchCount": 8,
"filterUnavailableVariants": false,
"listOutOfStockProducts": false,
"listOutOfStockProducts": true,
"preventConfigurableChildrenDirectAccess": true,
"alwaysSyncPlatformPricesOver": false,
"clearPricesBeforePlatformSync": false,
Expand Down Expand Up @@ -367,6 +396,9 @@
"analytics": {
"id": false
},
"hotjar": {
"id": false
},
"cms": {
"endpoint": "http://localhost:8080/api/ext/cms-data/cms{{type}}/{{cmsId}}",
"endpointIdentifier": "http://localhost:8080/api/ext/cms-data/cms{{type}}Identifier/{{cmsIdentifier}}/storeId/{{storeId}}"
Expand All @@ -378,14 +410,7 @@
"max_count": 500
},
"usePriceTiers": false,
"boost": {
"name": 3,
"category.name": 1,
"short_description": 1,
"description": 1,
"sku": 1,
"configurable_children.sku": 1
},
"useZeroPriceProduct": true,
"query": {
"inspirations": {
"filter": [
Expand Down Expand Up @@ -422,3 +447,4 @@
}

}

46 changes: 17 additions & 29 deletions core/app.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { Store } from 'vuex'
import RootState from '@vue-storefront/store/types/RootState'
import RootState from '@vue-storefront/core/types/RootState'
import Vue from 'vue'
import buildTimeConfig from 'config'
import { isServer } from '@vue-storefront/core/helpers'
import { Logger } from '@vue-storefront/core/lib/logger'

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

// TODO simplify by removing global mixins, plugins and filters - it can be done in normal 'vue' way
import { registerTheme } from '@vue-storefront/core/lib/themes'
import { themeEntry } from 'theme/index.js'
import { registerModules } from '@vue-storefront/core/lib/module'
import { prepareStoreView } from '@vue-storefront/store/lib/multistore'
import { plugins, mixins, filters } from '@vue-storefront/core/compatibility/lib/themes'
import { prepareStoreView } from '@vue-storefront/core/lib/multistore'

import * as coreMixins from '@vue-storefront/core/mixins'
import * as coreFilters from '@vue-storefront/core/filters'
import * as corePlugins from '@vue-storefront/core/compatibility/plugins'

import { once } from '@vue-storefront/core/helpers'
import { takeOverConsole } from '@vue-storefront/core/helpers/log'

// Entrys
import App from 'theme/App.vue'
import store from '@vue-storefront/store'

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

Vue.use(VueRouter)

// Will be depreciated in 1.7. Now we are using Logger instead of logs
if (buildTimeConfig.console.verbosityLevel !== 'display-everything' && process.env.NODE_ENV === 'production') {
once('__TAKE_OVER_CONSOLE__', () => {
takeOverConsole(buildTimeConfig.console.verbosityLevel)
})
}

const createApp = async (ssrContext, config): Promise<{app: Vue, router: VueRouter, store: Store<RootState>}> => {
router = createRouter()
// sync router with vuex 'router' store
Expand All @@ -86,36 +82,28 @@ const createApp = async (ssrContext, config): Promise<{app: Vue, router: VueRou

// to depreciate in near future
once('__VUE_EXTEND__', () => {
console.debug('Registering Vue plugins')
require('theme/plugins')
const pluginsObject = plugins()
Object.keys(pluginsObject).forEach(key => {
Vue.use(pluginsObject[key])
Object.keys(corePlugins).forEach(key => {
Vue.use(corePlugins[key])
})

console.debug('Registering Vue mixins')
const mixinsObject = mixins()
Object.keys(mixinsObject).forEach(key => {
Vue.mixin(mixinsObject[key])
Object.keys(coreMixins).forEach(key => {
Vue.mixin(coreMixins[key])
})
})

const filtersObject = filters()
Object.keys(filtersObject).forEach(key => {
Vue.filter(key, filtersObject[key])
Object.keys(coreFilters).forEach(key => {
Vue.filter(key, coreFilters[key])
})

let vueOptions = {
router,
store,
i18n,
render: h => h(App)
render: h => h(themeEntry)
}

const apolloProvider = await getApolloProvider()
if (apolloProvider) {
Object.assign(vueOptions, {provider: apolloProvider})
}
if (apolloProvider) Object.assign(vueOptions, {provider: apolloProvider})

const app = new Vue(vueOptions)

Expand Down
4 changes: 2 additions & 2 deletions core/build/dev-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ let baseServerConfig = require('./webpack.server.config')
const themeRoot = require('./theme-path')
const extendedConfig = require(path.join(themeRoot, '/webpack.config.js'))

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

module.exports = function setupDevServer (app, cb) {
let bundle
Expand Down
2 changes: 1 addition & 1 deletion core/build/theme-path.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const path = require('path')
const detectInstalled = require('detect-installed')
const config = require('./config.json')

let themePath = '';
let themePath = ''
let themeName = config.theme

if (detectInstalled.sync(config.theme, { local: true })) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
const path = require('path')
const config = require('config')
const fs = require('fs')
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin')
const VueLoaderPlugin = require('vue-loader/lib/plugin')
const autoprefixer = require('autoprefixer')
const HTMLPlugin = require('html-webpack-plugin')
import path from 'path';
import config from 'config';
import fs from 'fs';
import CaseSensitivePathsPlugin from 'case-sensitive-paths-webpack-plugin';
import VueLoaderPlugin from 'vue-loader/lib/plugin';
import autoprefixer from 'autoprefixer';
import HTMLPlugin from 'html-webpack-plugin';
// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const webpack = require('webpack')
import webpack from 'webpack';

fs.writeFileSync(
path.resolve(__dirname, './config.json'),
Expand All @@ -15,14 +15,14 @@ fs.writeFileSync(

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

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

const translationPreprocessor = require('@vue-storefront/i18n/scripts/translation.preprocessor.js')
translationPreprocessor([
Expand All @@ -44,7 +44,7 @@ const postcssConfig = {
};
const isProd = process.env.NODE_ENV === 'production'
// todo: usemultipage-webpack-plugin for multistore
module.exports = {
export default {
plugins: [
new webpack.ProgressPlugin(),
// new BundleAnalyzerPlugin({
Expand Down Expand Up @@ -107,7 +107,10 @@ module.exports = {
'theme': themeRoot,
'theme/app': themeApp,
'theme/css': themeCSS,
'theme/resource': themeResources
'theme/resource': themeResources,

// Backward compatible
'@vue-storefront/store/lib/multistore' : path.resolve(__dirname, '../lib/multistore.ts'),
}
},
module: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const webpack = require('webpack')
const merge = require('webpack-merge')
const base = require('./webpack.base.config')
const VueSSRClientPlugin = require('vue-server-renderer/client-plugin')
import webpack from 'webpack'
import merge from 'webpack-merge'
import base from './webpack.base.config'
import VueSSRClientPlugin from 'vue-server-renderer/client-plugin'
// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin

const config = merge(base, {
Expand All @@ -14,7 +14,7 @@ const config = merge(base, {
chunks: 'all',
},
},
},
},
runtimeChunk: {
name: "manifest",
}
Expand All @@ -35,4 +35,4 @@ const config = merge(base, {
]
})

module.exports = config;
export default config;
18 changes: 0 additions & 18 deletions core/build/webpack.prod.client.config.js

This file was deleted.

Loading

0 comments on commit b84ddc0

Please sign in to comment.