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

[Proposals] Vote result / deposit result #74

Open
11 of 15 tasks
mitchellchou opened this issue May 30, 2022 · 15 comments
Open
11 of 15 tasks

[Proposals] Vote result / deposit result #74

mitchellchou opened this issue May 30, 2022 · 15 comments

Comments

@mitchellchou
Copy link

mitchellchou commented May 30, 2022

As a dao participant, I want to know what's the current or final results of a proposal and who and how others participated so that I can have sufficient info to make any decision (e.g. stake in someone)

Acceptance criteria

Positive

  • I can see the latest or final result of the proposal
  • Can sort by "VOTER"'s name/address or their "OPTION"
  • I can click the address or validators and visit the profile page or validators page
  • Click "Remind to vote" button and "mailto:" the delegated validators of mine who have not voted yet
  • Votes tab is the default tab when visiting the page

Negative

  • Don't show "Votes" tab when it's still in the deposit period
  • Disabled "Remind to vote" when can't fetch its Email, even if it's not voted yet. > and show toast Contact information for this validator is not available
  • When not connected, don't show delegated validators

General

  • Support RWD
  • Support pagination (page size = 5)

Screen behaviors

General

  • There are Votes tab and Deposit tab
  • Separately list out the delegated validators of the user

Votes tab

  • For delegated validators of mine who have not voted yet, show a "Remind to vote" button

Deposit tab

  • No "Option" field but "Deposit" field showing the deposit amount from each address
  • Don't have "Remind to vote" button

Content

Votes tab

  1. Stacked bar chart: Votes results
  2. Total: The total like in this proposal
  3. Turnout
  4. Quorum
  5. Threshold (not in the figms but should have)
  6. VOTER
  7. OPTION
  8. Their option
  9. Not voted yet

Deposit tab

  1. Deposit results as a stacked bar chart: only 2 portion
  2. Total/Min deposit (will reach 100% if deposit pass)
  3. Remaining/MIn deposit
  4. Total: The total like deposit in this proposal
  5. Turnout: current
  6. Min Deposit
  7. VOTER
  8. DEPOSIT:
  9. their deposit amount
  10. Not deposited yet

Sorting

  1. Default sort by latest voting_time / deposit time
  2. Click "VOTER" and sort by alphabetical order
  3. Click "OPTION" and sort by alphabetical order(i.e. Yes, No...)
  4. Click "Deposit" and sort by the amount

UI

Figma
image.png
image.png

Ref

@hochiw
Copy link
Contributor

hochiw commented Jun 10, 2022

@mitchellchou would like to double confirm delegated validators are always at the top of the list? have we confirmed how the validators should be sorted yet?

@mitchellchou
Copy link
Author

@mitchellchou would like to double confirm delegated validators are always at the top of the list? have we confirmed how the validators should be sorted yet?

@hochiw

  1. Yes, delegated validators are always at the top of the list
  2. Added sorting logic in description 🙏

@hochiw hochiw self-assigned this Jun 21, 2022
@hochiw
Copy link
Contributor

hochiw commented Jun 24, 2022

@mitchellchou forgot to ask if the delegated validators are part of the pagination? so if I have 7 delegated validators then

first page: 5 delegated validators
second page: 2 delegated validators + 3 votes
third page and onward: 5 votes

@mitchellchou
Copy link
Author

@hochiw LGTM🙏

@hochiw
Copy link
Contributor

hochiw commented Jun 24, 2022

sad

@mitchellchou
Copy link
Author

mitchellchou commented Jul 21, 2022

@Rico-Wong
Does moniker & avatar & securitycontact also come from keybase.io ?
image.png

Expected results

  1. Validators should have moniker
  2. validators should have avatar
  3. should have "remind to vote" button

(this is not urgent, let's open another issue to track if it's an confirmed issue)

@hochiw
Copy link
Contributor

hochiw commented Jul 21, 2022

@mitchellchou

Moniker and securitycontact comes from rpc/bdjuno and avatar comes from bdjuno/keybase

Validators should have moniker

This should be an issue as I can see moniker present for the validators in db

validators should have avatar

