-
Notifications
You must be signed in to change notification settings - Fork 97
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
Auto read clipboard in send screen #200
Comments
It's a good idea especially because clipboard data would only be read when the user is the "send payment" context. Also, if the invoice has an amount/description, we can display that instead of the raw invoice, something like:
Since it's a lot of text compared to what we have now, we probably have to revisit the layout of the send screen. We also need room to add a button to load QR code screenshots saved on disk, and a button to input an invoice manually (which is needed for lightning addresses). |
Here is a quick mockup integrating your suggestions:
|
I started to implement this. But in testing I noticed something I hadn't considered before: On iOS, we can quietly ask if the clipboard has a string (yes or no). But if we actually read the string, then iOS presents this pop-up. I personally find it to be a little distracting. (Note that it's quite common to have something in the clipboard - usually a string. So this pop-up will be occurring most of the time we visit this screen.) Also, we probably shouldn't fetch a LNURL unless instructed to do so by the user. There are security considerations. So, what we can discover (without performing a URL request):
Open questions for discussion:
|
If it does then the whole auto-read feature has to be dropped. By the way, recent versions of Android show the same warning. It is not great, it does feel a bit invasive, but still seems OK to me. This behaviour would be limited to that screen, whose purpose is obvious (send a payment after reading external data) so the user can reasonably expect that the app will read the clipboard. We could make this auto-read feature opt-out ?
Bolt12 offers should be like classic Bolt11 invoices in that they can contain a description/amount that can be shown to the user before actually calling the offer itself. |
@Bosch-0 I really liked the clean simplicity of your mock-ups. Especially how there was just a single button at the bottom of the scan screen. So here's what I came up with. |
Hey Robbie, thanks! Looks good! How does it appear if there is nothing on the clipboard? This prompt should probably only be shown if there is in fact relevant data on the clipboard. One visual improvement suggestion would be the hamburger menu, I think it's protruding a little too much into the main screen region. A possible cleaner solution could be to have a button in the bottom right (so its easily clickable by most people) that when clicked shows a paste, image and manual entry option. Similar to this menu on Samurai shown below |
Closed via PR #260 |
When opening the receive screen if the user has a Lightning invoice copied in their clipboard it should auto read it and give an option to click a button opening that invoice.
Mockup below:
The text was updated successfully, but these errors were encountered: