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

Network Switcher Implementations #6466

Open
wants to merge 16 commits into
base: develop
Choose a base branch
from
Open

Conversation

walmat
Copy link
Contributor

@walmat walmat commented Feb 24, 2025

Fixes APP-2341, APP-2342, APP-2343, APP-2344, APP-2345, APP-2346

What changed (plus any additional context for devs)

With our growing list of networks, we need to enable scrolling on the network switcher to prevent the sheet from overflowing off the top of the screen.

Swaps now will utilize the new NetworkSwitcher route to change output / input token lists. The token to sell list is filtered down show networks that the user has tokens on. Output is sorted by balance. This is the same functionality as we had before in the dropdown menus.

Adds a variant of NetworkSwitcher to the WalletConnectApprovalSheet. We needed to add the following functionality (or rather remove?)

  • the ability to select a network
  • we don't want to show which network was selected because technically it's all the networks
  • We also want to fill the amount of space in the pinnedNetworks section as possible
  • Due to the adjustment of the pinned networks, we needed to also not persist those pinned networks on sheet close

Added NetworkSelectorButton component to provide a reusable way to launch into a NetworkSelector route. I also cleaned up a little bit of the file system by moving the NetworkSelector to the screens folder since it's a route.

Biggest most notable change which is what the ticket is for, is introducing actionButton prop into the NetworkSelector route. It provides overrides to turn the All Networks masthead button into a configurable action button as shown in the below screen recording.

Adds the Network Selector component to the preferred network selection.

Claimables customization network selector now uses the new network selector.

Screen recordings / screenshots

See individual PRs:

#6454
#6455
#6456
#6457
#6458
#6459

What to test

All locations should behave as expected

@walmat walmat changed the title [QA] - Network Switcher QA PR Network Switcher Implementations Feb 25, 2025
Copy link
Contributor

@ibrahimtaveras00 ibrahimtaveras00 left a comment

Choose a reason for hiding this comment

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

Looks good on both OS's, QA passed 👍🏽

@walmat walmat marked this pull request as ready for review February 26, 2025 02:28
@brunobar79
Copy link
Member

Launch in simulator or device for 6659af6

@brunobar79 brunobar79 added the release for release blockers and release candidate branches label Feb 28, 2025
Copy link
Contributor

@maxbbb maxbbb left a comment

Choose a reason for hiding this comment

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

Great stuff, huge UX improvement. Only one small thing that's definitely not blocking is there should be some padding in the expanded state at the bottom so that the last line of networks clear the gradient when scrolled to the very bottom. Also insetting the scroll indicators by the same amount.

IMG_8847

@brunobar79
Copy link
Member

Launch in simulator or device for 1818a0e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release for release blockers and release candidate branches
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants