mysociety / alaveteli

Provide a Freedom of Information request system for your jurisdiction
https://alaveteli.org
Other
389 stars 195 forks source link

Display more than 3 citations on a request page #7220

Open FOIMonkey opened 2 years ago

FOIMonkey commented 2 years ago

Currently, only the three most recent citations are displayed on a request page in the in the news section. We should make sure that all citations are visible where a request has been cited more than three times, ideally listed in the order they were added eg:

2022-08-12

displays as

2022-08-12 (1)

confirmordeny commented 2 years ago

Here is another request which has more than three citations: https://www.whatdotheyknow.com/request/precedent_book_most_recent_versi

FOIMonkey commented 2 years ago

https://www.whatdotheyknow.com/request/dispensations_2 has 7 citations (including 4 major news outlets).

citations

confirmordeny commented 2 years ago

Here is another request with more than three citations: https://www.whatdotheyknow.com/request/the_national_youth_theatres_canc

garethrees commented 2 years ago

Just linking this to the original concept (https://github.com/mysociety/alaveteli/issues/5483#issue-531097389). We did plan to have a way of displaying more, but ran out of time.

FOIMonkey commented 2 years ago

If @citations = @info_request.citations.newest(3) is to blame, I wonder if anything would break if that was increased...

garethrees commented 2 years ago

3 in the sidebar is intentional – more would make it get too long.

FOIMonkey commented 2 years ago

I don't think 5 would be too long FWIW. So showing more than three in the sidebar would probably need something like a page listing all of the citations that we could point to, so not three in the sidebar at all.

FOIMonkey commented 2 years ago

Although, in a case of citations taking up too much real estate, we could always trim the "requests like this" section down to 3-5. Citations are directly linked to the request, therefore likely to be of use/interest, whereas the similar requests could be linked, but might not be at all.

confirmordeny commented 2 years ago

There are quite a lot of news sites that reference this request: https://www.whatdotheyknow.com/request/pencil

mdeuk commented 2 years ago

There are quite a lot of news sites that reference this request: https://www.whatdotheyknow.com/request/pencil

… and what an excellent response it is too, given that "election security" is always a hot topic.

I'm reminded of https://github.com/mysociety/alaveteli/issues/5573 - I wonder if implementing the suggestion from our user on that ticket would be a good way to resolve the challenge that this ticket poses?

garethrees commented 2 years ago

Wonder if we could do some sort of geared calculation – by default show 10 similar, 0 citations; then as citations increase, show fewer similar, with a limit of 7:3 or something. Shouldn't be too difficult to calculate.

garethrees commented 2 years ago

I'm reminded of https://github.com/mysociety/alaveteli/issues/5573

That's much harder than this :)

HelenWDTK commented 1 year ago

Had a play to see what pagination might look like, by doing:

@citations = @info_request.citations.newest.paginate(page: params[:page], per_page: 3)

Screenshot 2023-04-15 at 13 24 21

Would need to figure out where to put the new citation link, as it looks a bit lost. Also, I suspect the pagination controls won't fit on one line if lots of citations are added, so that would need thinking about.

FOIMonkey commented 1 year ago

+1 Another example with more than 3 citations: https://www.whatdotheyknow.com/request/post_office_investigations_compl