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

Fix: User hub UI/UX updates for crypto to fiat tab #2980

Merged
merged 4 commits into from
Aug 29, 2024

Conversation

mmioana
Copy link
Contributor

@mmioana mmioana commented Aug 22, 2024

Description

As part of the hackathon, the following updates are required to the new user hub functionality

  • When selecting the Max option, the amount doesn't correspond with the balance shown.
image
  • Hover state is missing from the Max text button (should be text-blue-300).
image
  • Font weight of both values should match Figma
image
  • Correct currency icons are missing for both USDC and EU etc.
image
  • All validation variables is missing
image
  • Tooltips are missing on the transaction fee tables
image
  • Transaction fee text should be a lighter gray token to match Figma
image

Figma link

Testing

TODO: Please check the above mentioned changes are in place (or any other Figma mismatch)

Important

The values for the summary card will be updated in another PR related to #2952

Resolves #2665

@mmioana mmioana requested review from a team as code owners August 22, 2024 08:02
Copy link
Contributor

@iamsamgibbs iamsamgibbs left a comment

Choose a reason for hiding this comment

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

Nice job with this! Thank you for tidying up the rushed hackathon code!

Screenshot 2024-08-22 at 11 27 35

Tooltips look great:

Screenshot 2024-08-22 at 11 27 44 Screenshot 2024-08-22 at 11 27 40

Also looking good on dark mode:

Screenshot 2024-08-22 at 11 28 04

The only requirement missing from the issue is the max button not setting the correct value (I think you can just remove the decimals value from the Numeral component in the Withdraw Card so that it shows the full balance)

Screenshot 2024-08-22 at 11 28 22

It also doesn't correctly format the number when it is set via the max button, it should be comma separated.

@mmioana mmioana self-assigned this Aug 22, 2024
@mmioana mmioana marked this pull request as draft August 22, 2024 11:34
@mmioana mmioana force-pushed the ui/2665-user-hub-updates branch from 7875427 to ac0698e Compare August 22, 2024 14:17
@mmioana mmioana marked this pull request as ready for review August 22, 2024 14:32
@mmioana mmioana requested a review from iamsamgibbs August 22, 2024 14:32
Copy link
Contributor

@iamsamgibbs iamsamgibbs left a comment

Choose a reason for hiding this comment

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

Great job fixing up the 'max' button! It is working as intended now!

Screenshot 2024-08-23 at 14 00 38

Although I realised whilst re-reviewing this that the 'receive' currency should only ever be in EUR/USD dependant on the bank details entered when the user signs up to crypto to fiat rather than the currency selected in the currency context. (I'm not sure if that detail is currently stored in another context or not, whether it is a simple change to make here? Otherwise that may increase the scope so I think just leaving the currency hardcoded here to avoid confusion might be preferred - let me know what you think! :) )

iamsamgibbs
iamsamgibbs previously approved these changes Aug 23, 2024
Copy link
Contributor

@iamsamgibbs iamsamgibbs left a comment

Choose a reason for hiding this comment

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

Just seen that you have fixed this on #2988 - so approving here!

bassgeta
bassgeta previously approved these changes Aug 26, 2024
Copy link
Contributor

@bassgeta bassgeta left a comment

Choose a reason for hiding this comment

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

The devil's in the details, really nice job tackling this bunch of different issues and formatting values like they should.
It's kinda lame that there aren't many options to format a value jsut for display purposes, but keeping it as a number under the hood. Now we have to do double parsing, but hey that's life in React right now :D

Max works
image
Hover:
image
The icons are changed and the font weights are in line with Figma ✔️
Validation:
image
Tooltips:
image
And the fee texts are also a lighter shade of gray, LGTM 😎

@@ -35,20 +41,35 @@ const WithdrawCard: FC<WithdrawCardProps> = ({
balance,
handleSetMax,
}) => {
const name = 'amount';
const name = TransferFields.AMOUNT;
Copy link
Contributor

Choose a reason for hiding this comment

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

for clarity's sake maybe we could name this with UPPERCASE, maybe even move it outside of the component since it never changes?

@mmioana mmioana dismissed stale reviews from bassgeta and iamsamgibbs via 51aaa23 August 26, 2024 14:03
@mmioana mmioana force-pushed the ui/2665-user-hub-updates branch 2 times, most recently from 51aaa23 to 8d891bb Compare August 26, 2024 15:16
Fix: User hub UI/UX updates for crypto to fiat tab
@mmioana mmioana force-pushed the ui/2665-user-hub-updates branch from 8d891bb to 092835a Compare August 26, 2024 15:20
Get fee values and conversion rates
Compute receive amount in user hub tab
Update selected currency based on bank account details
@mmioana
Copy link
Contributor Author

mmioana commented Aug 26, 2024

I rebased this branch and I have lost your approvals @bassgeta @iamsamgibbs 😢
Could you please give it another try?

Copy link
Contributor

@iamsamgibbs iamsamgibbs left a comment

Choose a reason for hiding this comment

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

Given this another test after the rebase and looks good!

Screenshot 2024-08-27 at 11 22 57

Although, now that #2956 has been merged in, I've spotted this hover state issue with the withdraw / receive cards. When disabled, the border shouldn't change on hover:

Screenshot 2024-08-27 at 11 22 07

I think it makes sense to fix this up here as it will be a tiny change and there are already changes to the withdraw / receive cards.

…eived-amount

Feat/2952: Calculate receive amount in user hub tab
@mmioana
Copy link
Contributor Author

mmioana commented Aug 28, 2024

@iamsamgibbs thank you for noticing this issue regarding the hovering state! I'm on to solving it 🚀

Fix: Updates for CryptoToFiatTab components disabled state
@mmioana mmioana requested a review from iamsamgibbs August 28, 2024 06:17
Copy link
Contributor

@iamsamgibbs iamsamgibbs left a comment

Choose a reason for hiding this comment

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

Great job, thanks for the border hover fix (and all the other disabled state fixes you've added!)

Screen.Recording.2024-08-28.at.20.49.49.mov

Copy link
Contributor

@bassgeta bassgeta left a comment

Choose a reason for hiding this comment

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

Everything still working and looking good after the rebase, thanks for also pulling out that form field to an uppercase constant!
Additionally, the hover states also work now:
image

Let's get this nice functionality merged, only the balance awaits 😎

Copy link
Contributor

@rumzledz rumzledz left a comment

Choose a reason for hiding this comment

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

Merge it @mmioana 🔥

2980

@mmioana mmioana merged commit 42fba50 into master Aug 29, 2024
3 of 5 checks passed
@mmioana mmioana deleted the ui/2665-user-hub-updates branch August 29, 2024 10:32
Copy link
Member

@rdig rdig left a comment

Choose a reason for hiding this comment

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

Using a USD bank account, I can't get the max button to work.

The UI elements on the other hand seem to be correct otherwise.

Screenshot from 2024-08-29 13-29-50

@mmioana
Copy link
Contributor Author

mmioana commented Aug 29, 2024

@rdig I tested it now and can confirm we get the USD conversion and the max value updates properly
Have you set up the coin gecko env vars and run npm run prepare?

Screenshot 2024-08-29 at 12 39 22

Screen.Recording.2024-08-29.at.12.39.42.mov

@rdig
Copy link
Member

rdig commented Aug 29, 2024

I believe I do, but will re-test to make sure.

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.

Hackathon: New user hub tab UI/UX Updates
5 participants