Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Color Consolidation #1756

Merged
merged 7 commits into from
Oct 21, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/desktop-client/src/components/Notifications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function Notification({
color: positive
? theme.alt4NoticeText
: error
? theme.alt3ErrorText
? theme.errorTextDark
: theme.alt4WarningText,
}}
>
Expand All @@ -129,7 +129,7 @@ function Notification({
positive
? theme.altNoticeAccent
: error
? theme.altErrorAccent
? theme.errorBorder
: theme.altWarningAccent
}`,
...styles.shadowLarge,
Expand Down Expand Up @@ -175,7 +175,7 @@ function Notification({
positive
? theme.altNoticeAccent
: error
? theme.altErrorAccent
? theme.errorBorder
: theme.altWarningAccent
}`,
color: 'currentColor',
Expand All @@ -185,7 +185,7 @@ function Notification({
backgroundColor: positive
? theme.noticeBackground
: error
? theme.altErrorBackground
? theme.errorBackground
carkom marked this conversation as resolved.
Show resolved Hide resolved
: theme.altWarningBackground,
},
}}
Expand Down
4 changes: 2 additions & 2 deletions packages/desktop-client/src/components/Titlebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,15 +151,15 @@ export function SyncButton({ style, isMobile = false }: SyncButtonProps) {

const mobileColor =
syncState === 'error'
? theme.alt4ErrorText
? theme.errorText
: syncState === 'disabled' ||
syncState === 'offline' ||
syncState === 'local'
? theme.sidebarItemText
: style.color;
const desktopColor =
syncState === 'error'
? theme.alt2ErrorText
? theme.errorTextDark
: syncState === 'disabled' ||
syncState === 'offline' ||
syncState === 'local'
Expand Down
4 changes: 2 additions & 2 deletions packages/desktop-client/src/components/alerts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ export const Error = ({ style, children }: ScopedAlertProps) => {
return (
<Alert
icon={ExclamationOutline}
color={theme.altErrorText}
backgroundColor={theme.altErrorBackground}
color={theme.errorTextDarker}
backgroundColor={theme.errorBackground}
style={style}
>
{children}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function Saved({ projected }) {
color: projected
? theme.alt2WarningText
: isNegative
? theme.alt2ErrorText
? theme.errorTextDark
: theme.formInputText,
}}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ function Saved({ projected, style }: SavedProps) {
color: projected
? theme.alt2WarningText
: isNegative
? theme.alt2ErrorText
? theme.errorTextDark
: theme.altUpcomingText,
},
])}`}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ function ToBudget({
borderBottom: '1px solid transparent',
':hover': {
borderColor: isNegative
? theme.errorText
? theme.errorBorder
: theme.pageTextPositive,
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ export function getStatusProps(status: StatusTypes) {
switch (status) {
case 'missed':
return {
color: theme.altErrorText,
backgroundColor: theme.altErrorBackground,
color: theme.errorTextDarker,
backgroundColor: theme.errorBackground,
Icon: EditSkull1,
};
case 'due':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ function Status({ status }) {

switch (status) {
case 'missed':
color = theme.alt3ErrorText;
color = theme.errorText;
break;
case 'due':
color = theme.alt2WarningText;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ function StatusCell({
status === 'cleared'
? theme.noticeText
: status === 'missed'
? theme.alt5ErrorText
? theme.errorText
: status === 'due'
? theme.alt3WarningText
: selected
Expand Down Expand Up @@ -1043,15 +1043,15 @@ const Transaction = memo(function Transaction(props) {
style={{
color:
notes === 'missed'
? theme.alt5ErrorText
? theme.errorText
: notes === 'due'
? theme.alt5WarningText
: selected
? theme.formLabelText
: theme.altTableText,
backgroundColor:
notes === 'missed'
? theme.altErrorBackground
? theme.errorBackground
: notes === 'due'
? theme.altWarningBackground
: selected
Expand Down
8 changes: 4 additions & 4 deletions packages/desktop-client/src/style/themes/dark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,11 @@ export const alt2WarningText = warningText;
export const alt3WarningText = warningText;
export const warningAccent = colorPalette.orange500;
export const errorBackground = colorPalette.red800;
export const altErrorBackground = errorBackground;
export const errorText = colorPalette.red200;
export const altErrorText = errorText;
export const alt2ErrorText = errorText;
export const errorAccent = colorPalette.red500;
export const errorTextDark = errorText;
export const errorTextDarker = errorText;
export const errorTextMenu = colorPalette.red500;
export const errorBorder = colorPalette.red500;
export const upcomingBackground = tableBackground;
export const upcomingText = tableTextInactive;
export const altUpcomingText = upcomingText;
Expand Down
12 changes: 6 additions & 6 deletions packages/desktop-client/src/style/themes/development.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,12 @@ export const altWarningText = warningText;
export const alt2WarningText = warningText;
export const alt3WarningText = warningText;
export const warningAccent = colorPalette.orange500;
export const errorBackground = colorPalette.red800;
export const altErrorBackground = errorBackground;
export const errorText = colorPalette.red200;
export const altErrorText = errorText;
export const alt2ErrorText = errorText;
export const errorAccent = colorPalette.red500;
export const errorBackground = colorPalette.red100;
export const errorText = colorPalette.red500;
export const errorTextDark = colorPalette.red700;
export const errorTextDarker = colorPalette.red900;
export const errorTextMenu = colorPalette.red200;
export const errorBorder = colorPalette.red500;
export const upcomingBackground = colorPalette.purple100;
export const upcomingText = colorPalette.purple900;
export const altUpcomingText = colorPalette.purple500;
Expand Down
14 changes: 5 additions & 9 deletions packages/desktop-client/src/style/themes/light.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,16 +178,12 @@ export const alt4WarningText = colorPalette.orange800;
export const alt5WarningText = colorPalette.orange600;
export const warningAccent = colorPalette.orange400;
export const altWarningAccent = colorPalette.orange600;
export const errorBackground = colorPalette.red50;
export const altErrorBackground = colorPalette.red100;
export const errorBackground = colorPalette.red100;
export const errorText = colorPalette.red500;
export const altErrorText = colorPalette.red900;
export const alt2ErrorText = colorPalette.red600;
export const alt3ErrorText = colorPalette.red700;
export const alt4ErrorText = colorPalette.red300;
export const alt5ErrorText = colorPalette.red400;
export const errorAccent = colorPalette.red200;
export const altErrorAccent = colorPalette.red500;
export const errorTextDark = colorPalette.red700;
export const errorTextDarker = colorPalette.red900;
export const errorTextMenu = colorPalette.red200;
export const errorBorder = colorPalette.red500;
export const upcomingBackground = colorPalette.purple100;
export const upcomingText = colorPalette.purple900;
export const altUpcomingText = colorPalette.purple500;
Expand Down
6 changes: 6 additions & 0 deletions upcoming-release-notes/1756.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
category: Enhancements
authors: [carkom]
---

Conslidating and making consistent error colors across all pages in the app.