MutinyWallet / mutiny-web

The frontend for Mutiny Wallet
https://app.mutinywallet.com
MIT License
176 stars 54 forks source link

Toggle Element for Payjoin send UX #847

Open benalleng opened 7 months ago

benalleng commented 7 months ago

Currently the payjoin flow in #608 only announces to the user that a particular send will be a payjoin and does not give them optionailty to disable it. @DanGould has suggested we use a toggle to give the user to standardize the payjoin flow with what has been described in the bitcoin design guide for payjoin. As well @benthecarman has pointed out that the UI for the alert card is a bit awkward on the new Send screen.

image Tested and it worked for me. The payjoin notice is a bit big compared to everything else, not sure what a better way would be though

Moving forward I do think that we should think about this alert as being slightly different than the other error alerts that a user might encounter on the send screen. As those usually are an indication to the user that they should not/ cannot proceed.

And for reference, the bitcoin design guide uses the below UI

Happy to follow up with a toggle that fits in the table like bitcoin design recommends

image

I do not think that this new alert should be a blocker for #608 as I think very few users will encounter this flow before some design decision can be made about this particular UI element

Lastly, we currently (to my knowledge), do not have any toggle/switch element and I know we have been trying to move away from our Kobalte dependency so instead of just mashing up something from their codebase I wanted to open up some design discussion about this element.

TonyGiorgio commented 7 months ago

I'm not sure what would be the point in disabling a privacy feature that both parties are capable of supporting.

There's going to be many payment methods available soon (bolt12 too), and I feel like it'll eventually be too much.

DanGould commented 7 months ago

if the payment fails bc e.g the other party is offline you could set the toggle off to do a default on-chain spend. Or if the other party has pj fee requirements you don't agree to

DanGould commented 7 months ago

@benalleng Can't you use <input type="checkbox"> toggle?

benalleng commented 7 months ago

Yeah didn't even think about the checkbox, ben reminded me that we already use that in the backup flow. Likely will go with that

TonyGiorgio commented 7 months ago

The payment pages have changed drastically and will continue to change. I think it's fine to leave it for now or default to the on chain method after it fails first instead of implementing check boxes.