Super cool! Yeah, I'd say it would be better to switch to optimistic UX - just make it look like it's been zapped immediately and only pop up any dialog when the payment actually fails (it could also just be a SN notification).
We're going to house an abort button on the toast eventually, but should probably make it lower contrast than it currently is.
reply
I guess my question is why is the toast even needed in the success case? Why should user care? In the nostr apps that use NWC the status of the lightning icon just updates...
reply
0 sats \ 1 reply \ @ek 17 Feb
I think the main issue is the blocking nature on anything that does not use the default zap, no? So if you comment, post or even just select a custom amount, the UI currently blocks until the payment failed or was successful.
If that's true, the toast isn't the problem afaict. As @k00b mentioned, it only exists so one can cancel pending payments.
In the nostr apps that use NWC the status of the lightning icon just updates...
You mean like showing a spinner instead of the lightning icon? Mhh, I see. Maybe we can do that instead of toasts and clicking the spinner would cancel the action. But that's a bigger lift, not sure if it's worth it if the toast is not the real problem.
reply
The toast is easy to remove in cases where we don't want it so I wouldn't overthink that part yet. The hard part will be optimistic actions.
reply
They accidentally zapped and want to abort the payment. You've expressed wanting to abort custodial zaps in the past (which we are also working on). Have your feelings around that changed or did you have something else in mind?
reply
3524 sats \ 1 reply \ @nout 17 Feb
Yeah, you are right and I'm sorry for pulling you back and forth on this. Cancellation is a fair counter point. Please take my inputs just as hopefully constructive feedback / brainstorming. I'm likely to be wrong on stuff...
I think the cancellation is a bit separate problem from the zapping solution itself.
  • zapping:
    • internal wallet zap (no latency, low chance of error)
    • connected wallet zap (medium to high latency, has a chance of error)
  • cancellation:
    • removing / cancelling the "WoT" vote
    • getting sats back on accidental click/zap (see below, I think this one is not that important)
Zapping
Just brainstorming, but what about behavior like this that's the same for both internal and connected wallet:
  1. when user clicks on lightning, then the lightning icon keeps "pulsing" (some animation) until confirmed. And maybe when confirmed you do the fullpage lightning animation?
  2. when confirmed it turns yellow (or whatever the final color).
  3. when there's error/timeout, then show toast with actionable button(s) that allow the user to "try again" or "debug" (or something like that).
When zapping with internal wallet, user only sees (2) or (3)
Cancelation
The main issue I hit was that I clicked/tapped by accident on lightning when I didn't mean to. I don't mind losing the sats since that was my mistake (i.e. fair game), but I'm mainly worried about providing a wrong signal to the system and sorting that post higher (even when I don't like it). So the one solution idea that would resolve my issue would be if the post tripledot menu had "Cancel upvote (leave sats)" or perhaps for plus points, but really low priority: when the icon is still "pulsing" (= unconfirmed), I can tap&hold and in the dialog there could be option to cancel?
reply
Interesting and helpful as usual.
Sounds like there's a principle in there: don't do a toast/popover for frequent actions if you can avoid it. Toasts are a sledgehammer and we can probably find a better, more specific tool for the job.
reply