-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Feat/email load globalTemplateVars async #2950
Feat/email load globalTemplateVars async #2950
Conversation
…heme key is included
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
Excellent work: clean code, good test case, excellent docs 👍
One small change needed on a doc block, and also please target the minor
branch rather than master
.
* | ||
* @docsCategory core plugins/EmailPlugin | ||
* @docsPage EmailPluginOptions | ||
* @docsWeight 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.
Setting docsWeight 0
will force this type to the top of the EmailPluginOptions
docs page, which is not what we want. Better to have the main EmailPluginOptions
interface at the top. So remove this to be safe add it to the EmailPluginOptions
doc block to ensure it always stays at the top.
cab67b6
into
vendure-ecommerce:master
Since the master will be merged into minor today anyway with the upcoming release, I decided to merge anyway, since the time-zone difference would delay things. Thanks for the contribution! |
Description
This PR adds an async function call as an alternative to the static
globalTemplateVars
in the Email-Plugin. The function receives theRequestContext
and theInjector
. It has the objective to allow you to load theme variables that may be specific to e.g. a channel. Such as a footer text or color schemes, etcI did get a whole bunch of eslint related warnings when I committed this and had to use --no-verify. But they didn't apply to my code.
I'm assuming documentation is extracted from the inline docs I added. Not sure how that works.
Breaking changes
Screenshots
You can add screenshots here if applicable.
Checklist
📌 Always:
👍 Most of the time: