Skip to content

Commit 7cdcaeb

Browse files
Fix popup icon+text spacing, alignment, and validation colors
- Add Primer margin utilities (mr-1, ml-1) for icon-text spacing - Add Primer flex utilities (d-inline-flex, flex-items-center) for vertical alignment of icons with text - Remove non-functional gap-* classes (never existed in Primer v22) - Replace undefined validation color classes with Primer color-fg-success, color-fg-attention, color-fg-danger Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 3477fab commit 7cdcaeb

2 files changed

Lines changed: 19 additions & 14 deletions

File tree

extension/assets/popup.html

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@
4141
}
4242

4343
.comments-icon {
44-
padding-top: 2px;
45-
padding-right: 2px;
44+
display: inline-flex;
4645
}
4746

4847
.remove-btn {
@@ -147,12 +146,12 @@
147146
<div class="f4 mb-1">
148147
<a target="_blank" rel="noopener noreferrer" class="Link--primary no-underline text-bold"></a>
149148
</div>
150-
<div class="f6 color-fg-muted d-flex flex-items-center flex-wrap gap-2">
149+
<div class="f6 color-fg-muted d-flex flex-items-center flex-wrap">
151150
<span class="repo-name"></span>
152151
<span class="issue-number"></span>
153152
<span class="issue-updated">· Updated <relative-time></relative-time></span>
154-
<div class="comments d-none">
155-
<span class="comments-icon"></span>
153+
<div class="comments d-none d-inline-flex flex-items-center ml-1">
154+
<span class="comments-icon mr-1"></span>
156155
<span class="comments-count"></span>
157156
</div>
158157
</div>
@@ -203,15 +202,15 @@ <h1 class="f4 mb-0">GitHub Bookmarked Issues</h1>
203202
<pre class="f6 color-fg-muted bg-canvas-subtle p-2 rounded-2 mb-3 overflow-x-auto">- https://github.com/org/project/issues/1
204203
- [Some title](https://github.com/org/project/issues/2)</pre>
205204
<textarea id="import-textarea" class="import-textarea" placeholder="Paste Markdown links or GitHub issue URLs..."></textarea>
206-
<div id="import-validation" class="d-none d-flex flex-justify-end gap-3 mt-2 f6"></div>
205+
<div id="import-validation" class="d-none d-flex flex-justify-end mt-2 f6"></div>
207206
<div class="d-flex mt-3">
208207
<button id="import-submit-btn" class="btn btn-primary mr-2" type="button" disabled>Import</button>
209208
<button id="import-cancel-btn" class="btn" type="button">Cancel</button>
210209
</div>
211210
</div>
212211

213-
<div id="rate-limit-warning" class="d-none m-3 p-2 border rounded-2 color-bg-attention color-border-attention f6 d-flex flex-items-center gap-2">
214-
<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
212+
<div id="rate-limit-warning" class="d-none m-3 p-2 border rounded-2 color-bg-attention color-border-attention f6 d-flex flex-items-center">
213+
<svg class="mr-1" width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
215214
<path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path>
216215
</svg>
217216
<span class="rate-limit-message"></span>

extension/assets/popup.js

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -373,26 +373,32 @@ function updateValidationDisplay(validation) {
373373
// Valid items (success - green)
374374
if (validation.valid.length > 0) {
375375
const item = document.createElement('span');
376-
item.className = 'import-validation-item import-validation--success';
377-
item.appendChild(getIcon('check-circle'));
376+
item.className = 'import-validation-item color-fg-success d-inline-flex flex-items-center ml-3';
377+
const icon = getIcon('check-circle');
378+
icon.classList.add('mr-1');
379+
item.appendChild(icon);
378380
item.appendChild(document.createTextNode(`${validation.valid.length} valid`));
379381
container.appendChild(item);
380382
}
381383

382384
// Duplicate items (info - blue)
383385
if (validation.duplicates > 0) {
384386
const item = document.createElement('span');
385-
item.className = 'import-validation-item import-validation--info';
386-
item.appendChild(getIcon('info'));
387+
item.className = 'import-validation-item color-fg-attention d-inline-flex flex-items-center ml-3';
388+
const icon = getIcon('info');
389+
icon.classList.add('mr-1');
390+
item.appendChild(icon);
387391
item.appendChild(document.createTextNode(`${validation.duplicates} duplicate (ignored)`));
388392
container.appendChild(item);
389393
}
390394

391395
// Invalid items (danger - red)
392396
if (validation.invalid > 0) {
393397
const item = document.createElement('span');
394-
item.className = 'import-validation-item import-validation--danger';
395-
item.appendChild(getIcon('x-circle'));
398+
item.className = 'import-validation-item color-fg-danger d-inline-flex flex-items-center ml-3';
399+
const icon = getIcon('x-circle');
400+
icon.classList.add('mr-1');
401+
item.appendChild(icon);
396402
item.appendChild(document.createTextNode(`${validation.invalid} invalid`));
397403
container.appendChild(item);
398404
}

0 commit comments

Comments
 (0)