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 margins and insets on Home scene #4755

Merged
merged 7 commits into from
Jan 29, 2024
Merged

Conversation

samholmes
Copy link
Contributor

@samholmes samholmes commented Jan 24, 2024

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Requirements

If you have made any visual changes to the GUI. Make sure you have:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)

@samholmes samholmes force-pushed the sam/home-scene-margins branch from 19e12f1 to b789f98 Compare January 24, 2024 01:52
@Jon-edge
Copy link
Collaborator

Broken on Android

@samholmes samholmes force-pushed the sam/home-scene-margins branch 2 times, most recently from 147f2d5 to b87f4da Compare January 25, 2024 01:24
Copy link
Collaborator

@Jon-edge Jon-edge left a comment

Choose a reason for hiding this comment

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

Wallet list margins didn't work for both platforms. Also I updated the task to include tx list scene since it also used the undoInsets

@samholmes samholmes force-pushed the sam/home-scene-margins branch 2 times, most recently from f879682 to 3ffdc75 Compare January 26, 2024 20:05
@Jon-edge Jon-edge force-pushed the sam/home-scene-margins branch from 3ffdc75 to 3d50694 Compare January 26, 2024 23:50
onScroll={handleScroll}
/>
</View>
{({ insetStyle }) => (
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This change would break the "underflow" of the scroll for this scene. Did you test to see if the tx list scene appears underneath tabs and header?

@@ -189,7 +189,7 @@ export function TransactionListRow(props: Props) {
})

return (
<CardUi4 icon={icon} onPress={handlePress} onLongPress={handleLongPress}>
<CardUi4 icon={icon} onPress={handlePress} onLongPress={handleLongPress} marginRem={[0.5, 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.

I thought we wanted .5 rem around all components and then a 0.5 padding around the outer-most container component on a scene?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, ideally, but we're hacking around the fact that SceneHeader was never updated to follow these rules.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can you clarify what you mean when you refer to the SceneHeader component?

src/components/themed/WalletListHeader.tsx Show resolved Hide resolved
src/components/themed/TransactionListRow.tsx Show resolved Hide resolved
@Jon-edge Jon-edge force-pushed the sam/home-scene-margins branch from 1d8a933 to d7ad861 Compare January 27, 2024 00:36
@samholmes samholmes force-pushed the sam/home-scene-margins branch 2 times, most recently from a53c674 to 7b95ff5 Compare January 29, 2024 21:49
samholmes and others added 7 commits January 29, 2024 13:49
It looks like the SceneWrapper is incorrectly applying padding to scenes
with tabs, but rather than fixing the SceneWrapper which is high-risk,
just apply the padding manually.
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.
@samholmes samholmes force-pushed the sam/home-scene-margins branch from 7b95ff5 to dcf83db Compare January 29, 2024 21:49
@samholmes samholmes enabled auto-merge January 29, 2024 21:49
@samholmes samholmes merged commit c396fc4 into develop Jan 29, 2024
2 checks passed
@samholmes samholmes deleted the sam/home-scene-margins branch January 29, 2024 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants