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: add favorites to browser menu #12060

Merged
merged 5 commits into from
Oct 29, 2024
Merged

Conversation

Kaihuang72490
Copy link
Contributor

@Kaihuang72490 Kaihuang72490 commented Oct 28, 2024

Description

We're adding in a "Go to Favorites" option into the browser menu so users can navigate to https://home.metamask.io, allowing them to access their previous favorites pages. After switching to the Portfolio dapps for a user's homepage, we received a decent amount of user feedback wanting this feature back in.

Related issues

Fixes:

Manual testing steps

  1. Open the in-app browser
  2. Navigate to any website that's not https://home.metamask.io
  3. Open the browser menu by tapping on the "more" icon
  4. See the new "Go to Favorites" option, tap that.
  5. Confirm that the user is taken to https://home.metamask.io

Screenshots/Recordings

Before

IMG_8936

After

Screenshot 2024-10-28 at 11 13 04 AM

Actual

favorite.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.

Signed-off-by: Kai Huang <kai.huang@consensys.net>
@Kaihuang72490 Kaihuang72490 requested review from a team as code owners October 28, 2024 21:40
Copy link
Contributor

github-actions bot commented Oct 28, 2024

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@Cal-L Cal-L added Run Smoke E2E Triggers smoke e2e on Bitrise needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) team-wallet-ux labels Oct 29, 2024
Copy link
Contributor

github-actions bot commented Oct 29, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 24d64ba
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/88781349-932c-435b-977f-45e86b140fb3

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

@Cal-L Cal-L changed the title [DRAFT] feat: add favorites to browser menu feat: add favorites to browser menu Oct 29, 2024
@Cal-L
Copy link
Contributor

Cal-L commented Oct 29, 2024

Based on the size of the BrowserTab file and the small scope of the change, we will not be writing unit test in this PR since that requires a much larger refactoring effort. Will defer to when we break this component out.

@Cal-L Cal-L added the skip-sonar-cloud Only used for bypassing sonar cloud when failures are not relevant to the changes. label Oct 29, 2024
Copy link
Member

@NidhiKJha NidhiKJha left a comment

Choose a reason for hiding this comment

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

Reviewed UI changes, good work with Go to Favorites. But also observed a couple of differences:

  1. Go to Favorites, option works properly and redirects the user to https://home.metamask.io/
  2. In the screencast shared above, it shows that there is only one tab. But I see two tabs here. Is this intentional?
    Screenshot 2024-10-29 at 2 05 34 PM
  3. The Avatars doesn't load in the favorites tab. Also, the entire Url is rendered in the title rather than the name of the dapp
    Screenshot 2024-10-29 at 2 05 51 PM

@NicolasMassart
Copy link
Contributor

@NidhiKJha tabs depends on what device, iOS or Android, you're on.

@NidhiKJha
Copy link
Member

@NidhiKJha tabs depends on what device, iOS or Android, you're on.

@NicolasMassart I tested on android

@Kaihuang72490
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

legobeat and others added 2 commits October 29, 2024 06:00
## **Description**

- bump `detox`
- migrate detox patch
    Silence `patch-package` setup warning

## **Related issues**

## **Manual testing steps**


## **Screenshots/Recordings**

### **Before**

### **After**

## **Pre-merge author checklist**

- [x] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I’ve included tests if applicable
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **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.
Signed-off-by: Kai Huang <kai.huang@consensys.net>
@Kaihuang72490 Kaihuang72490 requested a review from a team as a code owner October 29, 2024 13:01
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 9 lines in your changes missing coverage. Please review.

Project coverage is 55.47%. Comparing base (ead35c4) to head (4bb6a41).
Report is 21 commits behind head on main.

Files with missing lines Patch % Lines
app/components/Views/BrowserTab/index.js 0.00% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12060      +/-   ##
==========================================
+ Coverage   55.35%   55.47%   +0.12%     
==========================================
  Files        1767     1772       +5     
  Lines       39841    39938      +97     
  Branches     4965     4974       +9     
==========================================
+ Hits        22052    22157     +105     
+ Misses      16274    16265       -9     
- Partials     1515     1516       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

LGTM

@Cal-L Cal-L enabled auto-merge October 29, 2024 15:36
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 60%)
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

@Cal-L Cal-L added this pull request to the merge queue Oct 29, 2024
Merged via the queue into main with commit 36d2535 Oct 29, 2024
35 of 37 checks passed
@Cal-L Cal-L deleted the feature/add-favorites-to-browser-menu branch October 29, 2024 16:02
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Oct 29, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Oct 29, 2024
@metamaskbot metamaskbot added the release-7.35.0 Issue or pull request that will be included in release 7.35.0 label Oct 29, 2024
if (url.current === OLD_HOMEPAGE_URL_HOST) return reload();
await go(OLD_HOMEPAGE_URL_HOST);
trackEvent(
createEventBuilder(MetaMetricsEvents.DAPP_GO_TO_FAVORITES).build(),
Copy link
Contributor

Choose a reason for hiding this comment

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

DAPP_GO_TO_FAVORITES is not defined (it's in DESCRIPTION instead of events).

Copy link
Contributor

Choose a reason for hiding this comment

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

@NicolasMassart could this cause the event to not fire?

const goToFavorites = async () => {
toggleOptionsIfNeeded();
if (url.current === OLD_HOMEPAGE_URL_HOST) return reload();
await go(OLD_HOMEPAGE_URL_HOST);
Copy link
Contributor

Choose a reason for hiding this comment

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

go takes 2 params

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-7.35.0 Issue or pull request that will be included in release 7.35.0 Run Smoke E2E Triggers smoke e2e on Bitrise skip-sonar-cloud Only used for bypassing sonar cloud when failures are not relevant to the changes. team-wallet-ux
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

8 participants