-
Notifications
You must be signed in to change notification settings - Fork 15
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
Conversation
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.
Nice job with this! Thank you for tidying up the rushed hackathon code!
![Screenshot 2024-08-22 at 11 27 35](https://private-user-images.githubusercontent.com/34915414/360393360-8cfd7d11-dcbf-407a-a073-d8fd03689bea.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNTg2MTYsIm5iZiI6MTczOTI1ODMxNiwicGF0aCI6Ii8zNDkxNTQxNC8zNjAzOTMzNjAtOGNmZDdkMTEtZGNiZi00MDdhLWEwNzMtZDhmZDAzNjg5YmVhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDA3MTgzNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWU4ZTY2ZWU3M2VhYjJhYmExN2Y3OTAyOWVmOTI3NDAxYmJhZGM1ZmU3NDk3NDFkYzIzNjI2MGI4NzdhOGM0NzkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.XG7AgqMqfR1Zi9RfZVKzCvDXOp13rpuvbMT0cVBsmAU)
Tooltips look great:
![Screenshot 2024-08-22 at 11 27 44](https://private-user-images.githubusercontent.com/34915414/360393444-fdc1c2f0-8b8e-4cad-ad32-ae2d82ffa2e3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNTg2MTYsIm5iZiI6MTczOTI1ODMxNiwicGF0aCI6Ii8zNDkxNTQxNC8zNjAzOTM0NDQtZmRjMWMyZjAtOGI4ZS00Y2FkLWFkMzItYWUyZDgyZmZhMmUzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDA3MTgzNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTk3ZmZjZTY0NTU2NjAxZDE2NTg0ODU1NzZlYWM0NDZkNWY1ZGM4YTQzNmNlMGU4YjA4OTI5YjlhNjE2ZjVjNDkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.sv6eVUq5pXFE2f-KtS0bKJBC3ihOYghbMwSHCltAPnY)
![Screenshot 2024-08-22 at 11 27 40](https://private-user-images.githubusercontent.com/34915414/360393440-d0442d07-321b-4043-aa30-8a4b0e59621b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNTg2MTYsIm5iZiI6MTczOTI1ODMxNiwicGF0aCI6Ii8zNDkxNTQxNC8zNjAzOTM0NDAtZDA0NDJkMDctMzIxYi00MDQzLWFhMzAtOGE0YjBlNTk2MjFiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDA3MTgzNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTRjYzFlZTU2NjliNjRjYWM2ODg1MzFjZTJjZDcwMDkzMjc4NTg4Njc0ZmEyNDYxZDg4YmViNjU1NGQ1MjJlM2MmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.GSsAHPDnHmIE1zF9vASoQhPxQs5Y0am3sHXp_7jkokU)
Also looking good on dark mode:
![Screenshot 2024-08-22 at 11 28 04](https://private-user-images.githubusercontent.com/34915414/360393518-0d790e9d-9e57-4474-b107-6e344efd469a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNTg2MTYsIm5iZiI6MTczOTI1ODMxNiwicGF0aCI6Ii8zNDkxNTQxNC8zNjAzOTM1MTgtMGQ3OTBlOWQtOWU1Ny00NDc0LWIxMDctNmUzNDRlZmQ0NjlhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDA3MTgzNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWZlMTU1OWVmNzkwYmZlMTA5Zjc0ZTJjNzM2NTI1NjNjNjFmZmI0MTAzMzJhNTBlN2FmYzg2MTljZTE2NjljYjQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.7TalT0wzfP8XMbDJBn54Lq0jNJ23-3veK_LnDlJuCao)
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](https://private-user-images.githubusercontent.com/34915414/360393867-990655ab-e905-43e0-8636-baa251c7d875.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNTg2MTYsIm5iZiI6MTczOTI1ODMxNiwicGF0aCI6Ii8zNDkxNTQxNC8zNjAzOTM4NjctOTkwNjU1YWItZTkwNS00M2UwLTg2MzYtYmFhMjUxYzdkODc1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDA3MTgzNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTkwZDMxNWQ3NzRjMTJmZDUzMWYzYjRhOWIwNjA0ZjQ4ZTRmMmU5YjY4YzUzZjI0YThiNmY0NzE1MzU1MDMyY2ImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.yJsEKb52ejPAmt1X_z8Qg1OXLvJZMQpGuWGuXiA0cRk)
It also doesn't correctly format the number when it is set via the max button, it should be comma separated.
7875427
to
ac0698e
Compare
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.
Great job fixing up the 'max' button! It is working as intended now!
![Screenshot 2024-08-23 at 14 00 38](https://private-user-images.githubusercontent.com/34915414/360936206-8296a537-0539-4a03-9c29-20c5250eb8e8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNTg2MTYsIm5iZiI6MTczOTI1ODMxNiwicGF0aCI6Ii8zNDkxNTQxNC8zNjA5MzYyMDYtODI5NmE1MzctMDUzOS00YTAzLTljMjktMjBjNTI1MGViOGU4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDA3MTgzNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFhYWEzNGM0NjM4YWIxYzM3OTg3YWViMTkzMTQwOTM5MDYxNjdjNGNmMTA1MWQzOTEyMTM1NDM5MTc5ODU4ZjQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.uOv_sDpBCXQRxsYP3X4jfIAjWoH8pSSOKX6APuxCTEM)
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! :) )
src/components/common/Extensions/UserHub/partials/CryptoToFiatTab/partials/ReceiveCard.tsx
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.
Just seen that you have fixed this on #2988 - so approving here!
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 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
Hover:
The icons are changed and the font weights are in line with Figma ✔️
Validation:
Tooltips:
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; |
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.
for clarity's sake maybe we could name this with UPPERCASE, maybe even move it outside of the component since it never changes?
51aaa23
to
8d891bb
Compare
Fix: User hub UI/UX updates for crypto to fiat tab
8d891bb
to
092835a
Compare
Get fee values and conversion rates Compute receive amount in user hub tab Update selected currency based on bank account details
I rebased this branch and I have lost your approvals @bassgeta @iamsamgibbs 😢 |
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.
Given this another test after the rebase and looks good!
![Screenshot 2024-08-27 at 11 22 57](https://private-user-images.githubusercontent.com/34915414/361762111-e94a2fa9-3dc3-4cb3-8322-52600f804adf.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNTg2MTYsIm5iZiI6MTczOTI1ODMxNiwicGF0aCI6Ii8zNDkxNTQxNC8zNjE3NjIxMTEtZTk0YTJmYTktM2RjMy00Y2IzLTgzMjItNTI2MDBmODA0YWRmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDA3MTgzNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJiNzIyMThkN2U1MDM4N2NlZGUxZjVjYTQ0NzQ2MjQ1MzBhMmM2YWZjOWYxODhmZWQwNDNjYjcxNzMwYTI3MzkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0._5-9YCAvNTodLBAmLC_jlGBQPyH1ujZqhHe0iUxrd4g)
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](https://private-user-images.githubusercontent.com/34915414/361762542-e285a97f-db75-4945-8431-405e1cceb2d9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNTg2MTYsIm5iZiI6MTczOTI1ODMxNiwicGF0aCI6Ii8zNDkxNTQxNC8zNjE3NjI1NDItZTI4NWE5N2YtZGI3NS00OTQ1LTg0MzEtNDA1ZTFjY2ViMmQ5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDA3MTgzNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWE1N2FmYjM5YzliZjg0NDFlYzJmMjRlNmRjNWQ4NzU1OTVlMTBkNDg5Nzg3YzRiNTgwYzdkOGNhYmU4MDM4OWYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.1T3Fskrfkp7sUDHzk6T4RTMViEg_oc3tHIrVAEiwY9A)
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
@iamsamgibbs thank you for noticing this issue regarding the hovering state! I'm on to solving it 🚀 |
Fix: Updates for CryptoToFiatTab components disabled state
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.
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
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.
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.
Merge it @mmioana 🔥
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.
@rdig I tested it now and can confirm we get the USD conversion and the max value updates properly Screen.Recording.2024-08-29.at.12.39.42.mov |
I believe I do, but will re-test to make sure. |
Description
As part of the hackathon, the following updates are required to the new user hub functionality
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