Skip to content

feat(coderd): add company logo when available for email notifications #14935

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

Merged
merged 27 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
a42f108
feat(notifications): add company logo url when available for email no…
defelmnq Oct 2, 2024
1fa1271
feat(notifications): adapt tests with new labels
defelmnq Oct 3, 2024
2def52e
fix: revert changes on generated code version
defelmnq Oct 3, 2024
1b1a4c4
feat(notification): move logo_url and app_name logic to helpers funct…
defelmnq Oct 3, 2024
779260e
chore: remove unused GetLogoURL method from notifications store inter…
defelmnq Oct 3, 2024
1e6899f
fix: add better context and timeout for db related queries
defelmnq Oct 4, 2024
b552267
chore: lint
defelmnq Oct 4, 2024
73e07e9
feat(notifications): improve logo_url and app_name fetching moving it…
defelmnq Oct 16, 2024
70e23ae
feat(notifications): improve logo_url and app_name fetching moving it…
defelmnq Oct 16, 2024
2f620c9
feat(notifications): improve logo_url and app_name fetching moving it…
defelmnq Oct 16, 2024
fdcdf7b
feat(notifications): improve logo_url and app_name fetching moving it…
defelmnq Oct 16, 2024
9c6c105
feat(coderd): regenerate golden files
Oct 16, 2024
0c131a5
feat(notifications): working on tests for logo and app_name
defelmnq Oct 17, 2024
34d6611
feat(notifications): change helpers logic to be defined in the Dispat…
Oct 17, 2024
0a9a66a
feat(notifications): add golden file for custom appearance
Oct 17, 2024
bf558cb
feat(notifications): add golden file for custom appearance
Oct 17, 2024
a420f37
feat(notifications): work on tests
defelmnq Oct 18, 2024
51d8d33
feat(notifications): add golden file for custom appearance
defelmnq Oct 18, 2024
d492d09
feat(notifications): add golden file for custom appearance
defelmnq Oct 18, 2024
0c9c485
feat(notifications): add comment ent in tests for enterprise feature
defelmnq Oct 18, 2024
a6d4a0c
feat(coderd): remove unused call
defelmnq Oct 18, 2024
4c5cb3d
fix(notifications): improve tests and some nit fixes
defelmnq Oct 18, 2024
e419431
chore(retry): improve retry policy on fetcher
defelmnq Oct 18, 2024
a7fec66
Merge remote-tracking branch 'origin/main' into feat/notif-custom-logo
defelmnq Oct 21, 2024
8b766f6
improve errors handling
defelmnq Oct 22, 2024
157e086
improve errors handling
defelmnq Oct 22, 2024
790ff33
improve errors handling
defelmnq Oct 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(coderd): regenerate golden files
  • Loading branch information
defelmnq committed Oct 16, 2024
commit 9c6c105ea5ac42c2dfb1105f076bf1fe60d1b302
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
From: system@coder.com
To: bobby@coder.com
Subject: Template "Bobby's Template" deleted
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
Date: Fri, 11 Oct 2024 09:03:06 +0000
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
Date: Fri, 11 Oct 2024 09:03:06 +0000
Content-Type: multipart/alternative; boundary=bbe61b741255b6098bb6b3c1f41b885773df633cb18d2a3002b68e4bc9c4
MIME-Version: 1.0

Expand Down Expand Up @@ -39,6 +39,10 @@ n: left; font-size: 14px; line-height: 1.5;">
<div style=3D"text-align: center;">
<img src=3D"https://coder.com/coder-logo-horizontal.png" alt=3D"Log=
o" style=3D"height: 40px;" />
<h1 style=3D"text-align: center; font-size: 36px; font-weight: 400;=
margin: 8px 0 32px; line-height: 1.5;">
Coder
</h1>
</div>
<h1 style=3D"text-align: center; font-size: 24px; font-weight: 400; m=
argin: 8px 0 32px; line-height: 1.5;">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
From: system@coder.com
To: bobby@coder.com
Subject: User account "bobby" activated
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
Date: Fri, 11 Oct 2024 09:03:06 +0000
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
Date: Fri, 11 Oct 2024 09:03:06 +0000
Content-Type: multipart/alternative; boundary=bbe61b741255b6098bb6b3c1f41b885773df633cb18d2a3002b68e4bc9c4
MIME-Version: 1.0

