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

fix(suite-native): revise and unify spacing of account-related screens #15234

Merged
merged 1 commit into from
Nov 6, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export const SearchableAccountsListScreenHeader = ({
exiting={FadeOut.duration(HEADER_ANIMATION_DURATION)}
>
<ScreenSubHeader
customHorizontalPadding="sp16"
content={title}
rightIcon={
<AddAccountButton
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export const AccountImportConfirmFormScreen = ({

const renderItem = useCallback(
({ item }: { item: TokenInfo }) => (
<Box marginBottom="sp8">
<Box marginBottom="sp12">
<TokenInfoCard
networkSymbol={networkSymbol}
symbol={item.symbol as TokenSymbol}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export const AccountDetailScreenHeader = ({

return (
<ScreenSubHeader
customHorizontalPadding="sp16"
content={accountLabel}
rightIcon={
<IconButton
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const cardStyle = prepareNativeStyle(utils => ({
flexDirection: 'row',
justifyContent: 'space-between',
alignItem: 'center',
marginHorizontal: utils.spacings.sp16,
padding: utils.spacings.sp16,
backgroundColor: utils.colors.backgroundSurfaceElevation1,
borderRadius: utils.borders.radii.r16,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const IncludeTokensToggle = ({

return (
<VStack spacing="sp24" marginTop="sp8">
<Box marginHorizontal="sp24">
<Box marginHorizontal="sp16">
<Toggle
leftLabel={networkName}
rightLabel={<Translation id="transactions.tokens.toggleTokens" />}
Expand All @@ -29,7 +29,7 @@ export const IncludeTokensToggle = ({
</Box>
{isToggled && (
<Animated.View entering={FadeIn}>
<Box marginHorizontal="sp8">
<Box marginHorizontal="sp16">
<AlertBox
variant="info"
title={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,10 @@ export const AccountSettingsScreen = ({

return (
<Screen
customHorizontalPadding="sp16"
screenHeader={
<ScreenSubHeader
customHorizontalPadding="sp16"
content={accountLabel}
rightIcon={<AccountRenameButton accountKey={accountKey} />}
/>
Expand All @@ -87,7 +89,7 @@ export const AccountSettingsScreen = ({
)}
</VStack>
</Card>
<VStack marginHorizontal="sp16" spacing="sp16">
<VStack spacing="sp16">
<AccountSettingsShowXpubButton accountKey={account.key} />
{isPortfolioTrackerDevice && (
<AccountSettingsRemoveCoinButton accountKey={account.key} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export const AccountsScreen = () => {

return (
<Screen
customHorizontalPadding="sp16"
screenHeader={<DeviceManagerScreenHeader />}
subheader={
<SearchableAccountsListScreenHeader
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ export const PortfolioContent = forwardRef<PortfolioGraphRef>((_props, ref) => {
return (
<VStack spacing="sp24" marginTop="sp8">
<PortfolioGraph ref={ref} />
<VStack spacing="sp24" marginHorizontal="sp8">
<VStack spacing="sp24" marginHorizontal="sp16">
<Box>
<Assets />
</Box>
{isPortfolioTrackerDevice && (
<Box>
<Box marginBottom="sp8">
<Button
testID="@home/portfolio/sync-coins-button"
colorScheme="tertiaryElevation0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export const ReceiveAccountsScreen = () => {

return (
<Screen
customHorizontalPadding="sp16"
screenHeader={<DeviceManagerScreenHeader />}
subheader={
<SearchableAccountsListScreenHeader
Expand Down
2 changes: 1 addition & 1 deletion suite-native/receive/src/components/ReceiveAccount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const ReceiveAccount = ({ accountKey, tokenContract }: AccountReceiveProp

return (
<Box flex={1}>
<VStack spacing="sp12">
<VStack spacing="sp16">
{isAccountDetailVisible && (
<ReceiveAccountDetailsCard
accountKey={accountKey}
Expand Down
2 changes: 2 additions & 0 deletions suite-native/receive/src/screens/ReceiveModalScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ const ReceiveModalScreenSubHeader = ({ accountKey, tokenContract }: ScreenSubHea

return (
<ScreenSubHeader
customHorizontalPadding="sp16"
content={
<>
<Text variant="highlight">
Expand Down Expand Up @@ -152,6 +153,7 @@ export const ReceiveModalScreen = () => {

return (
<Screen
customHorizontalPadding="sp16"
hasBottomInset={false}
screenHeader={
<ReceiveModalScreenSubHeader
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const wrapperStyle = prepareNativeStyle(() => ({
const cardStyle = prepareNativeStyle(utils => ({
alignItems: 'center',
flex: 1,
width: '100%',
marginHorizontal: utils.spacings.sp16,
paddingHorizontal: utils.spacings.sp24,
paddingVertical: utils.spacings.sp32,
borderRadius: utils.borders.radii.r20,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,6 @@ type TransactionListItem =
| (TypedTokenTransferWithTx | MonthKey)
| (WalletAccountTransaction | MonthKey);

const sectionListStyle = prepareNativeStyle(utils => ({
paddingHorizontal: utils.spacings.sp8,
flex: 1,
}));

const sectionListContainerStyle = prepareNativeStyle(utils => ({
paddingVertical: utils.spacings.sp8,
}));
Expand Down Expand Up @@ -277,7 +272,7 @@ export const TransactionList = ({
);

return (
<Box style={applyStyle(sectionListStyle)}>
<Box flex={1}>
<FlashList<TransactionListItem>
data={data}
renderItem={renderItem}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const transactionListItemContainerStyle = prepareNativeStyle<TransactionL
alignItems: 'center',
justifyContent: 'space-between',
backgroundColor: utils.colors.backgroundSurfaceElevation1,
marginHorizontal: utils.spacings.sp8,
marginHorizontal: utils.spacings.sp16,
paddingHorizontal: utils.spacings.sp16,
paddingTop: utils.spacings.sp12,
paddingBottom: utils.spacings.sp12,
Expand Down
Loading