status-im / status-desktop

Status Desktop client made in Nim & QML
https://status.app
Mozilla Public License 2.0
287 stars 78 forks source link

dApps - Approve request gets rejected when clicking on the Status app elsewhere but on the "Sign Request" pop up #15941

Open virginiabalducci opened 1 month ago

virginiabalducci commented 1 month ago

Bug Report

Description

When sending an approval request to sign a transaction, if you click elsewhere in the Status app except on the "Sign Request" pop up, this pop up closes and this action is taken as if user has rejected the approval. I understand that this behavior can be seen in other flows of the app so I'm not sure if there is a way to fix this.

Steps to reproduce

  1. Have the Status app open and open https://react-app.walletconnect.com/ in a browser.
  2. Connect the dApp
  3. Click on any of the Methods, for example "personal_sign"
  4. Click on the Status app window, elsewhere but on the "Sign Request" pop up

Expected behavior

Would be nice to let user click elsewhere except the pop up, and still show the pop up, let the user close it by either rejecting or clicking on the X button. I imagine the user may have the status app opened next to a browser window, and clicking on the status app to go back to it makes user reject the connection unintentionally.

Actual behavior

The app closes the pop-up as it registers user has rejected this connection when user has clicked elsewhere on the App instead of clicking exactly on the "Sign Request" pop up.

https://github.com/user-attachments/assets/4f30826f-a3b2-43b1-9daf-e55e996fc92d

In a situation where user has both the Status app window and the browser window opened in their desktop screen, user has to move the browser window so they can click exactly on the "Sign" button.

https://github.com/user-attachments/assets/04d6f25d-45fe-45fa-aad9-3fc0f5f9faa9

Additional Information

caybro commented 1 month ago

Not sure what the expected behavior here should be? @benjthayer

Pls note that the described behavior is kind of standard throughout our whole app (or any other QML app) but I understand we might want to have something special here. I wouldn't regard this as a bug though, more as a (future) feature

alexjba commented 1 month ago

It's intended based on this task https://github.com/status-im/status-desktop/issues/15585

Now in terms of the UX maybe the modal should not close itself when clicking the overlay!

caybro commented 1 month ago

It's intended based on this task #15585

Now in terms of the UX maybe the modal should not close itself when clicking the overlay!

Yeah exactly, that's why we need some guidance here @benjthayer or @xAlisher ; most likely for the next milestone?

alexjba commented 1 month ago

Moving to 2.31. Needs design input to improve the UX. The current implementation is aligned with the app standard behaviour for the modal.

alexjba commented 1 month ago

Notes added by @saledjenic in the WC review https://docs.google.com/spreadsheets/d/1QkV08jm0ECV01x3yWTLnVGCjTluKQ-IBDJXsHjNeAQg/edit?gid=0#gid=0

It's not good to have the popup displaying WalletConnect requests closable on clicks outside the popup, it should be closed explicitly only, by clicking on the top right X button or rejecting the popup, otherwise user can accidentally click out of the popup and reject the tx.

benjthayer commented 1 month ago

Yeah this pattern of closing dialogs when clicking outside has caused a few issues in other areas of the app also.

We should remove the interaction of clicking outside of the dialog to dismiss in this instance.

Also, the sign request should only be rejected if the Reject button in the sign request dialog is clicked. If the user dismisses the dialog (by clicking X button top right of the dialog), the user should still be able to bring the sign request dialog back up to action by accessing the request from the relevant notification centre item pertaining to the request.

Associated flow here: https://www.figma.com/design/HrmZp1y4S77QJezRFRl6ku/dApp-Interactions---Milestone-1?node-id=3779-28788&t=pVKE1mcHCibKqCd4-4

alexjba commented 1 month ago

Maybe we can also raise the app on sign request. This would ensure the sign request is visible to the user.

saledjenic commented 1 month ago

I agree that action should be rejected only if the Reject button is clicked, but if we want to keep the rule of closing popup by clicking outside of the popup, then in case of wallet connect popups (signing requests) we should somehow stack them at the bottom of the app (and keep them there till they expire), that those requests can be visible to the user and that user can click on them and continue the process or reject explicitly.