Skip to content

Commit 206f610

Browse files
committed
style(popup): refine action visibility and avatar rings
add subtle avatar rings for popup and settings avatars unify mark-as-read actions to use opacity-based visibility with pointer-events and focus-visible support
1 parent 0745a95 commit 206f610

2 files changed

Lines changed: 30 additions & 14 deletions

File tree

src/popup/popup.css

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,7 @@ body.dark-theme .pat-input.input-error {
368368
border-radius: 50%;
369369
object-fit: cover;
370370
flex-shrink: 0;
371+
box-shadow: 0 0 0 1px var(--avatar-ring-color);
371372
}
372373

373374
.user-info .username {
@@ -487,11 +488,10 @@ body.dark-theme .pat-input.input-error {
487488
transition: opacity 0.15s ease;
488489
}
489490

490-
/* Mark as read button - hidden by default */
491491
.repo-mark-read-btn {
492492
position: absolute;
493493
right: -2px;
494-
display: none;
494+
display: flex;
495495
align-items: center;
496496
justify-content: center;
497497
width: 24px;
@@ -502,8 +502,13 @@ body.dark-theme .pat-input.input-error {
502502
color: var(--text-secondary);
503503
cursor: pointer;
504504
border-radius: var(--radius-sm);
505-
transition: all 0.15s ease;
506505
flex-shrink: 0;
506+
opacity: 0;
507+
pointer-events: none;
508+
transition:
509+
opacity 0.15s ease,
510+
background-color 0.15s ease,
511+
color 0.15s ease;
507512
}
508513

509514
.repo-mark-read-btn:hover {
@@ -515,13 +520,15 @@ body.dark-theme .pat-input.input-error {
515520
transform: scale(0.95);
516521
}
517522

518-
/* Show button on header hover, hide count */
519-
.repo-group-header:hover .repo-count {
523+
.repo-group-header:hover .repo-count,
524+
.repo-actions:has(.repo-mark-read-btn:focus-visible) .repo-count {
520525
opacity: 0;
521526
}
522527

523-
.repo-group-header:hover .repo-mark-read-btn {
524-
display: flex;
528+
.repo-group-header:hover .repo-mark-read-btn,
529+
.repo-mark-read-btn:focus-visible {
530+
opacity: 1;
531+
pointer-events: auto;
525532
}
526533

527534
.notification-item {
@@ -810,6 +817,7 @@ body.dark-theme .notification-hover-card {
810817
height: 16px;
811818
border-radius: 50%;
812819
flex-shrink: 0;
820+
box-shadow: 0 0 0 1px var(--avatar-ring-color);
813821
}
814822

815823
.author-profile-link {
@@ -890,31 +898,36 @@ body.dark-theme .notification-hover-card {
890898
right: 0px;
891899
top: 50%;
892900
transform: translateY(-50%);
901+
opacity: 0;
893902
pointer-events: none;
894903
background: transparent;
895904
padding: 2px 10px;
896905
border-radius: var(--radius-sm);
897-
/* Remove transition to avoid flash */
906+
transition:
907+
opacity 0.15s ease,
908+
background-color 0.15s ease;
898909
}
899910

900-
.notification-item:hover .notification-actions {
911+
.notification-item:hover .notification-actions,
912+
.notification-actions:has(.btn-mark-read:focus-visible) {
913+
opacity: 1;
901914
pointer-events: auto;
902915
background: linear-gradient(to right, transparent 0%, var(--bg-hover) 30%);
903916
}
904917

905-
.notification-item:hover .btn-mark-read {
906-
color: var(--text-secondary);
907-
}
908-
909918
.btn-mark-read {
910919
padding: 4px 8px;
911920
font-size: 14px;
912921
border-radius: var(--radius-sm);
913922
border: 1px solid transparent;
914923
background: transparent;
915-
color: transparent;
924+
color: var(--text-secondary);
916925
cursor: pointer;
917926
min-width: 32px;
927+
transition:
928+
color 0.15s ease,
929+
background-color 0.15s ease,
930+
border-color 0.15s ease;
918931
}
919932

920933
.btn-mark-read:hover:not(:disabled) {
@@ -1094,6 +1107,7 @@ body.dark-theme .settings-view {
10941107
height: 24px;
10951108
border-radius: 50%;
10961109
flex-shrink: 0;
1110+
box-shadow: 0 0 0 1px var(--avatar-ring-color);
10971111
}
10981112

10991113
.settings-user-details {

src/styles/variables.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
--bg-hover: #f3f4f6;
1616
--bg-secondary: #f9fafb;
1717
--bg-primary: #ffffff;
18+
--avatar-ring-color: rgba(31, 41, 55, 0.12);
1819

1920
/* Radius */
2021
--radius-sm: 6px;
@@ -42,6 +43,7 @@ body.dark-theme {
4243
--bg-hover: #2d333b;
4344
--bg-secondary: #22272e;
4445
--bg-primary: #22272e;
46+
--avatar-ring-color: rgba(255, 255, 255, 0.14);
4547

4648
/* Icon Colors - GitHub Style (softer) */
4749
--icon-issue-open: #2ea043; /* Darker green for open issues */

0 commit comments

Comments
 (0)