-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP Highlight people on homepage #5351
base: master
Are you sure you want to change the base?
Conversation
a83f7f6
to
f66fa8c
Compare
Currently looks like this: @chrismytton – Note the incorrect page header – "Estonia"!?!? @tmtmtmtm – I have a feeling you'll want to pick new wording for the subheading I've added. /cc @MyfanwyNixon |
Haha, yes my fault, I set the country so the image_proxy_url helper would work. I'll fix that. |
f66fa8c
to
d2fac49
Compare
@zarino I've rebased this onto master, so you'll need to to a hard reset if you want to make further changes:
|
I'd prefer: The world's richest open dataset on politicians |
Yay. Generally looking great. I think we might need to explain better what this section is though, or find a way to integrate it better with the page as a whole. Could probably do with something to make it obvious that the four featured sections are far from all we have. We'll also want to change the legislative info section — now that it's being shown in a different context, it'll need to make sense there. Switching the constituency to the country would probably be a good first step (then we can also use that to link through to them actually in context too). Though we probably something to show dates or similar as well would be useful — especially if we pick people with a long political history. (Hmmm… actually this makes me realise that we probably want a 'History' tab RSN on the term page too, so that you can see which earlier / later terms the person was also part of…) |
If we're going to make the claim of 'richest dataset', might also be nice to give an indication of scale somewhere. (We're currently at 2.6 million pieces of data — more if we include the 'positions' stuff that's still just in the 'unstable' section) |
|
Jinx! |
2.6 makes it sound much more scientific ;-) |
@zarino - no arguments from me, I was just future-proofing :) |
If only we were capable of using technology to count them so the number could be automatically up to date at all times… ;) |
Is that data being exposed anywhere that we can pull it from? Would certainly be good if that number was automatically kept up to date! |
{
"lang": "bar",
"name": "Aadu Must",
"note": "multilingual"
}, as three statements. |
I've added a |
This logic is a bit involved at the moment but can hopefully be cleaned up by pushing some of it into everypolitician-popolo. In the meantime moving it into this helper hides most of the complexity from the route handler.
At the moment they are hard-coded in app.rb but they could potentially be moved out to a config file.
32b9cc0
to
aefb344
Compare
This handles getting people and their memberships out of the popolo and restructuring them for the templates. This code could be much nicer with a few changes to everypolitician-popolo. In particular it would be nice if that lib handled filtering by term. Other useful things would be if it always defined methods so that you could call methods without needing to know if they existed on the target person.
I was hoping this would be mostly finished today but rawgit being down derailed me somewhat. Anyway, this is nearly there now, but still needs a bit of work so that the people on the homepage don't get all of the terms that they've been in listed as memberships. The people are read from |
This 3 featured person cards to the homepage. It needs @zarino to come in and make it pretty now.
This is what it looks like if I fiddle the CSS to show all the info on a person card:
Fixes #5263