Expand Down Expand Up @@ -42,6 +42,10 @@ n: left; font-size: 14px; line-height: 1.5;">
<div style=3D"text-align: center;">
<img src=3D"https://coder.com/coder-logo-horizontal.png" alt=3D"Log=
o" style=3D"height: 40px;" />
<h1 style=3D"text-align: center; font-size: 36px; font-weight: 400;=
margin: 8px 0 32px; line-height: 1.5;">
Coder
</h1>
</div>
<h1 style=3D"text-align: center; font-size: 24px; font-weight: 400; m=
argin: 8px 0 32px; line-height: 1.5;">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
From: system@coder.com
To: bobby@coder.com
Subject: User account "bobby" created
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
Date: Fri, 11 Oct 2024 09:03:06 +0000
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
Date: Fri, 11 Oct 2024 09:03:06 +0000
Content-Type: multipart/alternative; boundary=bbe61b741255b6098bb6b3c1f41b885773df633cb18d2a3002b68e4bc9c4
MIME-Version: 1.0

Expand Down Expand Up @@ -41,6 +41,10 @@ n: left; font-size: 14px; line-height: 1.5;">
<div style=3D"text-align: center;">
<img src=3D"https://coder.com/coder-logo-horizontal.png" alt=3D"Log=
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we're missing tests verifying this change. Can you check if it is easy to pick one SMTP template and render it using a custom logo/app name? It would be cool to have at least one golden file.

o" style=3D"height: 40px;" />
<h1 style=3D"text-align: center; font-size: 36px; font-weight: 400;=
margin: 8px 0 32px; line-height: 1.5;">
Coder
</h1>
</div>
<h1 style=3D"text-align: center; font-size: 24px; font-weight: 400; m=
argin: 8px 0 32px; line-height: 1.5;">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
From: system@coder.com
To: bobby@coder.com
Subject: User account "bobby" deleted
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
Date: Fri, 11 Oct 2024 09:03:06 +0000
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
Date: Fri, 11 Oct 2024 09:03:06 +0000
Content-Type: multipart/alternative; boundary=bbe61b741255b6098bb6b3c1f41b885773df633cb18d2a3002b68e4bc9c4
MIME-Version: 1.0

Expand Down Expand Up @@ -41,6 +41,10 @@ n: left; font-size: 14px; line-height: 1.5;">
<div style=3D"text-align: center;">
<img src=3D"https://coder.com/coder-logo-horizontal.png" alt=3D"Log=
o" style=3D"height: 40px;" />
<h1 style=3D"text-align: center; font-size: 36px; font-weight: 400;=
margin: 8px 0 32px; line-height: 1.5;">
Coder
</h1>
</div>
<h1 style=3D"text-align: center; font-size: 24px; font-weight: 400; m=
argin: 8px 0 32px; line-height: 1.5;">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
From: system@coder.com
To: bobby@coder.com
Subject: User account "bobby" suspended
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
Date: Fri, 11 Oct 2024 09:03:06 +0000
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
Date: Fri, 11 Oct 2024 09:03:06 +0000
Content-Type: multipart/alternative; boundary=bbe61b741255b6098bb6b3c1f41b885773df633cb18d2a3002b68e4bc9c4
MIME-Version: 1.0

Expand Down Expand Up @@ -43,6 +43,10 @@ n: left; font-size: 14px; line-height: 1.5;">
<div style=3D"text-align: center;">
<img src=3D"https://coder.com/coder-logo-horizontal.png" alt=3D"Log=
o" style=3D"height: 40px;" />
<h1 style=3D"text-align: center; font-size: 36px; font-weight: 400;=
margin: 8px 0 32px; line-height: 1.5;">
Coder
</h1>
</div>
<h1 style=3D"text-align: center; font-size: 24px; font-weight: 400; m=
argin: 8px 0 32px; line-height: 1.5;">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
From: system@coder.com
To: bobby@coder.com
Subject: Your One-Time Passcode for Coder.
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
Date: Fri, 11 Oct 2024 09:03:06 +0000
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
Date: Fri, 11 Oct 2024 09:03:06 +0000
Content-Type: multipart/alternative; boundary=bbe61b741255b6098bb6b3c1f41b885773df633cb18d2a3002b68e4bc9c4
MIME-Version: 1.0

Expand Down Expand Up @@ -42,6 +42,10 @@ n: left; font-size: 14px; line-height: 1.5;">
<div style=3D"text-align: center;">
<img src=3D"https://coder.com/coder-logo-horizontal.png" alt=3D"Log=
o" style=3D"height: 40px;" />
<h1 style=3D"text-align: center; font-size: 36px; font-weight: 400;=
margin: 8px 0 32px; line-height: 1.5;">
Coder
</h1>
</div>
<h1 style=3D"text-align: center; font-size: 24px; font-weight: 400; m=
argin: 8px 0 32px; line-height: 1.5;">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
From: system@coder.com
To: bobby@coder.com
Subject: Workspace "bobby-workspace" updated automatically
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
Date: Fri, 11 Oct 2024 09:03:06 +0000
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
Date: Fri, 11 Oct 2024 09:03:06 +0000
Content-Type: multipart/alternative; boundary=bbe61b741255b6098bb6b3c1f41b885773df633cb18d2a3002b68e4bc9c4
MIME-Version: 1.0

