snapshot-labs / sx-monorepo

Snapshot monorepo
https://snapshot.box
MIT License
13 stars 11 forks source link

feat: load leaderboard data for offchain spaces #479

Closed wa0x6e closed 2 months ago

wa0x6e commented 2 months ago

Summary

This PR enable the leaderboard for offchain spaces, to be on par with the existing leaderboard feature on onchain spaces.

Will also add offchain spaces activities on user profile page

Changes

How to test

Leaderboard

  1. Go to http://localhost:8080/#/s:safe.eth/leaderboard
  2. The "Leaderboard" link should appear in the sidebar
  3. The leaderboard should show the space leaderboard
  4. You can sort by proposals/votes count
  5. It should load next pages with infinite scroll

localhost_8080_

User profile

  1. Go to http://localhost:8080/#/profile/0x91FD2c8d24767db4Ece7069AA27832ffaf8590f3
  2. It should load activities from both offchain and onchain spaces

localhost_8080_

bonustrack commented 2 months ago

Some address appear twice, also the percentage for votes seem wrong, on Safe space, 33 votes should mean 100% since there been only 33 proposals

image

Or

image
wa0x6e commented 2 months ago

Some address appear twice, also the percentage for votes seem wrong, on Safe space, 33 votes should mean 100% since there been only 33 proposals image Or image

I am aware, we have the exact same issue on sx spaces also. See https://github.com/snapshot-labs/sx-monorepo/issues/480

wa0x6e commented 2 months ago

Some address appear twice, also the percentage for votes seem wrong, on Safe space, 33 votes should mean 100% since there been only 33 proposals image Or image

I am aware, we have the exact same issue on sx spaces also. See #480

There are 20k votes on safe space, vote percentage is relative to total number of votes, not number of proposals

bonustrack commented 2 months ago

@wa0x6e It should be relative to the number of proposal, this is to get the participation rate, % of all vote is not much relevant insight

wa0x6e commented 2 months ago

Update PR description to include User profile page update