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

New Module Hooks API #2330

Merged
merged 18 commits into from
Feb 7, 2019
Merged

New Module Hooks API #2330

merged 18 commits into from
Feb 7, 2019

Conversation

filrak
Copy link
Collaborator

@filrak filrak commented Feb 1, 2019

Related issues

Short description and why it's useful

This change is meant to prevent future problems with before/after registration hooks in modules. Grouping it into one object allows much easier modifications and future extending than relying on params order. it's the very same approach that nuxt is using with their modules.

TODO:

  • Changelog

(describe in a few words what is this Pull Request changing and why it's useful)

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

Screenshot of passed e2e tests (if you are using our standard setup as a backend)

Upgrade Notes and Changelog

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

Contribution and currently important rules acceptance

@filrak filrak requested review from pkarw and patzick February 1, 2019 14:48
@filrak filrak changed the title WIP: New Module Hooks api WIP: New Module Hooks API Feb 1, 2019
@filrak filrak changed the title WIP: New Module Hooks API New Module Hooks API Feb 1, 2019
@pkarw
Copy link
Collaborator

pkarw commented Feb 1, 2019

It's way better to pass the VSF object because it will allow us to extend before and after hooks without changing the definitions.

However, there are currently some modules on Github created with the previous approach so we should be compatible with it (I mean with passing Vue, config .. as separate arguments). Would it be possible?

@filrak
Copy link
Collaborator Author

filrak commented Feb 1, 2019

@pkarw i already spoke with extension devs and will propose a proper PRs to their repos ;)

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.

i think this is good move:)

please remove also added storefront-ui reference, this shouldn't be added here

core/scripts/server.js Outdated Show resolved Hide resolved
core/modules/cart/hooks/afterRegistration.ts Outdated Show resolved Hide resolved
@pkarw pkarw modified the milestones: 1.9, 1.8 Feb 2, 2019
@filrak filrak merged commit 57cabf5 into vuestorefront:develop Feb 7, 2019
@filrak filrak deleted the hooks_api branch February 7, 2019 10:57
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.

3 participants