liquidvotingio / decidim-module-liquidvoting

GNU Affero General Public License v3.0
4 stars 0 forks source link

Communicate to a user they are a delegate #56

Open davefrey opened 3 years ago

davefrey commented 3 years ago

See this discussion

A user presented with a Support/Delegate button for a Proposal should know if they are supporting/delegating only their own vote, or also on behalf of other(s) who have delegated to them.

There is a nuance here: when we present the user's "weight", we can speak of "direct" delegations (those delegations naming the user directly), or "full" delegations (considers not only the direct delegations, but all of the upstream delegations that resolve to the user).

If A and B both delegate to C, and C delegate to D, then using this language we can say D has a direct weight of 2 (C + D themself), or a full weight of 4 (we count A and B as well).

Direct is easier to calculate; full means reducing a graph of delegations from a relational store. For the user the semantics of the two may be different, and they may want to know just one or both.

This may be a feature to hide behind a config point.

This arguably should be presented only when non-zero.

jinjagit commented 3 years ago

Currently, we calculate a delegate's voting weight when/if the delegate votes. To implement this feature, however, we need to be able to get this weight (and more granular numbers, if we include the 'direct' vs 'indirect' delegations counts idea of Dave's), without waiting for a user to vote.

Thus, a good first step is probably to develop the core functions + absinthe queries needed to return the desired delegation-related values, in our API (see #252)