-
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: Truncate Search Item label text #4160
Conversation
2b2e1eb
to
d408621
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.
Nice work on this so far, it is very nearly there!
Simple payments recipient field looks good in both cases:
Wallet address for verified members works:
But long usernames are not being truncated for verified members:
I also noticed the bug resolved by #3733 is back, I'm hoping it's just that this PR hasn't been rebased since that was merged! 😬 I don't see anything here that would have messed with that.
d408621
to
23b6913
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.
Nice one @rumzledz!
All looks good with the original bug:
Just having some trouble / questions about the change to not return addresses when searching verified members.
![Screenshot 2025-01-24 at 17 17 40](https://private-user-images.githubusercontent.com/38098203/406528146-5dbf38fa-d1ba-4757-9706-5153dc090716.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxODEwMTIsIm5iZiI6MTczOTE4MDcxMiwicGF0aCI6Ii8zODA5ODIwMy80MDY1MjgxNDYtNWRiZjM4ZmEtZDFiYS00NzU3LTk3MDYtNTE1M2RjMDkwNzE2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDA5NDUxMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWNmZGE1NGNmZGE5MDRmMmZlMmE4ZjM1MzMwNWE5OTRhMWZkN2IwZjQ4NGQ1OTE1ZjVhNDBmZDI2M2E2OTQxZmYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.rcBGf5Glz9dcGL4hjFj21vePYh-HIY5mMNIBE8go0Hk)
Seems to me that in the PR from @iamsamgibbs it states that addresses should show in the search for verified members?
@@ -160,7 +160,6 @@ const VerifiedMembersSelect: FC<VerifiedMembersSelectProps> = ({ | |||
'left-6 right-[1.9rem] w-auto': isMobile, | |||
})} | |||
showEmptyContent | |||
shouldReturnAddresses |
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 think this should return addresses, right?
I added 0x94CB46d05c2c88A7A053632865634a19Ba4C02fc
as a verified member, and when I search for it, it doesn't show up. If i remove the search term it does though.
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.
We might need to revisit this one @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.
🫠 Strange! If it's in the list of options, it should return before even checking if shouldReturnAddresses
is true or not (I also realise now that this name maybe isn't the most intuitive, when shouldReturnAddresses
is true: if there are no matches in the list and the search value is address, then return the search value is the expected behaviour). Will join you in taking a look at this on Monday!
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.
Okay I just rebased from master
and that seems to have fixed it. So something funny must've happened on master but got recently fixed or something 😅 @davecreaser @iamsamgibbs can I please ask you to try it again?
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.
Oh and @davecreaser we removed the shouldReturnAddresses
prop for the VerifiedMembersSelect
function because we don't want to show the unknown address item if it's not being returned from the search results. But only for the VerifiedMembersSelect
component!
23b6913
to
25b4650
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.
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.
Approving so you can merge. Nicely done!
Description
Just a good ol' combination of text and address truncation.
Testing
Important
1. Update amy's username
UserAccountPage/hooks.tsx
file and update line 31 to:QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ
2. Add a wallet address to the list of recippients
Verifying the truncation
Resolves #3679