Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce clicks to confirm payment #4

Closed
sgeisler opened this issue Apr 21, 2019 · 5 comments
Closed

Reduce clicks to confirm payment #4

sgeisler opened this issue Apr 21, 2019 · 5 comments

Comments

@sgeisler
Copy link

Currently if one clicks an invoice link there is the following workflow to confirm the payment:

  1. click away (or wait for it to go away) the notification which is blocking the extension's button
  2. open kwh
  3. confirm payment

I think that's more interaction than necessary, for example one could get from 3 to 1 clicks using these two approaches:

  1. add a button to the notification (seems possible according to the API docs, but I have no practical experience with JS/plugins)
  2. remove the notification and open the kwh menu instead (I don't know if that's actually possible)
@fiatjaf
Copy link
Owner

fiatjaf commented Apr 21, 2019

Yeah, I would love that, and the code for it is already in place. The problem is: browsers don't support it.

What browser are you using?

Your suggestion 2: In the current Chromium the ability to open the popup menu programmatically is supported, so that is what you'll get with kWh today. On Firefox that isn't possible. On Chrome I believe you can get that behavior by enabling the Experimental Extension APIs flag, which you can find on chrome://flags. If you do that and the extension popup is opened there won't be a notification at all, so that's the best thing.

Your suggestion 1: I tried, but this is currently impossible on Firefox. Firefox doesn't support buttons on notifications, and although every browser supports reacting to simple clicks on notifications -- which would be sufficient here -- Firefox doesn't allow us to open the popup in reaction to that click. On Chrome it doesn't matter, because unless you turn on the aforementioned flag it won't be able to programmatically open the extension popup -- and if you do, there will be no notification anyway.

Summary of the above: Turn on the flag if you're on Chrome, pray if you're on Firefox.


Please let me know if the flag trick worked, so I could add it to the README.

@sgeisler
Copy link
Author

sgeisler commented Apr 21, 2019

I'm on Firefox, so praying it is I guess 😔 but I'll try it in chromium tomorrow.

Thank you for the long explanation, I'm not familiar with all the modern web stuff (and didn't expect it to be so broken, just feels like the old IE days all over again).

@k3tan172
Copy link

For what it's worth, whilst I find the 3 clicks excessive, it does make me stop and think, do I really want to spend this?

@fiatjaf
Copy link
Owner

fiatjaf commented Apr 22, 2019

Well, I personally use Firefox too, but I use it most of the time in a half-window, so the notifications appear on the extreme right of the screen, while my extension button is roughly in the middle of the screen, so I don't have to click on the notification to make it disappear.

Please don't stop using Firefox because of this.

@fiatjaf
Copy link
Owner

fiatjaf commented Apr 22, 2019

Before anyone else mentions it: Joule opens a real popup window for payment confirmations instead of this extension popup thing kWh does. Apparently all browsers are fine with opening a real popup window, despite it being much more intrusive than the extension popup, which is odd.

I believe they copied it from Metamask, as it also does that and Joule explicitly says it's inspired by Metamask. Some years ago (when I was an Ethereum brainwashed know-nothing enthusiast and had Metamask installed despite never having used it) Metamask did something similar to what kWh does today (highlighted the extension icon and expected you to click on it) and I always missed it, that's why I added the notification to kWh.

Maybe people like the Joule popup. I however don't want to add a popup, I don't know why, but I don't like it. I'm open to being convinced, however.

@fiatjaf fiatjaf closed this as completed Apr 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants