mutiny-web icon indicating copy to clipboard operation
mutiny-web copied to clipboard

Toggle Element for Payjoin send UX

Open benalleng opened this issue 1 year ago • 5 comments

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.

benalleng avatar Jan 23 '24 01:01 benalleng

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.

AnthonyRonning avatar Jan 23 '24 02:01 AnthonyRonning

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 avatar Jan 23 '24 03:01 DanGould

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

DanGould avatar Jan 23 '24 14:01 DanGould

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

benalleng avatar Jan 23 '24 14:01 benalleng

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.

AnthonyRonning avatar Jan 23 '24 20:01 AnthonyRonning