mysociety / yournextrepresentative

A website for crowd-sourcing structured election candidate data
https://candidates.democracyclub.org.uk/
GNU Affero General Public License v3.0
56 stars 21 forks source link

Party lists should be truncated #804

Closed andylolz closed 8 years ago

andylolz commented 8 years ago

UPDATE: as @wfdd points out, the code actually works correctly. It’s just a case of updating default_party_list_members_to_show.

This API response suggests Welsh Assembly lists should be truncated to 3 candidates, but that doesn’t seem to happen. For instance: screen shot 2016-04-07 at 10 14 00 (screenshot from here)

DemocracyClub/yournextrepresentative#13 is related, but I don’t think it fixes the problem.

wfdd commented 8 years ago

That's the wrong election in the API link, it should be https://candidates.democracyclub.org.uk/api/v0.9/elections/naw.r.2016-05-05/, which has no limit on members to show.

jf1 commented 8 years ago

Similar on the website, eg for London Assembly additional members https://candidates.democracyclub.org.uk/election/gla.a.2016-05-05/post/unit_id:41441/assembly-member

Text says: Showing the top candidates. Then has a link to: See all 11 members on the party list » But it always shows all members, so "showing top candidates" isn't accurate and the link isn't needed.

The page shows 120 candidates from 12 parties so reducing this to eg the first three from each party makes sense. Is it possible to auto-hide candidates 4+ from each party and put a 'show more' link where the fourth candidate would be, ie so this page is shorter to scroll though and all candidates can be seen on this page by clicking to expand instead of having to go to the post's party page.

image

"Showing the top..." and "see all..." are shown even when there's only one candidate: image

andylolz commented 8 years ago

@wfdd you’re absolutely right! Thanks! This is not a bug. The API entry for the Scottish Parliament Election (Regions) shows default_party_list_members_to_show is set to 3, and it works: screen shot 2016-04-07 at 11 08 35 https://candidates.democracyclub.org.uk/areas/SPC-gss:S16000117,SPE-gss:S17000010,WMC-gss:S14000029

So the problem here is just to do with setting the default_party_list_members_to_show values to something nice.

andylolz commented 8 years ago

@jf1:

But it always shows all members, so "showing top candidates" isn't accurate and the link isn't needed.

This bit should be fixed by DemocracyClub/yournextrepresentative#13. The rest should be fixed by setting default_party_list_members_to_show for each list election to something like 3. Totally agree – these pages are vv long at the moment, so truncating would be great.

jf1 commented 8 years ago

Totally agree – these pages are vv long at the moment, so truncating would be great.

@andylolz thanks. As "top" isn't definitive I'd also suggest changing the text to "Showing the top X of Y candidates" or if X = Y then use "all" instead of "the top X of" so it becomes "Showing all Y candidates"

Scottish Parliament Election (Regions)... is set to 3, and it works

Indeed it does, but I'm not sure why there's a candidate number 7 when there are only 2 in their list. Don't think this is something I can edit either. https://candidates.democracyclub.org.uk/election/sp.r.2016-05-05/party-list/gss:S17000009/party:53 image

andylolz commented 8 years ago

@jf1:

but I'm not sure why there's a candidate number 7 when there are only 2 in their list.

Yeah – I spotted that too! I’ve opened a a ticket for it here: #805.

wfdd commented 8 years ago

@jf1: When DemocracyClub/yournextrepresentative#13 is merged, it will say 'See just this party list' when the list's not truncated.

wfdd commented 8 years ago

@andylolz @jf1

There's two more issues with 'top' that I can see:

I suggest shortening it to:

Showing x of y candidates on the party list. See all »

andylolz commented 8 years ago

@wfdd:

  • it might be misconstrued to mean top in views or popularity or something else
  • it's deceptive when our data's incomplete, like in #805

Yep – I agree on both those issues.

It’s worth noting: I suppose the idea behind saying “top” is that this is an ordered list. “x of y candidates” doesn’t really capture this.

wfdd commented 8 years ago

@andylolz

Okay, I suppose we could just say that?

This list is sorted firstly by position on party list and secondly alphabetically.

We don't need to repeat that under each party; just once at the top will do:

{% if party_lists_in_use %}
  <p>This list is sorted firstly by position on party list and secondly alphabetically.</p>
{% endif %}

It should be obvious the list's alphabetised when party lists are not in use, hence the if-clause.

... Wait, is it actually in alphabetical order?

jf1 commented 8 years ago

Showing X of Y known candidates would address "it's deceptive when our data's incomplete" concern.

"Showing the top X of Y..." would be useful and apt for ordered party lists.

Sorting seems ok when there's a party position, but I've not noticed any alphabetical sorting on any other lists, and these three candidates definitely aren't sorted alphabetically: https://candidates.democracyclub.org.uk/election/local.bristol.2016-05-05/post/UTW:E05010886/avonmouth-and-lawrence-weston-ward

image

wfdd commented 8 years ago

@jf1

Showing X of Y known candidates would address "it's deceptive when our data's incomplete" concern.

Sorry, I should've been clearer; I meant if their position on the party list is not known.

"Showing the top X of Y..." would be useful and apt for ordered party lists.

How about using 'first' instead of 'top'?

jf1 commented 8 years ago

First is good, but having considered it further I don't feel there's a need for either first or top if the lists are well sorted - it'll become obvious to users that they're seeing the top/first selection.

Thanks for the clarification on incompleteness. I still feel it's ok to show the candidates who's list position is known above the other (alpha sorted "?") candidates, and if the page doesn't say top or first then there's no issue - "X of Y known candidates" always works and "known" can be dropped once the SOPN has been uploaded.

mhl commented 8 years ago

I've set default_party_list_members_to_show to 3 for the Welsh regions and London additional members.

mhl commented 8 years ago

I believe this should be closed now; if I've misread / misunderstood, please open new tickets for the things I've missed!