Skip to content

Commit cea27f9

Browse files
committed
feat: update project logo and branding across extension pages and content script
1 parent 6bcaaa6 commit cea27f9

9 files changed

Lines changed: 46 additions & 44 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Review Format Kit (RFK)
1+
# <img src="public/assets/icons/icon.svg" width="48" height="48" align="center"> Review Format Kit (RFK)
22

33
**Review Format Kit (RFK)** is a browser extension designed to help developers standardize their code review comments using proven conventions like [Conventional Comments](https://conventionalcomments.org/) and [Netlify Feedback Ladders](https://www.netlify.com/blog/2020/03/05/feedback-ladders-how-we-encode-code-reviews-at-netlify/).
44

public/assets/icons/icon.svg

Lines changed: 3 additions & 20 deletions
Loading

public/assets/icons/logo.png

60.5 KB
Loading

public/manifest.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@
4141
"128": "assets/icons/icon.svg"
4242
}
4343
},
44-
"options_page": "src/options/options.html"
45-
44+
"options_page": "src/options/options.html",
45+
"web_accessible_resources": [
46+
{
47+
"resources": ["assets/icons/icon.svg"],
48+
"matches": ["*://github.com/*"]
49+
}
50+
]
4651
}

src/content/icon-injector.ts

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -133,28 +133,19 @@ function createIconElement(textareaId: string): HTMLElement {
133133
button.setAttribute('aria-label', 'Insert convention comment');
134134
button.title = 'Insert convention comment (Cmd+Shift+/)';
135135

136-
// SVG icon (speech bubble with "CC")
136+
// New branded SVG icon loaded from extension assets
137137
const svgNamespace = 'http://www.w3.org/2000/svg';
138138
const svg = document.createElementNS(svgNamespace, 'svg');
139-
svg.setAttribute('width', '16');
140-
svg.setAttribute('height', '16');
141-
svg.setAttribute('viewBox', '0 0 16 16');
142-
svg.setAttribute('fill', 'currentColor');
143-
144-
const path = document.createElementNS(svgNamespace, 'path');
145-
path.setAttribute('d', 'M2 4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H5l-3 3V4z');
146-
path.setAttribute('opacity', '0.6');
147-
148-
const text = document.createElementNS(svgNamespace, 'text');
149-
text.setAttribute('x', '4');
150-
text.setAttribute('y', '10');
151-
text.setAttribute('font-size', '6');
152-
text.setAttribute('font-weight', 'bold');
153-
text.setAttribute('fill', 'currentColor');
154-
text.textContent = 'CC';
155-
156-
svg.appendChild(path);
157-
svg.appendChild(text);
139+
svg.setAttribute('width', '18');
140+
svg.setAttribute('height', '18');
141+
svg.setAttribute('viewBox', '0 0 251 251');
142+
143+
const image = document.createElementNS(svgNamespace, 'image');
144+
image.setAttribute('href', chrome.runtime.getURL('assets/icons/icon.svg'));
145+
image.setAttribute('width', '251');
146+
image.setAttribute('height', '251');
147+
148+
svg.appendChild(image);
158149
button.appendChild(svg);
159150

160151
container.appendChild(button);

src/options/options.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,17 @@ header h1 {
3737
color: #24292f;
3838
}
3939

40+
.logo-container {
41+
display: flex;
42+
align-items: center;
43+
gap: 12px;
44+
}
45+
46+
.header-logo {
47+
width: 32px;
48+
height: 32px;
49+
}
50+
4051
/* Tabs */
4152
.tabs {
4253
display: flex;

src/options/options.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@
1111
<body>
1212
<div class="settings-container">
1313
<header>
14-
<h1>Review Format Kit (RFK) - Settings</h1>
14+
<div class="logo-container">
15+
<img src="/assets/icons/icon.svg" alt="RFK Logo" class="header-logo">
16+
<h1>Review Format Kit (RFK) - Settings</h1>
17+
</div>
1518
</header>
1619

1720
<nav class="tabs">

src/popup/popup.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ header {
2929
margin-bottom: 16px;
3030
padding-bottom: 12px;
3131
border-bottom: 1px solid #d0d7de;
32+
display: flex;
33+
align-items: center;
34+
gap: 10px;
3235
}
3336

3437
header h1 {
@@ -37,6 +40,11 @@ header h1 {
3740
color: #24292f;
3841
}
3942

43+
.header-logo {
44+
width: 24px;
45+
height: 24px;
46+
}
47+
4048
/* Active Group Section */
4149
.active-group {
4250
margin-bottom: 16px;

src/popup/popup.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<body>
1212
<div class="popup-container">
1313
<header>
14+
<img src="/assets/icons/icon.svg" alt="RFK Logo" class="header-logo">
1415
<h1>Review Format Kit (RFK)</h1>
1516
</header>
1617

0 commit comments

Comments
 (0)