It's a bit awkward here since we get validator from bdjuno for this page but from rpc for the other pages
so we can either

  1. Change validator detail and your stake to get some of the information from bdjuno along with other information from rpc
  2. Keep the current implementation and add a keybase api client for the avatar (Fetch validator avatar URL from keybase #282 )

I think we can display avatar here first, but would the design be similar to Your stake? as the original design doesn't have avatar displayed

should have "remind to vote" button

Unfortunately most of the validators don't have their security contact filled in so this button is highly unlikely to be displayed, but it's implemented.

@mitchellchou
Copy link
Author

@hochiw oh my bad, no need avatar here
Please help with the missing moniker🙏

@hochiw
Copy link
Contributor

hochiw commented Jul 22, 2022

It seems like this has the same issue as mainnet

Validator description info wasn't inserted to the database likely due to the state being pruned, as I was able to see the moniker for those whose validator description is present on the db

I tried running bdjuno locally on testnet and watched until the height when Faseng/Chima were created: block 309 and I got this

ERR error while handling message err="error while refreshing validator from MsgCreateValidator: error while getting validator: rpc error: code = NotFound desc = validator cosmosvaloper1hgwvq3txyfux7uhl44qxdtx9f2qplau302ktu8 not found" height=309 module=staking msg_type=cosmos.staking.v1beta1.MsgCreateValidator tx_hash=935B5B2854582331FDF077B2866187339EB981D91A9BE8EEFFBBFD1E99D6E92D

further testing on cli got me this

$ liked q staking validator cosmosvaloper1hgwvq3txyfux7uhl44qxdtx9f2qplau302ktu8 --node tcp://20.205.224.107:26657
commission:
  commission_rates:
    max_change_rate: "0.050000000000000000"
    max_rate: "0.500000000000000000"
    rate: "0.100000000000000000"
  update_time: "2022-04-04T09:38:52.429969421Z"
consensus_pubkey:
  '@type': /cosmos.crypto.ed25519.PubKey
  key: AjOaCWfPf41i1og4ByRE8sG1W5gOziGJnh9MCy+hek0=
delegator_shares: "90000000306000000000.000000000000000000"
description:
  details: ""
  identity: ""
  moniker: Oursky Faseng
  security_contact: ""
  website: ""
jailed: false
min_self_delegation: "500000000000"
operator_address: likevaloper1hgwvq3txyfux7uhl44qxdtx9f2qplau30dgzru
status: BOND_STATUS_BONDED
tokens: "90000000306000000000"
unbonding_height: "0"
unbonding_time: "1970-01-01T00:00:00Z"

$ liked q staking validator cosmosvaloper1hgwvq3txyfux7uhl44qxdtx9f2qplau302ktu8 --node tcp://20.205.224.107:26657 --height 309
Error: rpc error: code = NotFound desc = rpc error: code = NotFound desc = validator likevaloper1hgwvq3txyfux7uhl44qxdtx9f2qplau30dgzru not found: key not found

@hochiw
Copy link
Contributor

hochiw commented Jul 22, 2022

Disabled "Remind to vote" when can't fetch its Email, even if it's not voted yet. > and show toast Contact information for this validator is not available

Seems I missed this, will handle

@hochiw
Copy link
Contributor

hochiw commented Jul 23, 2022

Maybe let me append the description data to the db manually since there aren't too many

@hochiw
Copy link
Contributor

hochiw commented Jul 23, 2022

nvm there are 28 validators without basic information

@hochiw
Copy link
Contributor

hochiw commented Jul 23, 2022

and show toast Contact information for this validator is not available

@mitchellchou would it be better to show a tooltip here

@hochiw
Copy link
Contributor

hochiw commented Jul 23, 2022

Screenshot 2022-07-23 at 2.52.22 PM.png

hochiw added a commit to hochiw/likedao that referenced this issue Jul 23, 2022
hochiw added a commit to hochiw/likedao that referenced this issue Jul 23, 2022
hochiw added a commit to hochiw/likedao that referenced this issue Jul 23, 2022
@hochiw
Copy link
Contributor

hochiw commented Jul 24, 2022

Will move back to Inbox after remind to vote tooltip is merged as moniker is blocked by bdjuno issue

hochiw added a commit to hochiw/likedao that referenced this issue Jul 25, 2022
hochiw added a commit to hochiw/likedao that referenced this issue Jul 25, 2022
hochiw added a commit to hochiw/likedao that referenced this issue Jul 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants