@@ -95,11 +95,9 @@ function GroupCheckbox({
95
95
const { records : selectedGroupMap } = useLegacyStore ( SelectedGroupStore ) ;
96
96
const isSelected = selectedGroupMap . get ( group . id ) ?? false ;
97
97
98
- const onChange = useCallback (
99
- ( evt : React . ChangeEvent < HTMLInputElement > ) => {
100
- const mouseEvent = evt . nativeEvent as MouseEvent ;
101
-
102
- if ( mouseEvent . shiftKey ) {
98
+ const handleToggle = useCallback (
99
+ ( isShiftClick : boolean ) => {
100
+ if ( isShiftClick ) {
103
101
SelectedGroupStore . shiftToggleItems ( group . id ) ;
104
102
} else {
105
103
SelectedGroupStore . toggleSelect ( group . id ) ;
@@ -108,8 +106,28 @@ function GroupCheckbox({
108
106
[ group . id ]
109
107
) ;
110
108
109
+ const onChange = useCallback (
110
+ ( evt : React . ChangeEvent < HTMLInputElement > ) => {
111
+ const mouseEvent = evt . nativeEvent as MouseEvent ;
112
+ handleToggle ( mouseEvent . shiftKey ) ;
113
+ } ,
114
+ [ handleToggle ]
115
+ ) ;
116
+
111
117
return (
112
118
< GroupCheckBoxWrapper >
119
+ { ! group . hasSeen && (
120
+ < Tooltip title = { t ( 'Unread' ) } skipWrapper >
121
+ < UnreadIndicator
122
+ data-test-id = "unread-issue-indicator"
123
+ onClick = { ( e : React . MouseEvent ) => {
124
+ // Toggle checkbox on unread indicator misclick
125
+ e . stopPropagation ( ) ;
126
+ handleToggle ( e . shiftKey ) ;
127
+ } }
128
+ />
129
+ </ Tooltip >
130
+ ) }
113
131
< CheckboxLabel >
114
132
< CheckboxWithBackground
115
133
id = { group . id }
@@ -119,11 +137,6 @@ function GroupCheckbox({
119
137
onChange = { onChange }
120
138
/>
121
139
</ CheckboxLabel >
122
- { group . hasSeen ? null : (
123
- < Tooltip title = { t ( 'Unread' ) } skipWrapper >
124
- < UnreadIndicator data-test-id = "unread-issue-indicator" />
125
- </ Tooltip >
126
- ) }
127
140
</ GroupCheckBoxWrapper >
128
141
) ;
129
142
}
@@ -646,23 +659,26 @@ export default StreamGroup;
646
659
647
660
const CheckboxLabel = styled ( 'label' ) `
648
661
position: absolute;
649
- top: 0 ;
662
+ top: -1px ;
650
663
left: 0;
651
664
bottom: 0;
652
665
height: 100%;
653
666
width: 32px;
654
667
padding-left: ${ space ( 2 ) } ;
655
- padding-top: 14px;
656
668
margin: 0;
669
+ margin-top: -1px;
670
+ display: flex;
671
+ align-items: center;
657
672
` ;
658
673
659
674
const UnreadIndicator = styled ( 'div' ) `
660
675
width: 8px;
661
676
height: 8px;
662
677
background-color: ${ p => p . theme . purple400 } ;
663
678
border-radius: 50%;
664
- margin-left: ${ space ( 3 ) } ;
665
- margin-top: 10px;
679
+ margin-top: 1px;
680
+ margin-left: ${ space ( 2 ) } ;
681
+ z-index: 1;
666
682
` ;
667
683
668
684
// Position for wrapper is relative for overlay actions
@@ -675,19 +691,12 @@ const Wrapper = styled(PanelItem)<{
675
691
padding: ${ space ( 1 ) } 0;
676
692
min-height: 82px;
677
693
678
- &:not(:has(: hover)):not(:focus-within ):not(:has(input:checked)) {
694
+ &:not(:hover):not(:has(input:checked)) {
679
695
${ CheckboxLabel } {
680
696
${ p => p . theme . visuallyHidden } ;
681
697
}
682
698
}
683
699
684
- &:hover,
685
- &:focus-within {
686
- ${ UnreadIndicator } {
687
- ${ p => p . theme . visuallyHidden } ;
688
- }
689
- }
690
-
691
700
[data-issue-title-link] {
692
701
&::before {
693
702
content: '';
@@ -757,7 +766,10 @@ const GroupCheckBoxWrapper = styled('div')`
757
766
align-self: flex-start;
758
767
width: 32px;
759
768
display: flex;
769
+ flex-direction: column;
760
770
align-items: center;
771
+ justify-content: center;
772
+ padding-top: ${ space ( 1 ) } ;
761
773
z-index: 1;
762
774
` ;
763
775
0 commit comments