topcoder-platform / tc-notifications

4 stars 15 forks source link

Email templates #60

Closed architectt1 closed 6 years ago

architectt1 commented 6 years ago

This solves #59.

The approach taken was to use handlebars with partials. The solution uses a single master template that includes the partials based on the type of iterated notification.

scss compilation and css inlining happen on postinstall or by executing npm run build. The email-connect project was slightly modified in order to support partials and an extendable scss files/folders structure.

Regarding the requirements of showing certain data, the following couldn't be achieved:

Both issues should be handled by modifying those events when they get sent in tc-project-service.

Also, the UI is definitely not final, and most of the code used was taken from the email-connect project. Designers should be able to come up with a UI that can be distributed along the master and partials as it has been done in this PR as a proof of concept.

As an additional change, I also fixed some linting issues there were.

architectt1 commented 6 years ago

This turned out to be a monster that makes reviewing very hard, plus contains unsolicited changes. Closing because of this. Please see https://github.com/topcoder-platform/tc-notifications/pull/61 for the clean version of this PR.