Error Color Consolidation (#1756)

* Error Color Consolidation

* notes

* color changes
This commit is contained in:
Neil
2023-10-21 14:33:30 -07:00
committed by GitHub
parent 25f4e2a8b5
commit e0b2eab475
13 changed files with 39 additions and 37 deletions

View File

@@ -110,7 +110,7 @@ function Notification({
color: positive color: positive
? theme.noticeText ? theme.noticeText
: error : error
? theme.alt3ErrorText ? theme.errorTextDark
: theme.alt4WarningText, : theme.alt4WarningText,
}} }}
> >
@@ -129,7 +129,7 @@ function Notification({
positive positive
? theme.noticeBorder ? theme.noticeBorder
: error : error
? theme.altErrorAccent ? theme.errorBorder
: theme.altWarningAccent : theme.altWarningAccent
}`, }`,
...styles.shadowLarge, ...styles.shadowLarge,
@@ -175,7 +175,7 @@ function Notification({
positive positive
? theme.noticeBorder ? theme.noticeBorder
: error : error
? theme.altErrorAccent ? theme.errorBorder
: theme.altWarningAccent : theme.altWarningAccent
}`, }`,
color: 'currentColor', color: 'currentColor',
@@ -185,7 +185,7 @@ function Notification({
backgroundColor: positive backgroundColor: positive
? theme.noticeBackground ? theme.noticeBackground
: error : error
? theme.altErrorBackground ? theme.errorBackground
: theme.altWarningBackground, : theme.altWarningBackground,
}, },
}} }}

View File

@@ -152,7 +152,7 @@ export function SyncButton({ style, isMobile = false }: SyncButtonProps) {
const mobileColor = const mobileColor =
syncState === 'error' syncState === 'error'
? theme.alt4ErrorText ? theme.errorText
: syncState === 'disabled' || : syncState === 'disabled' ||
syncState === 'offline' || syncState === 'offline' ||
syncState === 'local' syncState === 'local'
@@ -160,7 +160,7 @@ export function SyncButton({ style, isMobile = false }: SyncButtonProps) {
: style.color; : style.color;
const desktopColor = const desktopColor =
syncState === 'error' syncState === 'error'
? theme.alt2ErrorText ? theme.errorTextDark
: syncState === 'disabled' || : syncState === 'disabled' ||
syncState === 'offline' || syncState === 'offline' ||
syncState === 'local' syncState === 'local'

View File

@@ -93,8 +93,8 @@ export const Error = ({ style, children }: ScopedAlertProps) => {
return ( return (
<Alert <Alert
icon={ExclamationOutline} icon={ExclamationOutline}
color={theme.altErrorText} color={theme.errorTextDarker}
backgroundColor={theme.altErrorBackground} backgroundColor={theme.errorBackground}
style={style} style={style}
> >
{children} {children}

View File

@@ -102,7 +102,7 @@ function Saved({ projected }) {
color: projected color: projected
? theme.alt2WarningText ? theme.alt2WarningText
: isNegative : isNegative
? theme.alt2ErrorText ? theme.errorTextDark
: theme.formInputText, : theme.formInputText,
}} }}
/> />

View File

@@ -282,7 +282,7 @@ function Saved({ projected, style }: SavedProps) {
color: projected color: projected
? theme.alt2WarningText ? theme.alt2WarningText
: isNegative : isNegative
? theme.alt2ErrorText ? theme.errorTextDark
: theme.altUpcomingText, : theme.altUpcomingText,
}, },
])}`} ])}`}

View File

@@ -190,7 +190,7 @@ function ToBudget({
borderBottom: '1px solid transparent', borderBottom: '1px solid transparent',
':hover': { ':hover': {
borderColor: isNegative borderColor: isNegative
? theme.errorText ? theme.errorBorder
: theme.pageTextPositive, : theme.pageTextPositive,
}, },
}, },

View File

