mirror of
https://github.com/bitcoin-core/gui-qml.git
synced 2026-12-02 07:54:42 +00:00
Initial Template for Request Payment page #435
No reviewers
Labels
No labels
Android
Bug
Build system
Design suggestion
Doc
Needs design review
Needs rebase
Stage
UX
Up for grabs
Upstream
Wallet
duplicate
enhancement
good first issue
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bitcoin-core/gui-qml!435
Loading…
Reference in a new issue
No description provided.
Delete branch "request-payment-form"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
These commits introduce the Request Payment flow. This view is available under the "Receive" tab on the Desktop Wallets main navigation view.
The Request Payment form itself currently only includes fields currently supported by the Qt wallet (label, message, and amount). Follow up PR will add support for local notes.
The Amount field in the Request form takes only valid Satoshi/Bitcoin amounts and supports flipping the units with the associated button toggle.
When the Continue button is pressed the Request Confirmation page gets pushed to the stack will eventually reflect the fields inputted in the previous form backed by the output of the WalletModel result. In its current implemention it just has statically defined properties to check the visual layout. The page also contains an address field with the copy icon that can be used to move the address into your clipboard.
Ubuntu screenshots


The piece I'm most concerned about this form is the Amount input field and how to properly sanitize and convert the field. The current object backing it doesnt quite feel right but I am limited by the inability to extend the actual TextInput class.
Is this the right thing to do?
QT gui simply refuses to paste when there are invalid characters.
yeah there are a couple weird things:
000100satsFrom from 1b869eb to adff8f
Looking good. I know we talked about this before, that the basic concept of the receive page has changed a bit. Away from the two separate pages, and towards creating the QR code directly on the page. Just realized I already implemented this in the web prototype here (note the differences in responsive layouts).
The amount input logic, which you bring up, is not properly implemented in the web prototype. There definitely has to be some sanitation. Something to look out for is that when I type
5000 satsand switch to₿, it should then show0.00 005 000 ₿and not5000 ₿. There should be a conversion happening. If this is too messy right now, I'd just come back to it in a separate PR.In a web prototype update I am working on, I am tying the unit toggle to the application setting. So when you switch the unit in the amount input, the wallet balance display in the top left also changes. Wonder if that is intuitive or not. What do you think? In the send page, that unit setting should at least live on a user flow level. So when you toggle, the unit in the amount input, but also the fee selector changes, as well as the unit in the review screen.
Small thing about the input and amount fields is that I can enter unlimited characters (and emoji). Should probs be restricted in some way.
I will remove the confirmation page and get the request page in alignment with the latest. I won't be able to get QR codes functioning in this PR as that will have to be a follow up once the requests are working end-to-end.
I'll double check this. I've made some improvements with the amount but I havent tried emojis
Updated the form to be a single page. Does not include QR code generation, separation of address text into individual items with their own background, or the copy tooltip. I'd prefer to add these details afterwards.
Looks great. I know you want to exclude various interaction details and handle those in follow-ups, so I won't comment on those. Just one question about the layout. Does this already include the mobile one where the QR code is inline and the buttons are static at the bottom?
Does this need more work, or could it be merged after a rebase?
update from 622a114 to efe0986
@johnny9 thanks of rebasing. What state is this PR in? From our conversation last week, I think you said that you'd like to get this basic page merged even if it is not 100% yet, and then have smaller PRs to iron out the kinks, right?
ACK efe098656d432cb9ec0c8e12137a65891486aa4c
Tested the PR manually and also checked it with @GBKS's prototype.
@johnny9 please, for future reference, try to keep the description of the PR concise if possible and updated (eg confirmation page removal) as a reviewer that, could be different approaches, starts from the top it could be misleading or confusing.
Look & feel
@GBKS, I find the layout a bit unbalanced in terms of alignment, but mainly I'm not sure about all the requested fields as in other wallets the process is more straight forward and simplified with just a QR and as you have in the prototype on the top-right margin menu ("...") the user could add the amount (and labels) later so I'd keep it simpler in that sense. This (having the amount (and labels) first, as in your prototype or this PR) or having the QR first could be configurable as I think most times a user won't require an amount but perhaps as in a store the user will put the amount (and labels) every time(?) and we could add that flexibility.
Ubuntu's screenshot.
When we go back and forth from B to Sats, do we want to complete with 0's all the time? (eg 2.3 B to Sats = 230000000 then back to B shows 2.30000000).
Do we need the payment order or id (#)? Is this going to be shown in history somehow? In current QT I think we could remove these records.
QT's screenshot.
Code wise
BitcoinUnitsconversions we'll need to have different converters and they'll have the responsibility of conversion and not the amount itself, this could be added later on a follow-up.Perhaps the above has been missed?
@pablomartin4btc please see the rationale in the design docs here. Great to hear your feedback, and I'd like to start tracking feedback like this, but wait with acting on it after the MVP release and we have had more chance to actually use it and do user testing.
Update from efe0986 to 9ad34f0
9ad34f0aa2595df6f72c8b3d1b088e985f425e5a
it's a bit hard to review/test as it is not clear to me which things are finale and which are for follow ups.
for example
Create payment requestwhen amount/label/message inputs are given? (instead of alwaysCreate bitcoin address)Clearbutton only "clears" address entry fieldand several other nits
Update from cb6d96a to 13535ca
Tested on Ubuntu:
Click Receive tab and make sure QML loads
@jarolrod
nit: Maybe amount input deserves it's own control?
nit: should be
neutral7like the other labelsmaybe a question for designers: but I agree that trying to input invalid characters resulting in nothing happening is not helpful to users, but as a scaffold, the current approach seems good enough for now
Not likely to happen, but it seems to me like a bad idea to put a placeholder address here when someone curious might build this branch and try to use it with mainnet funds, maybe insert an invalid character or something else to indicate this is a placeholder?
cc @GBKS
@GBKS
ACK
13535cab4b, I have reviewed the code and it looks OK.Unaddressed nits can be resolved in follow-ups after receiving input from designers.
Yes, it will be. I haven't committed to doing that just yet as I don't have a clear idea of exactly how the BitcoinAmounts and the Bitcoin Address inputs will be handled. I think the PR to do the input formatting of the amounts should take care of having this component extracted out with clear signals/properties.
I'll double check this. There has been some flip flopping on the design side but it should be decided now
Ill remove the address from the code asap