oursky / likedao

Apache License 2.0
1 stars 4 forks source link

[Proposals] Vote result / deposit result #74

Open mitchellchou opened 2 years ago

mitchellchou commented 2 years ago

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

Negative

General

Screen behaviors

General

Votes tab

Deposit tab

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
    1. Their option
    2. Not voted yet

Deposit tab

  1. Deposit results as a stacked bar chart: only 2 portion
    1. Total/Min deposit (will reach 100% if deposit pass)
    2. Remaining/MIn deposit
  2. Total: The total like deposit in this proposal
  3. Turnout: current
  4. Min Deposit
  5. VOTER
  6. DEPOSIT:
    1. their deposit amount
    2. 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 commented 2 years ago

@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 commented 2 years ago

@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 commented 2 years ago

@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 commented 2 years ago

@hochiw LGTM🙏

hochiw commented 2 years ago

sad

mitchellchou commented 2 years ago

@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 commented 2 years ago

@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 (#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 commented 2 years ago

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

hochiw commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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

hochiw commented 2 years ago

nvm there are 28 validators without basic information

hochiw commented 2 years ago

and show toast Contact information for this validator is not available

@mitchellchou would it be better to show a tooltip here

hochiw commented 2 years ago

Screenshot 2022-07-23 at 2.52.22 PM.png

hochiw commented 2 years ago

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