View My Grants button text: See All Grants Shared With My Team, which links to the /my-grants/shared-with-your-team route in the client app.
Bugfix: ensure that light gray background goes around card fully (currently there is a buggy white stripe that shows on top of the grey background in the email – see screenshot below)
Implementation Details:
All of these changes should only be effective when the SHARE_TERMINOLOGY_ENABLED environment variable is set to true.
As such, it may be more straightforward to implement the bulk of these changes in a new function (e.g. sendGrantSharedEmailsForAgency()) that serves as an alternative to sendGrantAssignedEmailsForAgency(), which would be conditionally called by sendGrantAssignedEmails(). This is not a requirement for implementation, but may make things easier.
Regarding the preview text:
We do not currently set explicit preview text for most (any?) emails, but it can be achieved by adding a <div style="display:none">Preview text here</div> block to the start of an email body.
We do currently set a <title> tag value in the base template; it may useful to default preview text to the value provided to the title parameter unpacked from the brandDetails argument provided when calling the addBaseBranding() function.
Regarding the View My Grants -> See all Grants Shared With My Team button text update:
The hyperlink for this button is generated by the buildGrantsUrlSafe() function, where the my-grants path name is currently the default value. It's probably best that this remain the default behavior, and instead implement this particular change by adding an explicit evaluation for emailNotificationType === notificationType.grantAssignment.
Similarly, the text for this button is generated by the getGrantDetail() function, which provides the string as the view_grant_label parameter when rendering the mustache template. Rather than changing the default View My Grants value, instead update the conditional logic so that when emailNotificationType === notificationType.grantAssignment, the text is rendered as See All Grants Shared With My Team.
Subtask of [STORY]: Change "assign" feature to "share" #2823
Blocked by
3060
3061
Blocks
N/A
Definition of Done
Emails sent by the
sendGrantAssignedEmailsForAgency()
function inpackages/server/src/lib/email.js
are updated as-follows:<assignor name> Shared a Grant with Your Team
Grant Assigned
header to provide the same text as the email subject.tool_name
parameter):Federal Grant Finder
View My Grants
button text:See All Grants Shared With My Team
, which links to the/my-grants/shared-with-your-team
route in the client app.Implementation Details:
SHARE_TERMINOLOGY_ENABLED
environment variable is set totrue
.sendGrantSharedEmailsForAgency()
) that serves as an alternative tosendGrantAssignedEmailsForAgency()
, which would be conditionally called bysendGrantAssignedEmails()
. This is not a requirement for implementation, but may make things easier.<div style="display:none">Preview text here</div>
block to the start of an email body.<title>
tag value in the base template; it may useful to default preview text to the value provided to thetitle
parameter unpacked from thebrandDetails
argument provided when calling theaddBaseBranding()
function.View My Grants -> See all Grants Shared With My Team
button text update:buildGrantsUrlSafe()
function, where themy-grants
path name is currently the default value. It's probably best that this remain the default behavior, and instead implement this particular change by adding an explicit evaluation foremailNotificationType === notificationType.grantAssignment
.getGrantDetail()
function, which provides the string as theview_grant_label
parameter when rendering the mustache template. Rather than changing the defaultView My Grants
value, instead update the conditional logic so that whenemailNotificationType === notificationType.grantAssignment
, the text is rendered asSee All Grants Shared With My Team
.