@@ -57,73 +57,66 @@ export const RepositoryNotifications: FC<IRepositoryNotifications> = ({
5757
5858 return (
5959 < >
60- < button
60+ < Stack
6161 className = { cn (
62- 'group pr-1 py-0.5' ,
62+ 'group relative pr-1 py-0.5' ,
6363 'bg-gitify-repository' ,
6464 animateExit &&
6565 'translate-x-full opacity-0 transition duration-350 ease-in-out' ,
6666 showAsRead && Opacity . READ ,
6767 ) }
68+ direction = "horizontal"
6869 onClick = { actionToggleRepositoryNotifications }
69- type = "button"
7070 >
71- < Stack
72- align = "center"
73- className = "relative"
74- direction = "horizontal"
75- gap = "condensed"
71+ < Button
72+ alignContent = "center"
73+ count = { repoNotifications . length }
74+ data-testid = "open-repository"
75+ onClick = { ( event : MouseEvent < HTMLElement > ) => {
76+ // Don't trigger onClick of parent element.
77+ event . stopPropagation ( ) ;
78+ openRepository ( repoNotifications [ 0 ] . repository ) ;
79+ } }
80+ title = "Open repository"
81+ variant = "invisible"
7682 >
77- < Button
78- alignContent = "center"
79- count = { repoNotifications . length }
80- data-testid = "open-repository"
81- onClick = { ( event : MouseEvent < HTMLElement > ) => {
82- // Don't trigger onClick of parent element.
83- event . stopPropagation ( ) ;
84- openRepository ( repoNotifications [ 0 ] . repository ) ;
85- } }
86- title = "Open repository"
87- variant = "invisible"
88- >
89- < AvatarWithFallback
90- alt = { repoName }
91- name = { repoName }
92- size = { Size . LARGE }
93- src = { avatarUrl }
94- userType = { repoNotifications [ 0 ] . repository . owner . type }
95- />
96- </ Button >
83+ < AvatarWithFallback
84+ alt = { repoName }
85+ name = { repoName }
86+ size = { Size . LARGE }
87+ src = { avatarUrl }
88+ userType = { repoNotifications [ 0 ] . repository . owner . type }
89+ />
90+ </ Button >
9791
98- { ! animateExit && (
99- < HoverGroup bgColor = "group-hover:bg-gitify-repository" >
100- < HoverButton
101- action = { actionMarkAsDone }
102- enabled = { isMarkAsDoneFeatureSupported (
103- repoNotifications [ 0 ] . account ,
104- ) }
105- icon = { CheckIcon }
106- label = "Mark repository as done"
107- testid = "repository-mark-as-done"
108- />
92+ { ! animateExit && (
93+ < HoverGroup bgColor = "group-hover:bg-gitify-repository" >
94+ < HoverButton
95+ action = { actionMarkAsDone }
96+ enabled = { isMarkAsDoneFeatureSupported (
97+ repoNotifications [ 0 ] . account ,
98+ ) }
99+ icon = { CheckIcon }
100+ label = "Mark repository as done"
101+ testid = "repository-mark-as-done"
102+ />
109103
110- < HoverButton
111- action = { actionMarkAsRead }
112- icon = { ReadIcon }
113- label = "Mark repository as read"
114- testid = "repository-mark-as-read"
115- />
104+ < HoverButton
105+ action = { actionMarkAsRead }
106+ icon = { ReadIcon }
107+ label = "Mark repository as read"
108+ testid = "repository-mark-as-read"
109+ />
116110
117- < HoverButton
118- action = { actionToggleRepositoryNotifications }
119- icon = { Chevron . icon }
120- label = { Chevron . label }
121- testid = "repository-toggle"
122- />
123- </ HoverGroup >
124- ) }
125- </ Stack >
126- </ button >
111+ < HoverButton
112+ action = { actionToggleRepositoryNotifications }
113+ icon = { Chevron . icon }
114+ label = { Chevron . label }
115+ testid = "repository-toggle"
116+ />
117+ </ HoverGroup >
118+ ) }
119+ </ Stack >
127120
128121 { showRepositoryNotifications &&
129122 repoNotifications . map ( ( notification ) => (
0 commit comments