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
Modules 2.0 #3152
Modules 2.0 #3152
Conversation
I like this idea a lot! Really! Let's make it happen in 1.11. Some insights from my side:
|
You mean to let people add their own hooks inside module? I think making factory methods for hooks would public be sufficient in that case. @patzick WDYT? @pkarw regarding your concerns about hooks. Imho we shouldn't have any under the hood checks like this:
|
@filrak OK, thanks for the comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I forgot to say: great job :-)
const storeView = currentStoreView() | ||
const dbNamePrefix = storeView.storeCode ? storeView.storeCode + '-' : '' | ||
|
||
initCacheStorage('categories') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should refactor this to ‚StorageManager.set’ - to have the same syntax like above (this function does exactly the same just for different storeName). The attributes store is the only one still needed (we can remove the other ones)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to remove categories
and products
keep only attribbutes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really love these new modules. Nothing to add ❤️❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice feature! :)
Just mostly removing unused code or correcting tests before we merge that in. Left few comments (and questions) for cleanup.
Co-Authored-By: Patryk Tomczyk <13100280+patzick@users.noreply.github.com>
Co-Authored-By: Patryk Tomczyk <13100280+patzick@users.noreply.github.com>
Co-Authored-By: Patryk Tomczyk <13100280+patzick@users.noreply.github.com>
Co-Authored-By: Patryk Tomczyk <13100280+patzick@users.noreply.github.com>
Co-Authored-By: Patryk Tomczyk <13100280+patzick@users.noreply.github.com>
…into modules-2.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is cool. Let's merge this in:
- only unit tests needs to be improved (one is failing)
- remove the
initCacheStorage
fromcatalog/index.ts
forcategories
andproducts
please - it's no longer required
…into modules-2.0
@filrak please fix tests so we could merge this PR :) |
@patzick fixed by @lukeromanowicz ;) |
Related issues
closes #3144
Short description and why it's useful
New modules API. Motivations can be found on #3144
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
develop
branch and want to merge it back todevelop
release
branch and want to merge it back torelease
hotfix
ormaster
branch and want to merge it back tohotfix
Scope
@vue-storefront/module
Logger
@vue-storefront/module
as npm package in vanilla js and publish