mysociety / caps

A simple, open database of local government climate action plan documents and emissions data.
https://cape.mysociety.org
Other
9 stars 2 forks source link

Homepage layout and new advanced filters #697

Closed lucascumsille closed 1 week ago

lucascumsille commented 1 month ago

Fixes: https://github.com/mysociety/caps/issues/611 Fixes: https://github.com/mysociety/caps/issues/694

https://github.com/user-attachments/assets/a4833ee6-d1cc-45e3-a69b-40f4e83da7be

lucascumsille commented 3 weeks ago

Hey @zarino a few notes:

Let me know if you have any feedback =)

zarino commented 3 weeks ago

Thanks @lucascumsille. While this resolves the requirements in #694 (and would eventually resolve #611 too) I wonder whether we’re just over-complicating everything.

2-proposed-cropped

When I look at the homepage, as it stands in this PR, my eye is darting all over the place – there’s a sea of different buttons and boxes and labels and headers and form elements and borders. Sometimes a purple roundrect means "this option is selected", sometimes it means "submit the changes in this form". And four of the main controls on the page (the council type buttons – CE UK splits all of their analysis by these types, and councils can’t be compared across these types, so they feel philosophically quite different to the other more ephemeral filters) are counter-intuitively some of the smallest controls on the page, hidden in the middle of a whole bunch of other identical buttons and form elements.

Now, I can see how we’ve got to this point. The requirements for this page have grown organically over time, and each time CE UK requests that we emphasise one bit over the others just a little bit more, we make a few more tweaks, add a few more boxes, another competing splash of colour… it’s an arms race.

I do wonder whether, actually, this is the point at which we have an opportunity to simplify rather than complicate.

So, getting back to basics, what do I think works about where we’ve got so far?

What am I not so sure about?

Rather than just complaining, I figured I’d try resolving these things. 🤣 I’m not saying this is perfect, but maybe it’ll do a better job of explaining what I mean by "simplify things".

3-simplified-cropped

I’ll explain my thinking here:

I admit, this is pretty radical. I’m sure there are edge-cases I’ve not handled. But hopefully it shows there’s another way to approach this problem. Happy to discuss tomorrow!

lucascumsille commented 3 weeks ago

Thanks @zarino I like it, my only concern is that is for people that use or would like to use the advanced filters is not very encouraging. I don't think we have the data to know if people would use it or not, because in the current state, using the advanced filters is a bit of a pain. With you version I would:

Let me know what you think. I think we should show it to CEUK first, in case they have an option regarding the advanced filters, the thread is here.

zarino commented 3 weeks ago
  • If an advanced filter has been applied then we display the advanced filter section when the page reloads, that way if the user want to continue playing with the filters, they don't need to be reopening the modal. I think I would replace the modal and have it as a drawer below the nation.
  • Make obvious which advanced filter are active.

Yeah, I was toying with the idea of doing something like this, where, once a second filter has been applied ("Region: London" in this case), we break each filter group onto its own separate, labelled line:

Screenshot 2024-10-31 at 09-36-43 Northern Ireland Councils’ Climate Action Scorecards Climate Emergency UK

I haven’t actually tried it out in real life, though, so don’t know whether it’d feel a bit clunky. I expect there are other alternative solutions.

lucascumsille commented 3 weeks ago

I think I would stick to select elements for advanced filters, listing them like that just seems unnecessary. That way we also would have space to display the rest of the filters, avoiding the need to reopen the filters if they want to add a new group.

lucascumsille commented 1 week ago

Replaced by: https://github.com/mysociety/caps/pull/706