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

feat: Token Network Filter UI [Mobile] #11808

Open
wants to merge 134 commits into
base: main
Choose a base branch
from

Conversation

gambinish
Copy link
Contributor

@gambinish gambinish commented Oct 16, 2024

Description

This PR introduces token network filter UI component. It lives behind a feature flag PORTFOLIO_VIEW in order to allow this to get merged while backend changes are in flight.

Integration with the multichain asset list will occur in a separate PR. We'll likely want to add additional e2e tests when that happens.

Running this branch

yarn && yarn setup
PORTFOLIO_VIEW=1 yarn watch
yarn start:ios or i from the watch process

Please ensure that this PR looks okay both with and without the feature flag running. I have introduced a horizontal scroll view because there simply was not enough screen real estate to make the network filter look okay with truncated text.

Related issues

Fixes:

Manual testing steps

  1. Run app with feature flag
  2. Go to main Portfolio view
  3. Pressing the network filter should trigger the bottom sheet, allowing the user to select different filter options.

Screenshots/Recordings

Screen.Recording.2024-10-29.at.1.25.18.PM.mov

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

gambinish and others added 30 commits September 26, 2024 17:09
…/metamask-mobile into chore/componetize-tokens-screen
@gambinish gambinish added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Nov 5, 2024
Copy link
Contributor

github-actions bot commented Nov 5, 2024

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: fcafb86
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/d35072c8-ac90-4022-8604-14b6dc87cccc

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

@gambinish gambinish added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Nov 5, 2024
@gambinish gambinish added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Nov 6, 2024
Copy link
Contributor

github-actions bot commented Nov 6, 2024

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: de35586
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/ac4e1252-61c1-4a0d-b737-9040c6f1f4c6

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

@gambinish gambinish added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Nov 6, 2024
brianacnguyen
brianacnguyen previously approved these changes Nov 6, 2024
@gambinish
Copy link
Contributor Author

Just leaving a comment per @Cal-L suggestion. The failing Bitrise workflow is related to some flaky Android tests that are currently being investigated. They are unrelated to this PR and it can be reviewed.

@gambinish gambinish added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Nov 7, 2024
Copy link
Contributor

github-actions bot commented Nov 7, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 915549e
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/04d94db9-7af7-456d-8d9d-2300891aa494

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Copy link
Contributor

@Cal-L Cal-L left a comment

Choose a reason for hiding this comment

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

Left some comments. Let's also remove the empty horizontal gutter from the pills.

app/components/UI/Tokens/index.tsx Outdated Show resolved Hide resolved
},
controlButtonText: {
color: colors.text.default,
...fontStyles.normal,
Copy link
Contributor

Choose a reason for hiding this comment

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

Use font from theme instead

useTokenDetection: { persist: true, anonymous: true },
smartTransactionsOptInStatus: { persist: true, anonymous: false },
useTransactionSimulations: { persist: true, anonymous: true },
+ useSafeChainsListValidation: { persist: true, anonymous: true },
+ showMultiRpcModal: { persist: false, anonymous: false },
+ tokenSortConfig: { persist: true, anonymous: false },
+ tokenNetworkFilter: { persist: true, anonymous: false },
Copy link
Contributor

Choose a reason for hiding this comment

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

Has this logic been updated in the controllers already?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call, it may be updated now, I'll check. I think only the tokenNetworkFilter has not yet been released in core

Copy link
Contributor Author

@gambinish gambinish Nov 8, 2024

Choose a reason for hiding this comment

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

It looks like some of these were included in the latest release of PreferencesController. Are you okay with addressing this upgrade in a separate PR? I don't want to expand the scope of this any more than it needs to be.

I attempted an upgrade, but it appears there are a few unrelated things that also need to be updated to properly bump the version as we need it to.

@gambinish gambinish force-pushed the feat/mmassets-431_network-filter-ui branch from 33d6d30 to 915549e Compare November 8, 2024 01:06
@gambinish gambinish added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Nov 8, 2024
Copy link
Contributor

github-actions bot commented Nov 8, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: fd28086
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/477f6d9d-8671-4025-b052-80060f9a8296

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Copy link

sonarcloud bot commented Nov 8, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Run Smoke E2E Triggers smoke e2e on Bitrise team-assets
Projects
Status: Needs dev review
Development

Successfully merging this pull request may close these issues.

5 participants