-
Notifications
You must be signed in to change notification settings - Fork 79
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
Feat/request payment cards 16737 #16740
base: master
Are you sure you want to change the base?
Conversation
Jenkins BuildsClick to see older builds (28)
|
7b82665
to
87b9b3e
Compare
ui/imports/shared/controls/chat/RequestPaymentMiniCardDelegate.qml
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Storybook is broken due to missing required property
chat/ChatInputLinksPreviewArea.qml:40:5: Required property requestPaymentModel was not initialized
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM in general, some minor comments here + some aspects of #16744 seems to be applicable here as well
@@ -41,6 +47,8 @@ Control { | |||
signal linkReload(string link) | |||
signal linkClicked(string link) | |||
|
|||
signal paymentRequestRemoved(int index) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name suggests that the action has been performed and the signal is called to inform about that executed action. If the signal is called with intention that the user will do the job it should follow the convention with Requested
on the end, e.g.:
signal removePaymentRequestRequested(int index)
I know, we have strange naming coincidence here but imo it's ok. Or alternatively removePaymentRequested
🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about Requested part, but to make sure it's clear what is removed I renamed it to: removePaymentRequestPreviewRequested
. Made it pretty long though :(
87b9b3e
to
d1ccce5
Compare
1b6059d
to
9c3914a
Compare
Logic is refactored according to remarks. Please review again @alexjba @caybro @micieslak Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM in general, just format the amount
pls when displaying it
|
||
signal imageRemoved(int index) | ||
signal imageClicked(var chatImage) | ||
signal linkReload(string link) | ||
signal linkClicked(string link) | ||
|
||
signal removePaymentRequestPreviewRequested(int index) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ugh, what a mouthful 😆
color: Theme.palette.baseColor1 | ||
verticalAlignment: Text.AlignVCenter | ||
elide: Text.ElideRight | ||
text: root.amount |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Must format this value!
QtObject { | ||
id: d | ||
property real bannerImageMargins: 1 / Screen.devicePixelRatio // image size isn't pixel perfect.. | ||
property bool highlight: root.highlight || root.hovered |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
readonly
those two?
StatusBaseText { | ||
Layout.fillWidth: true | ||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere | ||
text: qsTr("Send %1 %2 to %3").arg(root.amount).arg(root.symbol).arg(Utils.compactAddress(root.address.toLowerCase(), 4)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Format the amount
const receiver = StatusQUtils.ModelUtils.get(paymentRequestModel, index, "receiver") | ||
const amount = StatusQUtils.ModelUtils.get(paymentRequestModel, index, "amount") | ||
const symbol = StatusQUtils.ModelUtils.get(paymentRequestModel, index, "symbol") | ||
const chainId = StatusQUtils.ModelUtils.get(paymentRequestModel, index, "chainId") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could get the whole row at once, and then get the props
Closes #16737
What does the PR do
Affected areas
Chat
Architecture compliance
My PR is consistent with this document: Status Desktop Architecture Guide
Screenshot of functionality (including design for comparison)