Skip to content
Snippets Groups Projects
Unverified Commit 3ec4ef71 authored by Joel Jeremy Marquez's avatar Joel Jeremy Marquez Committed by GitHub
Browse files

[Mobile] Update mobile labels to be sentence case + add labels to mobile...

[Mobile] Update mobile labels to be sentence case + add labels to mobile budget and balance modals (#2627)

* Mobile UI updates

* Release notes

* VRT updates

* Midnight VRT
parent 5df02c19
No related branches found
No related tags found
No related merge requests found
Showing
with 66 additions and 32 deletions
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
...@@ -16,7 +16,7 @@ export function Label({ title, style }: LabelProps) { ...@@ -16,7 +16,7 @@ export function Label({ title, style }: LabelProps) {
...styles.text, ...styles.text,
color: theme.tableRowHeaderText, color: theme.tableRowHeaderText,
textAlign: 'right', textAlign: 'right',
fontSize: 12, fontSize: 14,
marginBottom: 2, marginBottom: 2,
...style, ...style,
}} }}
......
...@@ -156,9 +156,9 @@ export const Modal = ({ ...@@ -156,9 +156,9 @@ export const Modal = ({
style={{ style={{
justifyContent: 'center', justifyContent: 'center',
alignItems: 'center', alignItems: 'center',
padding: 20, padding: '0 20px',
position: 'relative', position: 'relative',
height: 80, height: 70,
}} }}
> >
<View <View
......
...@@ -24,10 +24,9 @@ export function FieldLabel({ title, flush, style }: FieldLabelProps) { ...@@ -24,10 +24,9 @@ export function FieldLabel({ title, flush, style }: FieldLabelProps) {
style={{ style={{
marginBottom: 5, marginBottom: 5,
marginTop: flush ? 0 : 25, marginTop: flush ? 0 : 25,
fontSize: 13, fontSize: 14,
color: theme.tableRowHeaderText, color: theme.tableRowHeaderText,
padding: `0 ${styles.mobileEditingPadding}px`, padding: `0 ${styles.mobileEditingPadding}px`,
textTransform: 'uppercase',
userSelect: 'none', userSelect: 'none',
...style, ...style,
}} }}
......
...@@ -37,8 +37,7 @@ function AccountHeader({ name, amount, style = {} }) { ...@@ -37,8 +37,7 @@ function AccountHeader({ name, amount, style = {} }) {
<Text <Text
style={{ style={{
...styles.text, ...styles.text,
textTransform: 'uppercase', fontSize: 14,
fontSize: 13,
}} }}
data-testid="name" data-testid="name"
> >
...@@ -47,7 +46,7 @@ function AccountHeader({ name, amount, style = {} }) { ...@@ -47,7 +46,7 @@ function AccountHeader({ name, amount, style = {} }) {
</View> </View>
<CellValue <CellValue
binding={amount} binding={amount}
style={{ ...styles.text, fontSize: 13 }} style={{ ...styles.text, fontSize: 14 }}
type="financial" type="financial"
/> />
</View> </View>
...@@ -220,7 +219,7 @@ function AccountList({ ...@@ -220,7 +219,7 @@ function AccountList({
{offbudgetAccounts.length > 0 && ( {offbudgetAccounts.length > 0 && (
<AccountHeader <AccountHeader
name="Off budget" name="Off Budget"
amount={getOffBudgetBalance()} amount={getOffBudgetBalance()}
style={{ marginTop: 30 }} style={{ marginTop: 30 }}
/> />
......
...@@ -43,7 +43,7 @@ function ToBudget({ toBudget, onClick }) { ...@@ -43,7 +43,7 @@ function ToBudget({ toBudget, onClick }) {
onClick={onClick} onClick={onClick}
> >
<Label <Label
title={amount < 0 ? 'OVERBUDGETED' : 'TO BUDGET'} title={amount < 0 ? 'Overbudgeted' : 'To Budget'}
style={{ style={{
...styles.underlinedText, ...styles.underlinedText,
color: theme.formInputText, color: theme.formInputText,
...@@ -82,18 +82,32 @@ function Saved({ projected, onClick }) { ...@@ -82,18 +82,32 @@ function Saved({ projected, onClick }) {
onClick={onClick} onClick={onClick}
> >
{projected ? ( {projected ? (
<Label <>
title="PROJECTED SAVINGS" <Label
style={{ title="Projected"
...styles.underlinedText, style={{
color: theme.formInputText, ...styles.underlinedText,
textAlign: 'left', color: theme.formInputText,
fontSize: 9, textAlign: 'left',
}} letterSpacing: 2,
/> fontSize: 8,
marginBottom: 0,
}}
/>
<Label
title="Savings"
style={{
...styles.underlinedText,
color: theme.formInputText,
textAlign: 'left',
letterSpacing: 2,
fontSize: 8,
}}
/>
</>
) : ( ) : (
<Label <Label
title={isNegative ? 'OVERSPENT' : 'SAVED'} title={isNegative ? 'Overspent' : 'Saved'}
style={{ style={{
...styles.underlinedText, ...styles.underlinedText,
color: theme.formInputText, color: theme.formInputText,
...@@ -267,7 +281,7 @@ const ExpenseCategory = memo(function ExpenseCategory({ ...@@ -267,7 +281,7 @@ const ExpenseCategory = memo(function ExpenseCategory({
const onTransfer = () => { const onTransfer = () => {
dispatch( dispatch(
pushModal('transfer', { pushModal('transfer', {
title: `Transfer: ${category.name}`, title: category.name,
month, month,
amount: catBalance, amount: catBalance,
onSubmit: (amount, toCategoryId) => { onSubmit: (amount, toCategoryId) => {
...@@ -993,8 +1007,8 @@ function IncomeGroup({ ...@@ -993,8 +1007,8 @@ function IncomeGroup({
marginRight: 14, marginRight: 14,
}} }}
> >
{type === 'report' && <Label title="BUDGETED" style={{ width: 90 }} />} {type === 'report' && <Label title="Budgeted" style={{ width: 90 }} />}
<Label title="RECEIVED" style={{ width: 90 }} /> <Label title="Received" style={{ width: 90 }} />
</View> </View>
<Card style={{ marginTop: 0 }}> <Card style={{ marginTop: 0 }}>
...@@ -1270,7 +1284,7 @@ export function BudgetTable({ ...@@ -1270,7 +1284,7 @@ export function BudgetTable({
}} }}
> >
<Label <Label
title="BUDGETED" title="Budgeted"
style={{ color: theme.buttonNormalText }} style={{ color: theme.buttonNormalText }}
/> />
<CellValue <CellValue
...@@ -1313,7 +1327,7 @@ export function BudgetTable({ ...@@ -1313,7 +1327,7 @@ export function BudgetTable({
alignItems: 'flex-end', alignItems: 'flex-end',
}} }}
> >
<Label title="SPENT" style={{ color: theme.formInputText }} /> <Label title="Spent" style={{ color: theme.formInputText }} />
<CellValue <CellValue
binding={ binding={
type === 'report' type === 'report'
...@@ -1338,7 +1352,7 @@ export function BudgetTable({ ...@@ -1338,7 +1352,7 @@ export function BudgetTable({
alignItems: 'flex-end', alignItems: 'flex-end',
}} }}
> >
<Label title="BALANCE" style={{ color: theme.formInputText }} /> <Label title="Balance" style={{ color: theme.formInputText }} />
<CellValue <CellValue
binding={ binding={
type === 'report' type === 'report'
......
...@@ -95,7 +95,7 @@ export function TransactionListWithBalances({ ...@@ -95,7 +95,7 @@ export function TransactionListWithBalances({
}} }}
> >
<Label <Label
title="CLEARED" title="Cleared"
style={{ textAlign: 'center', fontSize: 12 }} style={{ textAlign: 'center', fontSize: 12 }}
/> />
<CellValue <CellValue
...@@ -110,7 +110,7 @@ export function TransactionListWithBalances({ ...@@ -110,7 +110,7 @@ export function TransactionListWithBalances({
/> />
</View> </View>
<View style={{ flexBasis: '33%' }}> <View style={{ flexBasis: '33%' }}>
<Label title="BALANCE" style={{ textAlign: 'center' }} /> <Label title="Balance" style={{ textAlign: 'center' }} />
<CellValue <CellValue
binding={balance} binding={balance}
type="financial" type="financial"
...@@ -132,7 +132,7 @@ export function TransactionListWithBalances({ ...@@ -132,7 +132,7 @@ export function TransactionListWithBalances({
}} }}
> >
<Label <Label
title="UNCLEARED" title="Uncleared"
style={{ textAlign: 'center', fontSize: 12 }} style={{ textAlign: 'center', fontSize: 12 }}
/> />
<CellValue <CellValue
......
...@@ -75,7 +75,7 @@ export function CoverModal({ ...@@ -75,7 +75,7 @@ export function CoverModal({
return ( return (
<Modal <Modal
title={`Cover: ${category.name}`} title={category.name}
showHeader showHeader
focusAfterClose={false} focusAfterClose={false}
{...modalProps} {...modalProps}
......
...@@ -7,6 +7,7 @@ import { type CSSProperties, theme, styles } from '../../style'; ...@@ -7,6 +7,7 @@ import { type CSSProperties, theme, styles } from '../../style';
import { BalanceWithCarryover } from '../budget/BalanceWithCarryover'; import { BalanceWithCarryover } from '../budget/BalanceWithCarryover';
import { BalanceMenu } from '../budget/report/BalanceMenu'; import { BalanceMenu } from '../budget/report/BalanceMenu';
import { Modal } from '../common/Modal'; import { Modal } from '../common/Modal';
import { Text } from '../common/Text';
import { View } from '../common/View'; import { View } from '../common/View';
import { type CommonModalProps } from '../Modals'; import { type CommonModalProps } from '../Modals';
...@@ -36,7 +37,7 @@ export function ReportBalanceMenuModal({ ...@@ -36,7 +37,7 @@ export function ReportBalanceMenuModal({
return ( return (
<Modal <Modal
title={`Balance: ${category.name}`} title={category.name}
showHeader showHeader
focusAfterClose={false} focusAfterClose={false}
{...modalProps} {...modalProps}
...@@ -55,6 +56,14 @@ export function ReportBalanceMenuModal({ ...@@ -55,6 +56,14 @@ export function ReportBalanceMenuModal({
marginBottom: 20, marginBottom: 20,
}} }}
> >
<Text
style={{
fontSize: 17,
fontWeight: 400,
}}
>
Balance
</Text>
<BalanceWithCarryover <BalanceWithCarryover
disabled disabled
balanceStyle={{ balanceStyle={{
......
...@@ -11,6 +11,7 @@ import { useCategory } from '../../hooks/useCategory'; ...@@ -11,6 +11,7 @@ import { useCategory } from '../../hooks/useCategory';
import { type CSSProperties, theme, styles } from '../../style'; import { type CSSProperties, theme, styles } from '../../style';
import { BudgetMenu } from '../budget/report/BudgetMenu'; import { BudgetMenu } from '../budget/report/BudgetMenu';
import { Modal } from '../common/Modal'; import { Modal } from '../common/Modal';
import { Text } from '../common/Text';
import { View } from '../common/View'; import { View } from '../common/View';
import { FocusableAmountInput } from '../mobile/transactions/FocusableAmountInput'; import { FocusableAmountInput } from '../mobile/transactions/FocusableAmountInput';
import { type CommonModalProps } from '../Modals'; import { type CommonModalProps } from '../Modals';
...@@ -51,9 +52,13 @@ export function ReportBudgetMenuModal({ ...@@ -51,9 +52,13 @@ export function ReportBudgetMenuModal({
setAmountFocused(true); setAmountFocused(true);
}, []); }, []);
if (!category) {
return null;
}
return ( return (
<Modal <Modal
title={`Budget: ${category?.name}`} title={category.name}
showHeader showHeader
focusAfterClose={false} focusAfterClose={false}
{...modalProps} {...modalProps}
...@@ -72,6 +77,14 @@ export function ReportBudgetMenuModal({ ...@@ -72,6 +77,14 @@ export function ReportBudgetMenuModal({
marginBottom: 20, marginBottom: 20,
}} }}
> >
<Text
style={{
fontSize: 17,
fontWeight: 400,
}}
>
Budget
</Text>
<FocusableAmountInput <FocusableAmountInput
value={integerToAmount(budgeted || 0)} value={integerToAmount(budgeted || 0)}
focused={amountFocused} focused={amountFocused}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment