Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement/modules into theme #3186

Merged
merged 22 commits into from
Jul 10, 2019
Merged

Improvement/modules into theme #3186

merged 22 commits into from
Jul 10, 2019

Conversation

michasik
Copy link
Collaborator

@michasik michasik commented Jul 5, 2019

Related issues

#3139

closes #3139

Short description and why it's useful

  • homepage module
  • promoted offers modules
  • claims
  • UI store (needs to be careful - deps on core)
  • Move order history to order module
  • Move social-share (from core) to theme

Screenshots of visual changes before/after (if there are any)

Which environment this relates to

Check your case. In case of any doubts please read about Release Cycle

  • Test version (https://test.storefrontcloud.io) - this is a new feature or improvement for Vue Storefront. I've created branch from develop branch and want to merge it back to develop
  • RC version (https://next.storefrontcloud.io) - this is a stabilisation fix for Release Candidate of Vue Storefront. I've created branch from release branch and want to merge it back to release
  • Stable version (https://demo.storefrontcloud.io) - this is an important fix for current stable version. I've created branch from hotfix or master branch and want to merge it back to hotfix

Upgrade Notes and Changelog

  • No upgrade steps required (100% backward compatibility and no breaking changes)
  • I've updated the Upgrade notes and Changelog on how to port existing VS sites with this new feature

IMPORTANT NOTICE - Remember to update CHANGELOG.md with description of your change

Contribution and currently important rules acceptance

@pkarw pkarw requested review from patzick and filrak July 5, 2019 12:21
Copy link
Collaborator

@pkarw pkarw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this idea of cutting of the dependencies and the number of core modules - good job.

@michasik
Copy link
Collaborator Author

michasik commented Jul 5, 2019

@filrak
I have some difficulties moving Claims module into theme.
I have made all the necessary refactor for claims in the commit #bf431f5 (last one). I got the build error

Error during render : /error
TypeError: Cannot set property 'claimsCollection' of undefined
    at Object.beforeRegistration (src/themes/default/modules/claims/hooks/beforeRegistration.ts:9:36)
    at VueStorefrontModule.module.exports../core/lib/module/index.ts.VueStorefrontModule.register (core/lib/module/index.ts:104:20)
    at server-bundle.js:1648:45
    at Array.forEach (<anonymous>)
    at registerModules (core/lib/module/index.ts:19:10)
    at Module../src/themes/default/index.js (src/themes/default/index.js:26:16)
    at __webpack_require__ (webpack/bootstrap:25:0)
    at Module.<anonymous> (core/app.ts:1:0)
    at Module../core/app.ts (server-bundle.js:282:30)
    at __webpack_require__ (webpack/bootstrap:25:0)

And in beforeRegistration hook in claims we want to assign a value to claimsCollection on $db property, which (I guess) has not been created yet.

Vue.prototype.$db.claimsCollection = new UniversalStorage(localForage.createInstance({
    name: (config.storeViews.commonCache ? '' : dbNamePrefix) + 'shop',
    storeName: 'claims',
    driver: localForage[config.localForage.defaultDrivers['claims']]
  })

@filrak It would be great, if you could have a look on it ;-)

@michasik michasik changed the title Improvement/modules into theme Improvement/modules into theme [WIP] Jul 8, 2019
@patzick patzick added the not ready for merge PR is holded. Needs some clarifications or things that need to be finished. label Jul 8, 2019
@filrak
Copy link
Collaborator

filrak commented Jul 8, 2019

Changes as we discussed in a call ;)

@michasik michasik changed the title Improvement/modules into theme [WIP] Improvement/modules into theme Jul 8, 2019
@filrak
Copy link
Collaborator

filrak commented Jul 9, 2019

@patzick we need your okejka aswell

Copy link
Collaborator

@patzick patzick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only one suggestion from me

src/themes/default/index.js Outdated Show resolved Hide resolved
@pkarw
Copy link
Collaborator

pkarw commented Jul 10, 2019

is it ready for merge?

@patzick patzick removed the not ready for merge PR is holded. Needs some clarifications or things that need to be finished. label Jul 10, 2019
@patzick patzick added this to the 1.11.0-rc.1 milestone Jul 10, 2019
@patzick patzick merged commit 7f3a027 into vuestorefront:develop Jul 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants