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

AGORA-1366/Port the HoverCard when hovering over a delegate on a vote table view #51

Conversation

wojtekwtf
Copy link
Collaborator

@wojtekwtf wojtekwtf commented Jan 11, 2024

This PR adds a HoverCard in the vote table view

Updated video (V3): https://www.loom.com/share/1ca36c1a70f44120905ddc4e9394f9fa

✅ Functionality matches preview version, includes the voting power, delegate button, and social media buttons

❓ It loads very slowly on my computer. fetchDelegate and fetchBalanceForDirectDelegation are taking a lot of time to display the delegate information and then to display the delegate button. Should i optimize it?

Copy link

linear bot commented Jan 11, 2024

Copy link

vercel bot commented Jan 11, 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 Jan 15, 2024 2:28pm

Copy link
Contributor

sweep-ai bot commented Jan 11, 2024

Apply Sweep Rules to your PR?

  • Apply: All new business logic should have corresponding unit tests.
  • Apply: Refactor large functions to be more modular.
  • Apply: Add docstrings to all functions and file headers.

This is an automated message generated by Sweep AI.

@yitongzhang
Copy link
Contributor

❓ Shadcn default view looks different than the previous Agora version. @kent @yitongzhang should i customize it to match the look or current version is fine?

Yes plz customize to look like current. Esp important that it hangs to the side so it doenst obscure other votes. thanks!

@wojtekwtf
Copy link
Collaborator Author

…card-when-hovering-over-a-delegate-on-a-vote
@kent
Copy link
Contributor

kent commented Jan 12, 2024

@wojtekwtf

CleanShot 2024-01-12 at 13 54 51@2x

Looks like Vercel's TS linter is more aggressive.

Copy link
Contributor

@kent kent left a comment

Choose a reason for hiding this comment

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

Comment out the things are slowing it down but overall the love the look and feel

fetchDelegateAndSet(address);
}, []);

return (
Copy link
Contributor

Choose a reason for hiding this comment

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

Love the look and feel. I would say comment out the supply calculation if that's what is taking too long, if it's the delegate statement, keep it! Love the look and feel.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated version: Now the delegate statement is loaded before the rest of the delegate information

You can see that the voting power and the delegate button still display with a delay, but its more snappy now than before

https://www.loom.com/share/1ca36c1a70f44120905ddc4e9394f9fa?sid=293f96f8-70f9-44b9-9037-95452ed3255d

@kent kent merged commit 23bf185 into main Jan 15, 2024
2 checks passed
@mcgingras mcgingras deleted the wojciechkulikowski/agora-1366-port-the-hovercard-when-hovering-over-a-delegate-on-a-vote branch May 2, 2024 17:44
kent pushed a commit that referenced this pull request Aug 30, 2024
… table view (#51)

* MVP of the hover card

* Remove unused code

* Add imports

* Use Link next compontent

* Rename VoterCard to VoterHoverCard

* Remove the changes to delegate list

* Fix fetchBalanceForDirectDelegation import

* Move the hover to the left

* Add the skeleton

* Add missing fetching function

* Load the statement before the full delegate object
jefag pushed a commit that referenced this pull request Oct 4, 2024
… table view (#51)

* MVP of the hover card

* Remove unused code

* Add imports

* Use Link next compontent

* Rename VoterCard to VoterHoverCard

* Remove the changes to delegate list

* Fix fetchBalanceForDirectDelegation import

* Move the hover to the left

* Add the skeleton

* Add missing fetching function

* Load the statement before the full delegate object
jefag pushed a commit that referenced this pull request Oct 4, 2024
… table view (#51)

* MVP of the hover card

* Remove unused code

* Add imports

* Use Link next compontent

* Rename VoterCard to VoterHoverCard

* Remove the changes to delegate list

* Fix fetchBalanceForDirectDelegation import

* Move the hover to the left

* Add the skeleton

* Add missing fetching function

* Load the statement before the full delegate object
jefag pushed a commit that referenced this pull request Oct 8, 2024
… table view (#51)

* MVP of the hover card

* Remove unused code

* Add imports

* Use Link next compontent

* Rename VoterCard to VoterHoverCard

* Remove the changes to delegate list

* Fix fetchBalanceForDirectDelegation import

* Move the hover to the left

* Add the skeleton

* Add missing fetching function

* Load the statement before the full delegate object
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.

3 participants