Skip to content

Commit

Permalink
Fix transaction list margins
Browse files Browse the repository at this point in the history
We use the `overflow: 'visible'` rule on this scene to achieve the right
margins without losing the ability for the SceneHeader to extend outside
of the margins as necessary.
  • Loading branch information
Jon-edge authored and samholmes committed Jan 29, 2024
1 parent 8b86424 commit 7b95ff5
Show file tree
Hide file tree
Showing 4 changed files with 179 additions and 133 deletions.
270 changes: 144 additions & 126 deletions src/__tests__/components/__snapshots__/TransactionListTop.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ exports[`TransactionListTop should render (with ENABLE_VISA_PROGRAM) 1`] = `
"borderRadius": 16,
},
{
"marginBottom": 22,
"marginBottom": 11,
"marginLeft": 11,
"marginRight": 11,
"marginTop": 11,
Expand Down Expand Up @@ -576,10 +576,10 @@ exports[`TransactionListTop should render (with ENABLE_VISA_PROGRAM) 1`] = `
"borderRadius": 16,
},
{
"marginBottom": -11,
"marginBottom": 11,
"marginLeft": 11,
"marginRight": 11,
"marginTop": 22,
"marginTop": 11,
},
{
"paddingBottom": 0,
Expand Down Expand Up @@ -699,83 +699,92 @@ exports[`TransactionListTop should render (with ENABLE_VISA_PROGRAM) 1`] = `
</View>,
<View
style={
[
{
"justifyContent": "center",
"marginHorizontal": 22,
"paddingBottom": 22,
},
null,
undefined,
]
{
"marginRight": -11,
"overflow": "visible",
}
}
>
<View
style={
[
{
"justifyContent": "center",
"marginHorizontal": 22,
"paddingBottom": 22,
},
null,
undefined,
]
}
>
<View
style={
{
"alignItems": "center",
"flexDirection": "row",
"justifyContent": "space-between",
}
}
/>
<Text
adjustsFontSizeToFit={true}
minimumFontScale={0.65}
numberOfLines={1}
style={
[
{
"color": "#FFFFFF",
"fontFamily": "Quicksand-Regular",
"fontSize": 22,
"includeFontPadding": false,
},
{
"fontFamily": "Quicksand-Medium",
},
null,
]
}
>
Transactions
</Text>
</View>
<BVLinearGradient
colors={
[
452984831,
452984831,
]
}
endPoint={
{
"alignItems": "center",
"flexDirection": "row",
"justifyContent": "space-between",
"x": 1,
"y": 0.5,
}
}
locations={null}
startPoint={
{
"x": 0,
"y": 0.5,
}
}
/>
<Text
adjustsFontSizeToFit={true}
minimumFontScale={0.65}
numberOfLines={1}
style={
[
{
"color": "#FFFFFF",
"fontFamily": "Quicksand-Regular",
"fontSize": 22,
"includeFontPadding": false,
"alignSelf": "stretch",
"height": 1,
},
{
"fontFamily": "Quicksand-Medium",
"marginBottom": 0,
"marginLeft": 22,
"marginRight": 0,
"marginTop": 0,
},
null,
]
}
>
Transactions
</Text>
/>
</View>,
<BVLinearGradient
colors={
[
452984831,
452984831,
]
}
endPoint={
{
"x": 1,
"y": 0.5,
}
}
locations={null}
startPoint={
{
"x": 0,
"y": 0.5,
}
}
style={
[
{
"alignSelf": "stretch",
"height": 1,
},
{
"marginBottom": 0,
"marginLeft": 22,
"marginRight": 0,
"marginTop": 0,
},
]
}
/>,
]
`;

Expand All @@ -789,7 +798,7 @@ exports[`TransactionListTop should render 1`] = `
"borderRadius": 16,
},
{
"marginBottom": 22,
"marginBottom": 11,
"marginLeft": 11,
"marginRight": 11,
"marginTop": 11,
Expand Down Expand Up @@ -1349,82 +1358,91 @@ exports[`TransactionListTop should render 1`] = `
</View>,
<View
style={
[
{
"justifyContent": "center",
"marginHorizontal": 22,
"paddingBottom": 22,
},
null,
undefined,
]
{
"marginRight": -11,
"overflow": "visible",
}
}
>
<View
style={
[
{
"justifyContent": "center",
"marginHorizontal": 22,
"paddingBottom": 22,
},
null,
undefined,
]
}
>
<View
style={
{
"alignItems": "center",
"flexDirection": "row",
"justifyContent": "space-between",
}
}
/>
<Text
adjustsFontSizeToFit={true}
minimumFontScale={0.65}
numberOfLines={1}
style={
[
{
"color": "#FFFFFF",
"fontFamily": "Quicksand-Regular",
"fontSize": 22,
"includeFontPadding": false,
},
{
"fontFamily": "Quicksand-Medium",
},
null,
]
}
>
Transactions
</Text>
</View>
<BVLinearGradient
colors={
[
452984831,
452984831,
]
}
endPoint={
{
"alignItems": "center",
"flexDirection": "row",
"justifyContent": "space-between",
"x": 1,
"y": 0.5,
}
}
locations={null}
startPoint={
{
"x": 0,
"y": 0.5,
}
}
/>
<Text
adjustsFontSizeToFit={true}
minimumFontScale={0.65}
numberOfLines={1}
style={
[
{
"color": "#FFFFFF",
"fontFamily": "Quicksand-Regular",
"fontSize": 22,
"includeFontPadding": false,
"alignSelf": "stretch",
"height": 1,
},
{
"fontFamily": "Quicksand-Medium",
"marginBottom": 0,
"marginLeft": 22,
"marginRight": 0,
"marginTop": 0,
},
null,
]
}
>
Transactions
</Text>
/>
</View>,
<BVLinearGradient
colors={
[
452984831,
452984831,
]
}
endPoint={
{
"x": 1,
"y": 0.5,
}
}
locations={null}
startPoint={
{
"x": 0,
"y": 0.5,
}
}
style={
[
{
"alignSelf": "stretch",
"height": 1,
},
{
"marginBottom": 0,
"marginLeft": 22,
"marginRight": 0,
"marginTop": 0,
},
]
}
/>,
]
`;
2 changes: 1 addition & 1 deletion src/components/cards/VisaCardCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const VisaCardCard = (props: Props) => {
return (
<>
{ioniaPluginIds.includes(pluginId) && tokenId == null && (
<CardUi4 paddingRem={0} marginRem={[1, 0.5, -0.5, 0.5]}>
<CardUi4 paddingRem={0}>
<TouchableOpacity onPress={handlePress} style={styles.container}>
<FastImage resizeMode="contain" source={{ uri: icon.symbolImage }} style={styles.icon} />
<EdgeText numberOfLines={0} style={styles.text}>
Expand Down
Loading

0 comments on commit 7b95ff5

Please sign in to comment.