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(ui): fix home screen rerender causing navigation lag #2492

Merged
merged 1 commit into from
Feb 28, 2025

Conversation

pwltr
Copy link
Collaborator

@pwltr pwltr commented Feb 25, 2025

Description

Fixes a rerender on the home screen caused by smelly onFocus code. This moves the timed/conditional bottom sheets into the home screen and extends the check in the <TabBar /> so it hides properly. This significantly improves navigation responsiveness especially on Android. Also renames Wallets/index.ts to Home.tsx.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactoring (improving code without creating new functionality)

Tests

  • Detox test
  • Unit test
  • No test

@pwltr pwltr requested review from coreyphillips and removed request for coreyphillips February 25, 2025 14:03
@pwltr pwltr force-pushed the perf/home-rerender branch 2 times, most recently from 485eeba to 6435c27 Compare February 26, 2025 14:54
@pwltr pwltr requested a review from coreyphillips February 26, 2025 15:04
@pwltr pwltr force-pushed the perf/home-rerender branch from 6435c27 to 802a1f6 Compare February 27, 2025 10:25
Copy link
Collaborator

@coreyphillips coreyphillips left a comment

Choose a reason for hiding this comment

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

Tapping "Receive" and quickly closing the modal results in the TabBar disappearing.

Simulator.Screen.Recording.-.iPhone.16.-.2025-02-27.at.18.49.45.mp4

@pwltr pwltr force-pushed the perf/home-rerender branch from 802a1f6 to 45b4546 Compare February 28, 2025 10:15
@pwltr
Copy link
Collaborator Author

pwltr commented Feb 28, 2025

Tapping "Receive" and quickly closing the modal results in the TabBar disappearing.

Simulator.Screen.Recording.-.iPhone.16.-.2025-02-27.at.18.49.45.mp4

This is an issue with the bottom-sheet and not caused by the changes here, although it does make it more likely to occur. I have a refactor coming for the sheets that will make it more reliable and will also solve this issue by not having to hide the TabBar at all. There are several long-standing issues with the bottom-sheet so it's a bit difficult to not break something by fixing another.

I updated the code to change when it hides the TabBar to at least fix this for send/receive sheets but it will still occur when you do the same with any one of the sheets in shouldHide. Intention is to get these fixes in for the upcoming release.

@pwltr pwltr requested a review from coreyphillips February 28, 2025 10:22
@pwltr pwltr merged commit cbaa788 into master Feb 28, 2025
7 checks passed
@pwltr pwltr deleted the perf/home-rerender branch February 28, 2025 13:08
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