Expand Down Expand Up @@ -42,6 +42,10 @@ n: left; font-size: 14px; line-height: 1.5;">
<div style=3D"text-align: center;">
<img src=3D"https://coder.com/coder-logo-horizontal.png" alt=3D"Log=
o" style=3D"height: 40px;" />
<h1 style=3D"text-align: center; font-size: 36px; font-weight: 400;=
margin: 8px 0 32px; line-height: 1.5;">
Coder
</h1>
</div>
<h1 style=3D"text-align: center; font-size: 24px; font-weight: 400; m=
argin: 8px 0 32px; line-height: 1.5;">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
From: system@coder.com
To: bobby@coder.com
Subject: Workspace "bobby-workspace" autobuild failed
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
Date: Fri, 11 Oct 2024 09:03:06 +0000
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
Date: Fri, 11 Oct 2024 09:03:06 +0000
Content-Type: multipart/alternative; boundary=bbe61b741255b6098bb6b3c1f41b885773df633cb18d2a3002b68e4bc9c4
MIME-Version: 1.0

Expand Down Expand Up @@ -41,6 +41,10 @@ n: left; font-size: 14px; line-height: 1.5;">
<div style=3D"text-align: center;">
<img src=3D"https://coder.com/coder-logo-horizontal.png" alt=3D"Log=
o" style=3D"height: 40px;" />
<h1 style=3D"text-align: center; font-size: 36px; font-weight: 400;=
margin: 8px 0 32px; line-height: 1.5;">
Coder
</h1>
</div>
<h1 style=3D"text-align: center; font-size: 24px; font-weight: 400; m=
argin: 8px 0 32px; line-height: 1.5;">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
From: system@coder.com
To: bobby@coder.com
Subject: Workspace builds failed for template "Bobby First Template"
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
Date: Fri, 11 Oct 2024 09:03:06 +0000
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
Date: Fri, 11 Oct 2024 09:03:06 +0000
Content-Type: multipart/alternative; boundary=bbe61b741255b6098bb6b3c1f41b885773df633cb18d2a3002b68e4bc9c4
MIME-Version: 1.0

Expand Down Expand Up @@ -59,6 +59,10 @@ n: left; font-size: 14px; line-height: 1.5;">
<div style=3D"text-align: center;">
<img src=3D"https://coder.com/coder-logo-horizontal.png" alt=3D"Log=
o" style=3D"height: 40px;" />
<h1 style=3D"text-align: center; font-size: 36px; font-weight: 400;=
margin: 8px 0 32px; line-height: 1.5;">
Coder
</h1>
</div>
<h1 style=3D"text-align: center; font-size: 24px; font-weight: 400; m=
argin: 8px 0 32px; line-height: 1.5;">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
From: system@coder.com
To: bobby@coder.com
Subject: Workspace "bobby-workspace" deleted
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
Date: Fri, 11 Oct 2024 09:03:06 +0000
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
Date: Fri, 11 Oct 2024 09:03:06 +0000
Content-Type: multipart/alternative; boundary=bbe61b741255b6098bb6b3c1f41b885773df633cb18d2a3002b68e4bc9c4
MIME-Version: 1.0

Expand Down Expand Up @@ -43,6 +43,10 @@ n: left; font-size: 14px; line-height: 1.5;">
<div style=3D"text-align: center;">
<img src=3D"https://coder.com/coder-logo-horizontal.png" alt=3D"Log=
o" style=3D"height: 40px;" />
<h1 style=3D"text-align: center; font-size: 36px; font-weight: 400;=
margin: 8px 0 32px; line-height: 1.5;">
Coder
</h1>
</div>
<h1 style=3D"text-align: center; font-size: 24px; font-weight: 400; m=
argin: 8px 0 32px; line-height: 1.5;">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
From: system@coder.com
To: bobby@coder.com
Subject: Workspace "bobby-workspace" marked as dormant
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
Date: Fri, 11 Oct 2024 09:03:06 +0000
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
Date: Fri, 11 Oct 2024 09:03:06 +0000
Content-Type: multipart/alternative; boundary=bbe61b741255b6098bb6b3c1f41b885773df633cb18d2a3002b68e4bc9c4
MIME-Version: 1.0

