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

[CAPE] New layout for council page #521

Closed lucascumsille closed 1 year ago

lucascumsille commented 1 year ago

Fixes: https://github.com/mysociety/caps/issues/420

It also fixes a mobile bug with the emissions chart:

Screenshot 2023-06-01 at 07 46 14

PREVIEW:

Summary page

https://github.com/mysociety/caps/assets/13790153/4a114733-64fc-4581-9cbd-c96780d13dd0

Declaration & Pledges

Screenshot 2023-05-31 at 10 59 13

Scorecards

Screenshot 2023-05-31 at 11 03 30

Emissions

https://github.com/mysociety/caps/assets/13790153/3eb7bd14-e7f5-4972-8bc6-005a89fa4519

Emissions with no Projects

Screenshot 2023-05-31 at 11 08 40

Climate Documents

Screenshot 2023-05-31 at 11 03 42

Similar councils

Screenshot 2023-05-31 at 11 03 52

Mobile

https://github.com/mysociety/caps/assets/13790153/196492bd-9b16-49a5-ae47-02c9055ef41c

Mobile emissions chart

https://github.com/mysociety/caps/assets/13790153/e2c44543-aaa6-4f5c-9275-d6f06992fcd1

@zarino a few weeks ago I showed you that I was having issues with the emissions chart not being displayed correctly, presumably because the when loading the page the chart was hidden. I added fix to that, instead of being display none, I moved it out of the picture with position absolute. That seemed to work in Chrome and Firefox, not sure if it the most elegant solution.

I also added some extra CSS for the mobile version of the content navbar. Let me know what you think

lucascumsille commented 1 year ago

@zarino I forgot to ask you want me to include this section somewhere?

Screenshot 2023-06-01 at 08 24 59
zarino commented 1 year ago

@lucascumsille Yes, we should keep that. I wonder whether maybe we just include it at the bottom of the page, and keep it visible no matter which tab/section of the page is currently active?

lucascumsille commented 1 year ago

@zarino That make sense it won't be districting by doing so. I'll include it then.

lucascumsille commented 1 year ago

I just added a commit that makes the survey visible in every page. This is how it looks like:

Screenshot 2023-06-01 at 15 05 37
ajparsons commented 1 year ago

Having a quick look at this. Good bit is the side navigation fits nicely, but the problems I see are:

Solution:

So something like this:

image

image

Given most of this is django mechanics and writing content, if that's roughly the right direction, I can take a pass at adapting this PR in that direction. Let me know @zarino

zarino commented 1 year ago

As I just mentioned in https://github.com/mysociety/caps/issues/420, I agree with a lot of what @ajparsons says here. (Which is why I’ve not got round to "reviewing" this PR yet, because I knew a bunch of things—like the JS nav / deep linking, and rebase—would take a while to fix.)

@ajparsons let’s have a chat today, if you’re free, about how we can move this forward.

ajparsons commented 1 year ago

I've made my changes and content additions.

Changes:

What needs a look at:

image image image image

ajparsons commented 1 year ago

@zarino : this should contain all the fixes we've discussed!