From 5c36e8bcd80de8ab7e4c9cdc4e8f27eab7995be0 Mon Sep 17 00:00:00 2001 From: Jon Tzeng Date: Thu, 11 Jan 2024 17:59:43 -0800 Subject: [PATCH 1/3] Remove chevron from HomeCardUi4 It's already obvious they're tappable and the UI looks busy with sharp contrasting chevrons --- src/components/ui4/HomeCardUi4.tsx | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/src/components/ui4/HomeCardUi4.tsx b/src/components/ui4/HomeCardUi4.tsx index ebad0cea57a..7416720e24e 100644 --- a/src/components/ui4/HomeCardUi4.tsx +++ b/src/components/ui4/HomeCardUi4.tsx @@ -1,7 +1,6 @@ import * as React from 'react' import { View } from 'react-native' import { LinearGradientProps } from 'react-native-linear-gradient' -import IonIcon from 'react-native-vector-icons/Ionicons' import { useHandler } from '../../hooks/useHandler' import { cacheStyles, Theme, useTheme } from '../services/ThemeContext' @@ -32,10 +31,7 @@ export const HomeCardUi4 = (props: Props) => { return ( - - {title} - - + {title} {footer} @@ -45,11 +41,6 @@ export const HomeCardUi4 = (props: Props) => { } const getStyles = cacheStyles((theme: Theme) => ({ - titleContainer: { - flexDirection: 'row', - justifyContent: 'space-between', - alignItems: 'stretch' - }, footerText: { fontSize: theme.rem(0.75) }, @@ -57,11 +48,5 @@ const getStyles = cacheStyles((theme: Theme) => ({ flex: 1, // Make sure the card fills the space justifyContent: 'space-between', // Aligns title to the top, footer to the bottom margin: theme.rem(0.5) - }, - - // Adjust for bounding box - chevronIcon: { - alignSelf: 'center', - marginRight: -6 } })) From 9b907ed4a0cee97327a435d5a214cfc256f1ab6f Mon Sep 17 00:00:00 2001 From: Jon Tzeng Date: Fri, 12 Jan 2024 15:38:56 -0800 Subject: [PATCH 2/3] Update exchange scene wallet text to 1rem Unable to utilize row or card's built-in icon and text handling for some reason in this case. Quick fix instead. --- src/components/scenes/CryptoExchangeScene.tsx | 2 +- .../themed/CryptoExchangeFlipInputWrapperComponent.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/scenes/CryptoExchangeScene.tsx b/src/components/scenes/CryptoExchangeScene.tsx index 6c6617216e7..67a9873fe46 100644 --- a/src/components/scenes/CryptoExchangeScene.tsx +++ b/src/components/scenes/CryptoExchangeScene.tsx @@ -426,7 +426,7 @@ export const CryptoExchangeScene = (props: OwnProps) => { }) return ( - + {({ insetStyles }) => ( ({ }, text: { fontFamily: theme.fontFaceMedium, - fontSize: theme.rem(1.25), + fontSize: theme.rem(1), marginLeft: theme.rem(0.5) }, topRow: { From c010e56a98deebaec77fddf29bbcf315bab0385f Mon Sep 17 00:00:00 2001 From: Jon Tzeng Date: Thu, 11 Jan 2024 18:39:08 -0800 Subject: [PATCH 3/3] Wrap existing TransactionListTop in a card --- .../TransactionListTop.test.tsx.snap | 1518 ++++++++--------- src/components/themed/TransactionListTop.tsx | 98 +- 2 files changed, 722 insertions(+), 894 deletions(-) diff --git a/src/__tests__/components/__snapshots__/TransactionListTop.test.tsx.snap b/src/__tests__/components/__snapshots__/TransactionListTop.test.tsx.snap index 77d9dcfa9cc..677dbbd1179 100644 --- a/src/__tests__/components/__snapshots__/TransactionListTop.test.tsx.snap +++ b/src/__tests__/components/__snapshots__/TransactionListTop.test.tsx.snap @@ -4,356 +4,238 @@ exports[`TransactionListTop should render (with ENABLE_VISA_PROGRAM) 1`] = ` [ + + + + + + - - - - - - - - - + } + /> - - wallet name - - -  - - - - -  - - - - 0.00123123 BTC + wallet name - $0.00 USD +  + + + 0.00123123 BTC + + + $0.00 USD + + - -  - - -  - + , + - + - + - - - - - Buy Prepaid Visa® Cards - + /> + + Buy Prepaid Visa® Cards + , + + - + + + + + - - - - - - - - - + } + /> - - wallet name - - -  - - - - -  - - - - 0.00123123 BTC + wallet name - $0.00 USD +  + + + 0.00123123 BTC + + + $0.00 USD + + - -  - - -  - + <> @@ -208,9 +207,6 @@ export class TransactionListTopComponent extends React.PureComponent - - - {isAccountBalanceVisible ? ( @@ -228,7 +224,7 @@ export class TransactionListTopComponent extends React.PureComponent )} - + ) } @@ -375,40 +371,35 @@ export class TransactionListTopComponent extends React.PureComponent - - {searching ? null : ( - <> - {this.renderBalanceBox()} - {isStakingAvailable && this.renderStakedBalance()} - - - - - {lstrings.fragment_request_subtitle} - - - - - - {lstrings.fragment_send_subtitle} - - - {!isStakePoliciesLoaded ? ( - - ) : ( - isStakingAvailable && ( - - - {lstrings.stake_earn_button_label} - {bestApy != null ? {bestApy} : null} - - ) - )} - - - )} - {isEmpty || searching ? null : } - + {searching ? null : ( + + {this.renderBalanceBox()} + {isStakingAvailable && this.renderStakedBalance()} + + + + {lstrings.fragment_request_subtitle} + + + + + {lstrings.fragment_send_subtitle} + + + {!isStakePoliciesLoaded ? ( + + ) : ( + isStakingAvailable && ( + + {lstrings.stake_earn_button_label} + {bestApy != null ? {bestApy} : null} + + ) + )} + + + )} + {isEmpty || searching ? null : } {isEmpty || searching ? null : ( {lstrings.fragment_transaction_list_transaction} @@ -420,20 +411,14 @@ export class TransactionListTopComponent extends React.PureComponent ({ - container: { - flex: 1, - paddingHorizontal: theme.rem(1), - paddingBottom: theme.rem(1), - marginBottom: theme.rem(0.5) - }, - // Balance Box balanceBoxContainer: { marginTop: theme.rem(1.5) }, balanceBoxWalletNameCurrencyContainer: { flexDirection: 'row', - justifyContent: 'space-between' + justifyContent: 'space-between', + marginBottom: theme.rem(0.5) }, balanceBoxWalletNameContainer: { flexShrink: 1, @@ -458,25 +443,26 @@ const getStyles = cacheStyles((theme: Theme) => ({ fontSize: theme.rem(2) }, settingsIcon: { - alignSelf: 'center' + alignSelf: 'flex-end' }, // Send/Receive Buttons buttonsContainer: { + flex: 1, marginTop: theme.rem(1), - flexDirection: 'row' + marginHorizontal: -theme.rem(1), + flexDirection: 'row', + justifyContent: 'space-evenly' }, buttons: { flexShrink: 1, flexDirection: 'row', - justifyContent: 'flex-start', - alignItems: 'center', - paddingRight: theme.rem(1.5) + justifyContent: 'center', + alignItems: 'center' }, buttonsText: { fontSize: theme.rem(1), color: theme.textLink, - fontFamily: theme.fontFaceMedium, - marginLeft: theme.rem(0.25) + fontFamily: theme.fontFaceMedium }, apyText: { fontSize: theme.rem(0.75),