metamask-mobile icon indicating copy to clipboard operation
metamask-mobile copied to clipboard

Add entry point in mobile app to labs dapp

Open meppsilon opened this issue 3 years ago • 2 comments

Description

This PR is about adding the entry point button that will link users to the Metalabs dapp in the Metamask Mobile browser.

There were a couple important decisions that I made:

I placed the button in both the Tokens tab and the CollectibleContracts tab. Initially, the button is supposed to sit below the list of tabs in the Wallet component and above the content within the tabs but I couldn't find a way to fit a UI element between the tabs list and the tabs content so I ended up placing the button in both of the components for the tab contents. That would allow it to show up for both tabs but it creates a weird behavior for the user because as they click through the tabs, all of the contents within the tabs will change but the entry buttons will remain the same, even though they slide in and out and they are technically different buttons. I hardcoded metalabs.consensys.net as an approvedHost. The functionality we want is for the user to click the link and for the browser to open up on the metalabs page with the selected address already approved. This is the same functionality that we will be receiving from the extension. The solution of hardcoding the metalabs url as an approved host allowed for the accounts rpc requests from the metalabs dapp to automatically go through successfully. I considered another solution where I would check separately if the hostname was the same as the metalabs dapp url but I thought that solution was even more hardcoded than the previous and I didn't want to introduce more logic for approving an eth_accounts request that could possibly add confusing and overhead in the future. So I chose to add on top of the existing logic instead.

Screenshots/Recordings

https://www.figma.com/file/gi92L28Nr4PdUaLsTRhmkK/User-Flows---Master?node-id=106%3A14700

Issue

Progresses #???

Checklist

  • [ ] There is a related GitHub issue
  • [ ] Tests are included if applicable
  • [ ] Any added code is fully documented

meppsilon avatar Aug 04 '22 23:08 meppsilon

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.

github-actions[bot] avatar Aug 04 '22 23:08 github-actions[bot]

@gantunesr One more thing, there is some push back on the designs of this feature so I might need to make some minor updates to the UI before we can merge. Functionality will remain the same.

meppsilon avatar Aug 09 '22 18:08 meppsilon

@meppsilon Do you know the status of this ticket?

sethkfman avatar Oct 04 '22 20:10 sethkfman

@sethkfman It still under design review. I'm going to go ahead and close this PR for now because I think it is going to take some time before we release this feature.

meppsilon avatar Oct 06 '22 01:10 meppsilon