-
Notifications
You must be signed in to change notification settings - Fork 17
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
Michael/agora 1686 copy addresses when clicking on 0x5f4 shorten addresses UI #246
Michael/agora 1686 copy addresses when clicking on 0x5f4 shorten addresses UI #246
Conversation
…delegate address on delegate card.
…is copy-to-clipboard ready.
…ity on voter page
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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 I'm getting prettier errors which is causing the failed builds... I'll figure out how to get it such that my code is formatting correctly on save. I have a new computer so it's currently not set up 100% yet. |
@@ -21,6 +21,7 @@ type Props = { | |||
| "items-start" | |||
| "items-end" | |||
| "items-baseline"; | |||
onClick?: (e?: any) => void; |
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 found myself wanting to add onClick to an HStack
and was about to wrap it in a div so I could add an onClick to the div wrapping it. But then I figured the HStack
is just a div itself... theres no reason it shouldn't just accept an onClick prop. So I'm adding it here... if we don't like this I can take it out!
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.
lol i've been here a thousand times. i've been out of the code base long enough that i've forgotten we don't have a click handler on stack. guess it's to keep it to a positioning only thing
(please don't mind anything i say on this tho, i'm just a tourist in eng lol)
Also i know our icon system is a bit of a mess! file it under the list of design system to dos |
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.
Before I looked at the code, I couldn't figure out that the address was copyable :) My vote would be to make the icon visible. As for the code—solid work! Congrats on your first commit, Michael
I don't think heroicons have a thicker icon, they have a solid, filled icon set but I wasn't a big fan of the solid filled clipboard icon. I can try one of yours though, thanks for the link! |
…esses UI (#246) * Adds improvement to copy delegate address to clipboard when clicking delegate address on delegate card. * Adds CopyableHumanAddress which shows a human readable address which is copy-to-clipboard ready. * Adds copyable flag to DelegateProfileImage to prevent copy functionality on voter page * Runs prettier on AGORA-1686 code changes * Fixes vercel build issue on copy-pasteable delegate branch * Adds thicker clipboard icon
…esses UI (#246) * Adds improvement to copy delegate address to clipboard when clicking delegate address on delegate card. * Adds CopyableHumanAddress which shows a human readable address which is copy-to-clipboard ready. * Adds copyable flag to DelegateProfileImage to prevent copy functionality on voter page * Runs prettier on AGORA-1686 code changes * Fixes vercel build issue on copy-pasteable delegate branch * Adds thicker clipboard icon
…esses UI (#246) * Adds improvement to copy delegate address to clipboard when clicking delegate address on delegate card. * Adds CopyableHumanAddress which shows a human readable address which is copy-to-clipboard ready. * Adds copyable flag to DelegateProfileImage to prevent copy functionality on voter page * Runs prettier on AGORA-1686 code changes * Fixes vercel build issue on copy-pasteable delegate branch * Adds thicker clipboard icon
…esses UI (#246) * Adds improvement to copy delegate address to clipboard when clicking delegate address on delegate card. * Adds CopyableHumanAddress which shows a human readable address which is copy-to-clipboard ready. * Adds copyable flag to DelegateProfileImage to prevent copy functionality on voter page * Runs prettier on AGORA-1686 code changes * Fixes vercel build issue on copy-pasteable delegate branch * Adds thicker clipboard icon
resolves AGORA-1686.
I implemented two different approaches, as shown in the loom. I'm more of a fan of the second approach, since it offers better visual affordance that the address is copyable, but the first approach is more consistent with the behavior of clicking the discord icon to copy it.
I'm happy to go with either, just let me know!
PR-Codex overview
The focus of this PR is to enhance user experience by adding a copyable feature to addresses and improving click interactions in various components.
Detailed summary
copyable
feature to addresses inDelegateProfileImage
VStack
andHStack
componentsCopyableHumanAddress
component for address copying with visual feedback