Skip to content

Commit 53a6ab4

Browse files
committed
feat: primer v37 upgrade
Signed-off-by: Adam Setch <[email protected]>
1 parent ac5324a commit 53a6ab4

File tree

9 files changed

+2430
-2552
lines changed

9 files changed

+2430
-2552
lines changed

src/renderer/components/icons/VolumeDownIcon.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { FC } from 'react';
33
export const VolumeDownIcon: FC = () => (
44
<svg
55
aria-label="Volume Down Icon"
6-
className="size-4"
6+
className="size-2"
77
fill="currentColor"
88
height="24"
99
role="img"

src/renderer/components/icons/VolumeUpIcon.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { FC } from 'react';
33
export const VolumeUpIcon: FC = () => (
44
<svg
55
aria-label="Volume Up Icon"
6-
className="size-4"
6+
className="size-2"
77
fill="currentColor"
88
height="24"
99
role="img"

src/renderer/components/notifications/AccountNotifications.tsx

Lines changed: 45 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -73,64 +73,57 @@ export const AccountNotifications: FC<IAccountNotifications> = (
7373
return (
7474
<>
7575
{showAccountHeader && (
76-
<button
76+
<Stack
7777
className={cn(
78-
'group pr-1 py-0.5',
78+
'group relative pr-1 py-0.5',
7979
props.error ? 'bg-gitify-account-error' : 'bg-gitify-account-rest',
8080
)}
81+
direction="horizontal"
8182
onClick={actionToggleAccountNotifications}
82-
type="button"
8383
>
84-
<Stack
85-
align="center"
86-
className="relative"
87-
direction="horizontal"
88-
gap="condensed"
84+
<Button
85+
alignContent="center"
86+
count={notifications.length}
87+
data-testid="account-profile"
88+
onClick={(event: MouseEvent<HTMLElement>) => {
89+
// Don't trigger onClick of parent element.
90+
event.stopPropagation();
91+
openAccountProfile(account);
92+
}}
93+
title="Open account profile"
94+
variant="invisible"
8995
>
90-
<Button
91-
alignContent="center"
92-
count={notifications.length}
93-
data-testid="account-profile"
94-
onClick={(event: MouseEvent<HTMLElement>) => {
95-
// Don't trigger onClick of parent element.
96-
event.stopPropagation();
97-
openAccountProfile(account);
98-
}}
99-
title="Open account profile"
100-
variant="invisible"
101-
>
102-
<AvatarWithFallback
103-
alt={account.user.login}
104-
name={`@${account.user.login}`}
105-
size={Size.MEDIUM}
106-
src={account.user.avatar}
107-
/>
108-
</Button>
109-
110-
<HoverGroup bgColor="group-hover:bg-gitify-account-rest">
111-
<HoverButton
112-
action={() => openGitHubIssues(account.hostname)}
113-
icon={IssueOpenedIcon}
114-
label="My Issues"
115-
testid="account-issues"
116-
/>
117-
118-
<HoverButton
119-
action={() => openGitHubPulls(account.hostname)}
120-
icon={GitPullRequestIcon}
121-
label="My Pull Requests"
122-
testid="account-pull-requests"
123-
/>
124-
125-
<HoverButton
126-
action={actionToggleAccountNotifications}
127-
icon={Chevron.icon}
128-
label={Chevron.label}
129-
testid="account-toggle"
130-
/>
131-
</HoverGroup>
132-
</Stack>
133-
</button>
96+
<AvatarWithFallback
97+
alt={account.user.login}
98+
name={`@${account.user.login}`}
99+
size={Size.MEDIUM}
100+
src={account.user.avatar}
101+
/>
102+
</Button>
103+
104+
<HoverGroup bgColor="group-hover:bg-gitify-account-rest">
105+
<HoverButton
106+
action={() => openGitHubIssues(account.hostname)}
107+
icon={IssueOpenedIcon}
108+
label="My Issues"
109+
testid="account-issues"
110+
/>
111+
112+
<HoverButton
113+
action={() => openGitHubPulls(account.hostname)}
114+
icon={GitPullRequestIcon}
115+
label="My Pull Requests"
116+
testid="account-pull-requests"
117+
/>
118+
119+
<HoverButton
120+
action={actionToggleAccountNotifications}
121+
icon={Chevron.icon}
122+
label={Chevron.label}
123+
testid="account-toggle"
124+
/>
125+
</HoverGroup>
126+
</Stack>
134127
)}
135128

136129
{showAccountNotifications && (

src/renderer/components/notifications/NotificationRow.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export const NotificationRow: FC<INotificationRow> = ({
8282
<div
8383
className={cn(
8484
'group border-b',
85-
'pl-3 pr-1 py-1.5',
85+
'pl-1.5 pr-1 py-0.75',
8686
'text-gitify-font border-gitify-notification-border hover:bg-gitify-notification-hover',
8787
(isAnimated || animateExit) &&
8888
'translate-x-full opacity-0 transition duration-350 ease-in-out',

src/renderer/components/notifications/RepositoryNotifications.tsx

Lines changed: 48 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)