-
Notifications
You must be signed in to change notification settings - Fork 444
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
Refactor email templates to better support discovery, reuse and documentation #5716
Comments
Not sure if this is included in the suggestions above. But the list should somehow show which templates are used based on chosen settings. For example if one-click is enabled, only some of the review templates are used (should we combine some of those templates is of course another question). |
The following are some preliminary mockups of how the new email management UI will work. Manage emailsThis looks similar to the existing email templates UI, except it only lists email events. For example, a single email is shown for "Submission Accepted", but the editor will be able to assign more than one email template to use for that event. Emails with just one templateWhen an email is sent automatically, the editor doesn't have an opportunity to edit the email or select a different template. In such cases, the email will only have one template. The edit button will open a modal to edit that template. (Some emails the editor can edit will still only support one template until we can refactor them.) Emails with many templatesWhen editing an email that the editor previews and edits, such as when recording an editorial decision, they can edit the default template and create custom templates. See a mockup of the new Load Template UI when writing an email. Email template variablesWhen editing an email template, the user will be able to see all of the variables they can use. |
…list This commit replaces the email templates list with a new Manage Emails UI based on our new Mailables system. It includes the following changes: - Adds ManageEmailsPage to edit and assign mailable templates - All email templates now have a name - Email templates list panel removed
This commit replaces the email templates list with a new Manage Emails UI based on our new Mailables system. It includes the following changes: - Refactor relationship between mailables and email templates. All email templates now assigned to a mailable. - Adds settings page to edit and assign mailable templates - Remove email templates management list panel - Migrate existing custom templates to new discussion stage mailables - Migrate disabled email template functionality to new context settings - Add alternateTo attribute to emailTemplates.xml for extra templates - Give all email templates a name - Generate custom template keys from the name - Updates to several mailable names, descriptions, filter settings, etc.
…list This commit replaces the email templates list with a new Manage Emails UI based on our new Mailables system. It includes the following changes: - Adds ManageEmailsPage to edit and assign mailable templates - All email templates now have a name - Email templates list panel removed
This commit replaces the email templates list with a new Manage Emails UI based on our new Mailables system. It includes the following changes: - Refactor relationship between mailables and email templates. All email templates now assigned to a mailable. - Adds settings page to edit and assign mailable templates - Remove email templates management list panel - Migrate existing custom templates to new discussion stage mailables - Migrate disabled email template functionality to new context settings - Add alternateTo attribute to emailTemplates.xml for extra templates - Give all email templates a name - Generate custom template keys from the name - Updates to several mailable names, descriptions, filter settings, etc.
@asmecher it was a little bit messy because the same code is used for installing and migrations. For minimal impact, I just duplicated some code into |
pkp/pkp-lib#5716 Add new manage emails UI and remove email templates …
#5716 Add new manage emails UI and remove email templates list
pkp/pkp-lib#5716 Add new manage emails UI and remove email templates list
pkp/pkp-lib#5716 Add new manage emails UI and remove email templates list
pkp/pkp-lib#5716 Add new manage emails UI and remove email templates list
🎉 All merged. Thanks for all your work on this @Vitaliy-1! |
I forgot to add a migration script to |
pkp/pkp-lib#5716 Add missing upgrade migration
pkp/pkp-lib#5716 Add missing upgrade migration
pkp/pkp-lib#5716 Add missing upgrade migration
All merged. |
Describe the problem you would like to solve
Journal managers want to be able to configure email templates to support a wide range of needs throughout the applications. These include:
Describe the solution you'd like
We'll need a list in the application that defines each possible event that results in an email, and this must be hooked so that plugins can add their own events. Each event can define what variables are available in the email template.
Email templates, including the default templates, should define which events they can be used for. This should be configurable for custom templates but not for default templates, so that journal managers can not accidentally configure no templates for an event.
With this information, it should be possible to accomplish the following:
As part of longer-term refactoring, it probably makes sense to refactor this so that it is distinct from the
Notification
andNotificationManager
classes that exist.It may also be worth investigating Laravel's Notification system to see if it might replace our existing system or inspire our refactor.
Who is asking for this feature?
This is a requirement to implement some of the features described above, which have been requested by community members and PS.
Pull Requests
See comment:
The text was updated successfully, but these errors were encountered: