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

Create transaction screen and rework addresses screen #38

Merged
merged 20 commits into from
Aug 23, 2022

Conversation

nop33
Copy link
Member

@nop33 nop33 commented Aug 18, 2022

No description provided.

@nop33 nop33 requested a review from LeeAlephium August 18, 2022 11:59
src/components/IOList.tsx Show resolved Hide resolved
src/components/buttons/Button.tsx Outdated Show resolved Hide resolved
src/components/buttons/Button.tsx Show resolved Hide resolved
src/components/buttons/ButtonsRow.tsx Show resolved Hide resolved
src/components/headers/DefaultHeader.tsx Outdated Show resolved Hide resolved
src/components/headers/DefaultHeader.tsx Outdated Show resolved Hide resolved
src/screens/TransactionScreen.tsx Show resolved Hide resolved
src/screens/TransactionScreen.tsx Outdated Show resolved Hide resolved
src/components/buttons/Button.tsx Outdated Show resolved Hide resolved
src/components/AddressBadge.tsx Outdated Show resolved Hide resolved
@LeeAlephium
Copy link
Contributor

Functional test looks good, couple comments:

  • "Fee" in the transaction screen when in "Discreet mode" is blocked out. I don't understand how that's useful.
  • No user labels are used on the Transfers screen.

@nop33 nop33 changed the title Create transaction screen Create transaction screen and rework addresses screen Aug 18, 2022
@LeeAlephium
Copy link
Contributor

LeeAlephium commented Aug 18, 2022

Please do not change the context of the PR to include more than it needs to - please stack this PR with another to address changes to the addresses screen - there were other things to address in this PR before adding more to it

@nop33
Copy link
Member Author

nop33 commented Aug 22, 2022

Please do not change the context of the PR to include more than it needs to - please stack this PR with another to address changes to the addresses screen - there were other things to address in this PR before adding more to it

I was not planning on exceeding the 1000 LOC (unofficial) limit. I did not rewrite history, so you can review the new changes I added separately from the previous ones. I can address all the review comments together. Does this create a problem for you?

@nop33
Copy link
Member Author

nop33 commented Aug 22, 2022

"Fee" in the transaction screen when in "Discreet mode" is blocked out. I don't understand how that's useful.

It's a configurable amount by the user, so we hide it. I don't see a reason not to, same as all other amounts. Do you have a strong argument against it?

No user labels are used on the Transfers screen.

What do you mean? As in "input field labels"?

@nop33 nop33 requested a review from LeeAlephium August 22, 2022 08:16
@LeeAlephium
Copy link
Contributor

Does this create a problem for you?

Yes, the scope of the PR is growing making it more complicated

Do you have a strong argument against it?

I don't, but I also don't understand why it's useful to hide a fee amount which I'd like to. The purpose of a fee is to pay for network resources so what is sensitive about this?

What do you mean? As in "input field labels"?

I'll get you a picture, I don't know how else to describe it other than all the user owned addresses with labels aren't using their label on that view

@mvaivre
Copy link
Member

mvaivre commented Aug 22, 2022

My little grain of salt regarding hiding the amounts : IMO, the only amounts that should be hidden are the holdings & read-only values (tx values in history for instance).
Any writable / editable amount, or any amount that isn't linked to an hodled amount shouldn't be hidden in order to allow for transparency during manual operations. Hence IMHO the fees should indeed stay visible.

@nop33
Copy link
Member Author

nop33 commented Aug 22, 2022

I don't fully get the argument for the fees being visible in discreet mode, but since both of you support that I'll change it 👍

@nop33
Copy link
Member Author

nop33 commented Aug 22, 2022

Yes, the scope of the PR is growing making it more complicated

It did grow, but won't grow more than this 😇. It's 800 LOC and I think it's reasonable. I don't think I did something wrong, I asked for your review, you gave it, I pushed some new code ensuring it won't grow much, I asked for it again. Is that something we don't want to do in the future? We agreed that we shouldn't rewrite history so that people can review newly added commits. Which I respected. Would you have said the same it I only asked for your review once after pushing the new code? If you don't feel like reviewing it, I can pass it to @mvaivre. I won't split it, it creates overhead.

@nop33
Copy link
Member Author

nop33 commented Aug 22, 2022

No user labels are used on the Transfers screen.

What do you mean? As in "input field labels"?

I'll get you a picture, I don't know how else to describe it other than all the user owned addresses with labels aren't using their label on that view

Ah, you mean address labels. The Transfers screen is not in the scope of this PR. It's also not properly represented in the mockups.

@nop33 nop33 changed the title Create transaction screen and rework addresses screen WIP: Create transaction screen and rework addresses screen Aug 22, 2022
@nop33
Copy link
Member Author

nop33 commented Aug 22, 2022

I am changing the status of this PR to WIP. I cannot mark it as "Draft" otherwise, and I cannot remove reviewers either.

@mvaivre
Copy link
Member

mvaivre commented Aug 22, 2022

It's also not properly represented in the mockups.

As of today, I actually think that specifying the addresses' labels in the "global" TX list view is not a vital information. I'd like to start without it, try the UI, and iterate if necessary :)

Copy link
Contributor

@LeeAlephium LeeAlephium left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Damn that carousel is nice to have ✨ Code looks good!

On the functional test I noticed one thing in particular: if you press on an address card and go back, the copy and qr code buttons remain disabled.

Screen_Recording_20220822-073107_mobile-wallet.mp4

Two minor things I noticed: it's not obvious when pressing "copy address" that the operation succeeded, and when the QR code modal appears it's not obvious how to close it (other than people's natural reaction to just hit the screen to see what happens)

@nop33
Copy link
Member Author

nop33 commented Aug 22, 2022

if you press on an address card and go back, the copy and qr code buttons remain disabled.

Nice catch @LeeAlephium , thanks for the thorough tests!

it's not obvious when pressing "copy address" that the operation succeeded

I'll install a toast message lib because only Android supports it natively 👎 And then @mvaivre can re-iterate on it to improve its styling, since there's nothing in the mockups for notifications atm.

when the QR code modal appears it's not obvious how to close it

The QR code modal is really as basic as I could make it cause I wanna wait for @mvaivre to design one first, so that I don't waste time. I only wanted to make it functional for now. But thanks for the feedback!

@nop33 nop33 changed the title WIP: Create transaction screen and rework addresses screen Create transaction screen and rework addresses screen Aug 22, 2022
@nop33 nop33 requested a review from LeeAlephium August 22, 2022 18:24
fullPrecision = false,
prefix,
suffix = '',
hideOnDiscreetMode = true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we rename this to showAlways? It makes logical statements easier to reason about: if (!discreetMode || !hideOnDiscreetMode) { vs if (!discreetMode || showAlways) {. The former is like 3 negatives 🙃 "or if not not showing on not showing amounts mode" .... 😆 Just make sure that the change includes showAlways = false

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll rename it to showOnDiscreetMode :)

@LeeAlephium
Copy link
Contributor

LeeAlephium commented Aug 22, 2022

Functional tests look good 👍 My remaining comments are not necessary

@LeeAlephium LeeAlephium self-requested a review August 22, 2022 18:52
@nop33 nop33 merged commit 503b798 into master Aug 23, 2022
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

Successfully merging this pull request may close these issues.

3 participants