Expand Down Expand Up @@ -45,6 +45,10 @@ n: left; font-size: 14px; line-height: 1.5;">
<div style=3D"text-align: center;">
<img src=3D"https://coder.com/coder-logo-horizontal.png" alt=3D"Log=
o" style=3D"height: 40px;" />
<h1 style=3D"text-align: center; font-size: 36px; font-weight: 400;=
margin: 8px 0 32px; line-height: 1.5;">
Coder
</h1>
</div>
<h1 style=3D"text-align: center; font-size: 24px; font-weight: 400; m=
argin: 8px 0 32px; line-height: 1.5;">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
From: system@coder.com
To: bobby@coder.com
Subject: Workspace "bobby-workspace" manual build failed
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
Date: Fri, 11 Oct 2024 09:03:06 +0000
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
Date: Fri, 11 Oct 2024 09:03:06 +0000
Content-Type: multipart/alternative; boundary=bbe61b741255b6098bb6b3c1f41b885773df633cb18d2a3002b68e4bc9c4
MIME-Version: 1.0

Expand Down Expand Up @@ -42,6 +42,10 @@ n: left; font-size: 14px; line-height: 1.5;">
<div style=3D"text-align: center;">
<img src=3D"https://coder.com/coder-logo-horizontal.png" alt=3D"Log=
o" style=3D"height: 40px;" />
<h1 style=3D"text-align: center; font-size: 36px; font-weight: 400;=
margin: 8px 0 32px; line-height: 1.5;">
Coder
</h1>
</div>
<h1 style=3D"text-align: center; font-size: 24px; font-weight: 400; m=
argin: 8px 0 32px; line-height: 1.5;">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
From: system@coder.com
To: bobby@coder.com
Subject: Workspace "bobby-workspace" marked for deletion
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
Date: Fri, 11 Oct 2024 09:03:06 +0000
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
Date: Fri, 11 Oct 2024 09:03:06 +0000
Content-Type: multipart/alternative; boundary=bbe61b741255b6098bb6b3c1f41b885773df633cb18d2a3002b68e4bc9c4
MIME-Version: 1.0

Expand Down Expand Up @@ -42,6 +42,10 @@ n: left; font-size: 14px; line-height: 1.5;">
<div style=3D"text-align: center;">
<img src=3D"https://coder.com/coder-logo-horizontal.png" alt=3D"Log=
o" style=3D"height: 40px;" />
<h1 style=3D"text-align: center; font-size: 36px; font-weight: 400;=
margin: 8px 0 32px; line-height: 1.5;">
Coder
</h1>
</div>
<h1 style=3D"text-align: center; font-size: 24px; font-weight: 400; m=
argin: 8px 0 32px; line-height: 1.5;">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
From: system@coder.com
To: bobby@coder.com
Subject: Your account "bobby" has been activated
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
Date: Fri, 11 Oct 2024 09:03:06 +0000
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
Date: Fri, 11 Oct 2024 09:03:06 +0000
Content-Type: multipart/alternative; boundary=bbe61b741255b6098bb6b3c1f41b885773df633cb18d2a3002b68e4bc9c4
MIME-Version: 1.0

Expand Down Expand Up @@ -39,6 +39,10 @@ n: left; font-size: 14px; line-height: 1.5;">
<div style=3D"text-align: center;">
<img src=3D"https://coder.com/coder-logo-horizontal.png" alt=3D"Log=
o" style=3D"height: 40px;" />
<h1 style=3D"text-align: center; font-size: 36px; font-weight: 400;=
margin: 8px 0 32px; line-height: 1.5;">
Coder
</h1>
</div>
<h1 style=3D"text-align: center; font-size: 24px; font-weight: 400; m=
argin: 8px 0 32px; line-height: 1.5;">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
From: system@coder.com
To: bobby@coder.com
Subject: Your account "bobby" has been suspended
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
Date: Fri, 11 Oct 2024 09:03:06 +0000
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
Date: Fri, 11 Oct 2024 09:03:06 +0000
Content-Type: multipart/alternative; boundary=bbe61b741255b6098bb6b3c1f41b885773df633cb18d2a3002b68e4bc9c4
MIME-Version: 1.0

Expand Down Expand Up @@ -37,6 +37,10 @@ n: left; font-size: 14px; line-height: 1.5;">
<div style=3D"text-align: center;">
<img src=3D"https://coder.com/coder-logo-horizontal.png" alt=3D"Log=
o" style=3D"height: 40px;" />
<h1 style=3D"text-align: center; font-size: 36px; font-weight: 400;=
margin: 8px 0 32px; line-height: 1.5;">
Coder
</h1>
</div>
<h1 style=3D"text-align: center; font-size: 24px; font-weight: 400; m=
argin: 8px 0 32px; line-height: 1.5;">
Expand Down
Loading