liquidvotingio / decidim-module-liquidvoting

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

Improve view session logic #19

Closed jinjagit closed 3 years ago

jinjagit commented 3 years ago

Continuing work on #9

Check for delegated_to session parameter. If not found, then set to appropriate value (if relevant delegation exists), or set to 'none'. Involves querying the api db for a list of delegations, in order to set the appropriate value for delegated_to.

In future, we may wish to develop a new absinthe query of delegations, where we can search using delegate email and proposal URL to return a single delegation (if found), rather than simply getting a list of all delegations (as in the present solution).

jinjagit commented 3 years ago

Reviewers, please note: I just removed a stray debug comment, as it was somewhat misleading. Thanks.

davefrey commented 3 years ago

Also this delegations filtering is a hack that won't scale. If the current api doesn't allow us to give parameters like delegator_email and proposal_url in our graphql queries, we need to add that! (in another issue)

jinjagit commented 3 years ago

Also this delegations filtering is a hack that won't scale. If the current api doesn't allow us to give parameters like delegator_email and proposal_url in our graphql queries, we need to add that! (in another issue)

Agree. See my initial comment in this PR. Main issue here is prioritizing when to do this.

jinjagit commented 3 years ago

I have included all of @davefrey's suggested changes.

I have also created issue #163 to address the need for a specific absinthe query to facilitate the delegations filtering mentioned in preceding comments.

jinjagit commented 3 years ago

Summary of progress:

I think I have satisfied all suggested changes, except regarding my 2 remaining doubts:

EDIT: Now answered. All suggested changes are included.