@@ -20,8 +20,8 @@ export function getStatusProps(status: StatusTypes) {
switch (status) { switch (status) {
case 'missed': case 'missed':
return { return {
color: theme.altErrorText, color: theme.errorTextDarker,
backgroundColor: theme.altErrorBackground, backgroundColor: theme.errorBackground,
Icon: EditSkull1, Icon: EditSkull1,
}; };
case 'due': case 'due':

View File

@@ -156,7 +156,7 @@ function Status({ status }) {
switch (status) { switch (status) {
case 'missed': case 'missed':
color = theme.alt3ErrorText; color = theme.errorText;
break; break;
case 'due': case 'due':
color = theme.alt2WarningText; color = theme.alt2WarningText;

View File

@@ -418,7 +418,7 @@ function StatusCell({
status === 'cleared' status === 'cleared'
? theme.noticeTextLight ? theme.noticeTextLight
: status === 'missed' : status === 'missed'
? theme.alt5ErrorText ? theme.errorText
: status === 'due' : status === 'due'
? theme.alt3WarningText ? theme.alt3WarningText
: selected : selected
@@ -1043,7 +1043,7 @@ const Transaction = memo(function Transaction(props) {
style={{ style={{
color: color:
notes === 'missed' notes === 'missed'
? theme.alt5ErrorText ? theme.errorText
: notes === 'due' : notes === 'due'
? theme.alt5WarningText ? theme.alt5WarningText
: selected : selected
@@ -1051,7 +1051,7 @@ const Transaction = memo(function Transaction(props) {
: theme.altTableText, : theme.altTableText,
backgroundColor: backgroundColor:
notes === 'missed' notes === 'missed'
? theme.altErrorBackground ? theme.errorBackground
: notes === 'due' : notes === 'due'
? theme.altWarningBackground ? theme.altWarningBackground
: selected : selected

View File

@@ -166,11 +166,11 @@ export const alt2WarningText = warningText;
export const alt3WarningText = warningText; export const alt3WarningText = warningText;
export const warningAccent = colorPalette.orange500; export const warningAccent = colorPalette.orange500;
export const errorBackground = colorPalette.red800; export const errorBackground = colorPalette.red800;
export const altErrorBackground = errorBackground; export const errorText = colorPalette.red300;
export const errorText = colorPalette.red200; export const errorTextDark = colorPalette.red150;
export const altErrorText = errorText; export const errorTextDarker = errorTextDark;
export const alt2ErrorText = errorText; export const errorTextMenu = colorPalette.red500;
export const errorAccent = colorPalette.red500; export const errorBorder = colorPalette.red500;
export const upcomingBackground = colorPalette.purple700; export const upcomingBackground = colorPalette.purple700;
export const upcomingText = colorPalette.purple100; export const upcomingText = colorPalette.purple100;
export const altUpcomingText = upcomingText; export const altUpcomingText = upcomingText;

View File

@@ -153,12 +153,12 @@ export const altWarningText = warningText;
export const alt2WarningText = warningText; export const alt2WarningText = warningText;
export const alt3WarningText = warningText; export const alt3WarningText = warningText;
export const warningAccent = colorPalette.orange500; export const warningAccent = colorPalette.orange500;
export const errorBackground = colorPalette.red800; export const errorBackground = colorPalette.red100;
export const altErrorBackground = errorBackground; export const errorText = colorPalette.red500;
export const errorText = colorPalette.red200; export const errorTextDark = colorPalette.red700;
export const altErrorText = errorText; export const errorTextDarker = colorPalette.red900;
export const alt2ErrorText = errorText; export const errorTextMenu = colorPalette.red200;
export const errorAccent = colorPalette.red500; export const errorBorder = colorPalette.red500;
export const upcomingBackground = colorPalette.purple100; export const upcomingBackground = colorPalette.purple100;
export const upcomingText = colorPalette.purple900; export const upcomingText = colorPalette.purple900;
export const altUpcomingText = colorPalette.purple500; export const altUpcomingText = colorPalette.purple500;

View File

@@ -172,16 +172,12 @@ export const alt4WarningText = colorPalette.orange800;
export const alt5WarningText = colorPalette.orange600; export const alt5WarningText = colorPalette.orange600;
export const warningAccent = colorPalette.orange400; export const warningAccent = colorPalette.orange400;
export const altWarningAccent = colorPalette.orange600; export const altWarningAccent = colorPalette.orange600;
export const errorBackground = colorPalette.red50; export const errorBackground = colorPalette.red100;
export const altErrorBackground = colorPalette.red100;
export const errorText = colorPalette.red500; export const errorText = colorPalette.red500;
export const altErrorText = colorPalette.red900; export const errorTextDark = colorPalette.red700;
export const alt2ErrorText = colorPalette.red600; export const errorTextDarker = colorPalette.red900;
export const alt3ErrorText = colorPalette.red700; export const errorTextMenu = colorPalette.red200;
export const alt4ErrorText = colorPalette.red300; export const errorBorder = colorPalette.red500;
export const alt5ErrorText = colorPalette.red400;
export const errorAccent = colorPalette.red200;
export const altErrorAccent = colorPalette.red500;
export const upcomingBackground = colorPalette.purple100; export const upcomingBackground = colorPalette.purple100;
export const upcomingText = colorPalette.purple900; export const upcomingText = colorPalette.purple900;
export const altUpcomingText = colorPalette.purple500; export const altUpcomingText = colorPalette.purple500;

View File

@@ -0,0 +1,6 @@
---
category: Enhancements
authors: [carkom]
---
Conslidating and making consistent error colors across all pages in the app.