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

Consolidate Notice Colors #1724

Merged
merged 4 commits into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all 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 @@ -108,7 +108,7 @@ function Notification({
style={{
marginTop: 10,
color: positive
? theme.alt4NoticeText
? theme.noticeText
: error
? theme.alt3ErrorText
: theme.alt4WarningText,
Expand All @@ -121,13 +121,13 @@ function Notification({
padding: '14px 14px',
fontSize: 14,
backgroundColor: positive
? theme.alt2NoticeBackground
? theme.noticeBackgroundLight
: error
? theme.errorBackground
: theme.alt2WarningBackground,
borderTop: `3px solid ${
positive
? theme.altNoticeAccent
? theme.noticeBorder
: error
? theme.altErrorAccent
: theme.altWarningAccent
Expand Down Expand Up @@ -173,7 +173,7 @@ function Notification({
backgroundColor: 'transparent',
border: `1px solid ${
positive
? theme.altNoticeAccent
? theme.noticeBorder
: error
? theme.altErrorAccent
: theme.altWarningAccent
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-client/src/components/accounts/Balance.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export function Balances({
value < 0
? theme.errorText
: value > 0
? theme.noticeText
? theme.noticeTextLight
: theme.pageTextSubdued,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No change

})}
privacyFilter={{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function AccountCard({ account, updated, getBalanceQuery, onSelect }) {
{account.bankId && (
<View
style={{
backgroundColor: theme.noticeText,
backgroundColor: theme.noticeBackgroundDark,
marginLeft: '-23px',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No change

width: 8,
height: 8,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export function ReconcilingMessage({
{targetDiff === 0 ? (
<View
style={{
color: theme.noticeText,
color: theme.noticeTextLight,
flex: 1,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No change

flexDirection: 'row',
alignItems: 'center',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ function CategoryList({
alignItems: 'center',
fontSize: 11,
fontWeight: 500,
color: theme.noticeAccent,
color: theme.noticeTextMenu,
padding: '6px 8px',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No change

':active': {
backgroundColor: 'rgba(100, 100, 100, .25)',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function PayeeList({
<View
style={{
display: 'block',
color: theme.noticeAccent,
color: theme.noticeTextMenu,
borderRadius: 4,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No change

fontSize: isNarrowWidth ? 'inherit' : 11,
fontWeight: 500,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function IncomeProgress({ current, target }: IncomeProgressProps) {
return (
<PieProgress
progress={frac}
color={over ? theme.errorText : theme.noticeText}
color={over ? theme.errorText : theme.noticeTextLight}
backgroundColor={over ? theme.errorBackground : theme.pageBackground}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No change

style={{ width: 20, height: 20 }}
/>
Expand Down Expand Up @@ -132,7 +132,7 @@ function ExpenseProgress({ current, target }: ExpenseProgressProps) {
return (
<PieProgress
progress={frac}
color={over ? theme.errorText : theme.noticeText}
color={over ? theme.errorText : theme.noticeTextLight}
backgroundColor={over ? theme.errorBackground : theme.pageBackground}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No change

style={{ width: 20, height: 20 }}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default function ChangePassword() {
<Text
style={{
marginTop: 20,
color: theme.noticeText,
color: theme.noticeTextLight,
borderRadius: 4,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No change

fontSize: 15,
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,8 @@ export default function GoCardlessExternalMsg({
fontSize: 15,
fontWeight: 600,
marginTop: 10,
backgroundColor: theme.alt3NoticeText,
borderColor: theme.alt3NoticeText,
backgroundColor: theme.noticeBackgroundDark,
borderColor: theme.noticeBackgroundDark,
}}
onClick={onContinue}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ function ParsedDate({ parseDateFormat, showParsed, dateFormat, date }) {
)}{' '}
&rarr;{' '}
</Text>
<Text style={{ color: parsed ? theme.alt3NoticeText : theme.errorText }}>
<Text style={{ color: parsed ? theme.noticeTextLight : theme.errorText }}>
{parsed || 'Invalid'}
</Text>
</Text>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ export default function PlaidExternalMsg({
fontSize: 15,
fontWeight: 600,
marginTop: 10,
backgroundColor: theme.alt3NoticeText,
borderColor: theme.alt3NoticeText,
backgroundColor: theme.noticeBackgroundDark,
borderColor: theme.noticeBorder,
}}
onClick={onContinue}
>
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-client/src/components/payees/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function RuleButton({ ruleCount, focused, onEdit, onClick }) {
padding: '3px 6px',
backgroundColor: theme.noticeBackground,
border: '1px solid ' + theme.noticeBackground,
color: theme.altNoticeText,
color: theme.noticeTextDark,
fontSize: 12,
}}
onEdit={onEdit}
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-client/src/components/reports/Change.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function Change({ amount }) {
<Block
style={{
...styles.smallText,
color: amount < 0 ? theme.errorText : theme.noticeText,
color: amount < 0 ? theme.errorText : theme.noticeTextLight,
}}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No change

>
{amount >= 0 ? '+' : ''}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export function ScheduleAmountCell({
<Text
style={{
flex: 1,
color: num > 0 ? theme.noticeText : theme.tableText,
color: num > 0 ? theme.noticeTextLight : theme.tableText,
whiteSpace: 'nowrap',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No change

overflow: 'hidden',
textOverflow: 'ellipsis',
Expand Down
10 changes: 5 additions & 5 deletions packages/desktop-client/src/components/schedules/StatusBadge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ export function getStatusProps(status: StatusTypes) {
};
case 'paid':
return {
color: theme.alt2NoticeText,
backgroundColor: theme.altNoticeBackground,
color: theme.noticeText,
backgroundColor: theme.noticeBackgroundLight,
Icon: ValidationCheck,
};
case 'completed':
Expand All @@ -50,8 +50,8 @@ export function getStatusProps(status: StatusTypes) {
};
case 'pending':
return {
color: theme.alt3NoticeText,
backgroundColor: theme.alt2NoticeBackground,
color: theme.noticeTextLight,
backgroundColor: theme.noticeBackgroundLight,
Icon: CalendarIcon,
};
case 'scheduled':
Expand All @@ -62,7 +62,7 @@ export function getStatusProps(status: StatusTypes) {
};
case 'cleared':
return {
color: theme.noticeText,
color: theme.noticeTextLight,
backgroundColor: theme.altTableBackground,
Icon: CheckCircle1,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default function EncryptionSettings() {
primaryAction={<Button onClick={onChangeKey}>Generate new key</Button>}
>
<Text>
<Text style={{ color: theme.noticeText, fontWeight: 600 }}>
<Text style={{ color: theme.noticeTextLight, fontWeight: 600 }}>
End-to-end Encryption is turned on.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No change

</Text>{' '}
Your data is encrypted with a key that only you have before sending it
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function renderResults(results: Results) {
return (
<Paragraph
style={{
color: theme.alt3NoticeText,
color: theme.noticeTextLight,
marginBottom: 0,
marginLeft: '1em',
textAlign: 'right',
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-client/src/components/settings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function About() {
New version available: {latestVersion}
</ExternalLink>
) : (
<Text style={{ color: theme.alt2NoticeText, fontWeight: 600 }}>
<Text style={{ color: theme.noticeText, fontWeight: 600 }}>
You’re up to date!
</Text>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,9 @@ class Transaction extends PureComponent {
style={{
width: 11,
height: 11,
color: cleared ? theme.noticeText : theme.altButtonBareText,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No change

color: cleared
? theme.noticeTextLight
: theme.altButtonBareText,
marginRight: 5,
}}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ function StatusCell({

let statusColor =
status === 'cleared'
? theme.noticeText
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No change

? theme.noticeTextLight
: status === 'missed'
? theme.alt5ErrorText
: status === 'due'
Expand Down Expand Up @@ -1268,7 +1268,7 @@ const Transaction = memo(function Transaction(props) {
: integerToCurrency(runningBalance)
}
valueStyle={{
color: runningBalance < 0 ? theme.errorText : theme.noticeText,
color: runningBalance < 0 ? theme.errorText : theme.noticeTextLight,
}}
style={{ ...styles.tnum, ...amountStyle }}
width={88}
Expand Down
12 changes: 6 additions & 6 deletions packages/desktop-client/src/style/themes/dark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,13 @@ export const buttonBareDisabledText = buttonNormalDisabledText;
export const buttonBareDisabledBackground = buttonBareBackground;

export const noticeBackground = colorPalette.green800;
export const altNoticeBackground = noticeBackground;
export const alt2NoticeBackground = noticeBackground;
export const noticeBackgroundLight = noticeBackground;
export const noticeBackgroundDark = noticeBackground;
export const noticeText = colorPalette.green300;
export const altNoticeText = noticeText;
export const alt2NoticeText = noticeText;
export const alt3NoticeText = noticeText;
export const noticeAccent = colorPalette.green500;
export const noticeTextLight = noticeText;
export const noticeTextDark = noticeText;
export const noticeTextMenu = colorPalette.green500;
export const noticeBorder = colorPalette.green800;
export const warningBackground = colorPalette.orange800;
export const altWarningBackground = warningBackground;
export const warningText = colorPalette.orange200;
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 @@ -142,13 +142,13 @@ export const buttonBareDisabledText = buttonNormalDisabledText;
export const buttonBareDisabledBackground = buttonBareBackground;

export const noticeBackground = colorPalette.green800;
export const altNoticeBackground = noticeBackground;
export const alt2NoticeBackground = noticeBackground;
export const noticeBackgroundLight = noticeBackground;
export const noticeBackgroundDark = noticeBackground;
export const noticeText = colorPalette.green300;
export const altNoticeText = noticeText;
export const alt2NoticeText = noticeText;
export const alt3NoticeText = noticeText;
export const noticeAccent = colorPalette.green500;
export const noticeTextLight = noticeText;
export const noticeTextDark = noticeText;
export const noticeTextMenu = colorPalette.green500;
export const noticeBorder = colorPalette.green500;
export const warningBackground = colorPalette.orange800;
export const altWarningBackground = warningBackground;
export const warningText = colorPalette.orange200;
Expand Down
16 changes: 7 additions & 9 deletions packages/desktop-client/src/style/themes/light.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,15 +158,13 @@ export const buttonBareDisabledText = buttonNormalDisabledText;
export const buttonBareDisabledBackground = buttonBareBackground;

export const noticeBackground = colorPalette.green150;
export const altNoticeBackground = colorPalette.green100;
export const alt2NoticeBackground = colorPalette.green50;
export const noticeText = colorPalette.green500;
export const altNoticeText = colorPalette.green900;
export const alt2NoticeText = colorPalette.green800;
export const alt3NoticeText = colorPalette.green600;
export const alt4NoticeText = colorPalette.green700;
export const noticeAccent = colorPalette.green200;
export const altNoticeAccent = colorPalette.green500;
export const noticeBackgroundLight = colorPalette.green100;
export const noticeBackgroundDark = colorPalette.green500;
export const noticeText = colorPalette.green700;
export const noticeTextLight = colorPalette.green500;
export const noticeTextDark = colorPalette.green900;
export const noticeTextMenu = colorPalette.green200;
export const noticeBorder = colorPalette.green500;
export const warningBackground = colorPalette.orange200;
export const altWarningBackground = colorPalette.orange150;
export const alt2WarningBackground = colorPalette.orange100;
Expand Down
6 changes: 6 additions & 0 deletions upcoming-release-notes/1724.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
category: Enhancements
authors: [carkom]
---

Consolidate notice colors.