MetaMask / metamask-extension

:globe_with_meridians: :electric_plug: The MetaMask browser extension enables browsing Ethereum blockchain enabled websites
https://metamask.io
Other
11.94k stars 4.88k forks source link

Snaps Error UI #11897

Closed rekmarks closed 2 years ago

rekmarks commented 3 years ago
Gudahtt commented 3 years ago

We could consider a third type of error, for the custom confirmation screen. If the operation performed as a result of confirming ends up throwing an error, it would be nice to show the user this in the popup, since we already have their attention and the right context.

holantonela commented 3 years ago

Thanks for defining an errors list! Before designing this, I need to understand some things: 1. where the user will be once the error is triggered 2. if we can offer a path to users to recover.

Some questions/options

Snap fails to install: a. we move users to the main view and show a toast error. b. we keep users in the install snap view to retry/install again, and we show an error. Can users recover trying again?

Also, I'm thinking about the successful path now: how the flow continues after the snap is installed? Do we want a successful install screen? Then, Do we want a full error screen if the path is not successful?

Snap crash on runtime: the error will be shown on the same screen the user is. We will rely on a banner component. Can the user recover in some way?

Snap custom confirmation error: the error will be shown in the custom confirmation view. Does it make sense? If the user retries, may it fix the problem? If we keep the user in the custom confirmation view, will we enable a never-ending error flow? If we move the user outside the custom confirmation view, how can users trigger it again?

Gudahtt commented 3 years ago

Snap fails to install: a. we move users to the main view and show a toast error. b. we keep users in the install snap view to retry/install again, and we show an error. Can users recover trying again?

Also, I'm thinking about the successful path now: how the flow continues after the snap is installed? Do we want a successful install screen? Then, Do we want a full error screen if the path is not successful?

The snap installation happens during the connect flow, which is in the notification popup. We use the notification popup just for confirmations and connecting - we never show the main flow in this UI. So I don't think moving them to the main flow is viable in this context.

At the moment, the window just closes if the operation succeeds. We could add a success and/or error screen though.

In the general case I don't think we should consider unidentified errors as recoverable/retryable. If we don't know what the error is, we might make things worse by letting the user retry. I expect we'll have multiple types of errors on the path to installation though - recoverable errors (e.g. network error when trying to download the manifest), unrecoverable errors, and unidentified errors. So maybe a flow with a retry and one without would be warranted? :thinking:

holantonela commented 3 years ago

Final UI here

https://www.figma.com/file/nBKUQx0btfQiqVf30UA6KD/Flask-MVP?node-id=491%3A6190

rekmarks commented 2 years ago

This was done in #12860.