Add a human-friendly HTML template for mentions #9358
+794
−92
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Depends on #9357
Closes #9355
Closes #9341
This PR brings the HTML template used in LMS for the email digest, and reuses the same structure for
@mentions
emails, but trying to more or less display the information from the original email design: https://www.figma.com/design/pwzOVmALQqBB8OFDeYTMTd/%40Mentions?node-id=331-2151&p=f&t=7ogj2TOnBfTnUDoC-0Considerations and out of scope
annotation.text_rendered
, there's some markdown rendering and HTML sanitization that ends up stripping all data attributes from mention tags. This only affects how they are styled in the email, but I'll try address this separately. EDIT: To be addressed in Keep mention attributes when filtering annotation markdown #9361mention_notification
unit test uses a jinja environment to test for potential syntax errors in the template. I had to mock one global jinja function there as a workaround, but I'll try to add a proper functional test as well. See the slack discussion for details.Test steps
mail
folder inh
contains a file corresponding to the email notification for that mention.