Skip to content

Commit 122386f

Browse files
committed
feat: migrate to primer design tokens
Signed-off-by: Adam Setch <[email protected]>
1 parent 8bfd088 commit 122386f

File tree

5 files changed

+16
-25
lines changed

5 files changed

+16
-25
lines changed

src/renderer/components/notifications/NotificationRow.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export const NotificationRow: FC<INotificationRow> = ({
8888
<div
8989
id={notification.id}
9090
className={cn(
91-
'group flex border-b pl-3 pr-1 py-1.5 text-gitify-font border-gitify-notification-border bg-gitify-notification-rest hover:bg-gitify-notification-hover',
91+
'group flex border-b pl-3 pr-1 py-1.5 text-gitify-font border-gitify-notification-border hover:bg-gitify-notification-hover',
9292
(isAnimated || animateExit) &&
9393
'translate-x-full opacity-0 transition duration-[350ms] ease-in-out',
9494
(isRead || showAsRead) && Opacity.READ,

src/renderer/components/notifications/__snapshots__/AccountNotifications.test.tsx.snap

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/renderer/components/notifications/__snapshots__/NotificationRow.test.tsx.snap

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/renderer/context/App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,10 @@ export const AppProvider = ({ children }: { children: ReactNode }) => {
145145

146146
useEffect(() => {
147147
const mode = getColorModeFromTheme(settings.theme);
148-
149148
setColorMode(mode);
149+
150150
setTheme(settings.theme); // TODO - Replace fully with Primer design tokens and components
151-
}, [settings.theme]);
151+
}, [settings.theme, setColorMode]);
152152

153153
// biome-ignore lint/correctness/useExhaustiveDependencies: We only want fetchNotifications to be called for account changes
154154
useEffect(() => {

tailwind.config.ts

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const config: Config = {
1111
},
1212
colors: {
1313
gitify: {
14-
font: 'var(--gitify-font)',
14+
font: 'var(--fgColor-default)',
1515
background: 'var(--gitify-background)',
1616
sidebar: '#24292e',
1717
footer: 'var(--gitify-footer)',
@@ -36,9 +36,8 @@ const config: Config = {
3636
repository: 'var(--gitify-repository)',
3737

3838
notification: {
39-
border: 'var(--gitify-notification-border)',
40-
rest: 'var(--gitify-notification-rest)',
41-
hover: 'var(--gitify-notification-hover)',
39+
border: 'var(--control-bgColor-hover)',
40+
hover: 'var(--control-bgColor-hover)',
4241
pill: {
4342
rest: 'var(--gitify-notification-pill-rest)',
4443
hover: 'var(--gitify-notification-pill-hover)',
@@ -60,7 +59,6 @@ const config: Config = {
6059
({ addBase }) => {
6160
addBase({
6261
':root': {
63-
'--gitify-font': colors.gray[700],
6462
'--gitify-background': colors.white,
6563
'--gitify-footer': colors.gray[200],
6664

@@ -69,9 +67,6 @@ const config: Config = {
6967

7068
'--gitify-repository': colors.gray[100],
7169

72-
'--gitify-notification-border': colors.gray[100],
73-
'--gitify-notification-rest': colors.white,
74-
'--gitify-notification-hover': colors.gray[100],
7570
'--gitify-notification-pill-rest': colors.gray[100],
7671
'--gitify-notification-pill-hover': colors.gray[200],
7772

@@ -80,7 +75,6 @@ const config: Config = {
8075
'--gitify-scrollbar-thumb-hover': colors.gray[500],
8176
},
8277
'.dark': {
83-
'--gitify-font': colors.gray[100],
8478
'--gitify-background': '#161b22',
8579
'--gitify-footer': '#000209',
8680

@@ -89,9 +83,6 @@ const config: Config = {
8983

9084
'--gitify-repository': '#090e15',
9185

92-
'--gitify-notification-border': '#090e15',
93-
'--gitify-notification-rest': '#161b22',
94-
'--gitify-notification-hover': '#090e15',
9586
'--gitify-notification-pill-rest': colors.gray[800],
9687
'--gitify-notification-pill-hover': colors.gray[700],
9788

0 commit comments

Comments
 (0)