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

Michael/agora 1686 copy addresses when clicking on 0x5f4 shorten addresses UI #246

Conversation

mcgingras
Copy link
Collaborator

@mcgingras mcgingras commented Apr 22, 2024

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

  • Added copyable feature to addresses in DelegateProfileImage
  • Updated click interactions in VStack and HStack components
  • Introduced CopyableHumanAddress component for address copying with visual feedback

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

vercel bot commented Apr 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
agora-next ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 23, 2024 5:03pm
agora-next-ens ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 23, 2024 5:03pm
agora-next-etherfi ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 23, 2024 5:03pm

Copy link
Contributor

Choose a reason for hiding this comment

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

❤️

@mcgingras
Copy link
Collaborator Author

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;
Copy link
Collaborator Author

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!

Copy link
Contributor

@yitongzhang yitongzhang Apr 22, 2024

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)

@yitongzhang
Copy link
Contributor

CleanShot 2024-04-22 at 16 45 00@2x
my only feedback is that this icon is a little thin! does hero icons have a thicker version? if not feel free to grab a thicker one as an svg here: https://www.figma.com/file/KgDS03VEYPclv3l7lJ3Sfm/Agora-Icons?type=design&node-id=181%3A128951&mode=design&t=lnzGu9Gg45a2PNSP-1

Also i know our icon system is a bit of a mess! file it under the list of design system to dos

Copy link
Contributor

@andreitr andreitr left a 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

@mcgingras
Copy link
Collaborator Author

CleanShot 2024-04-22 at 16 45 00@2x my only feedback is that this icon is a little thin! does hero icons have a thicker version? if not feel free to grab a thicker one as an svg here: https://www.figma.com/file/KgDS03VEYPclv3l7lJ3Sfm/Agora-Icons?type=design&node-id=181%3A128951&mode=design&t=lnzGu9Gg45a2PNSP-1

Also i know our icon system is a bit of a mess! file it under the list of design system to dos

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!

@mcgingras mcgingras merged commit 7c9df42 into main Apr 23, 2024
6 checks passed
@mcgingras mcgingras deleted the michael/agora-1686-copy-addresses-when-clicking-on-0x5f4-shorten-addresses-ui branch April 23, 2024 22:22
kent pushed a commit that referenced this pull request Aug 30, 2024
…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
jefag pushed a commit that referenced this pull request Oct 4, 2024
…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
jefag pushed a commit that referenced this pull request Oct 4, 2024
…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
jefag pushed a commit that referenced this pull request Oct 8, 2024
…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
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.

4 participants