mysociety / theyworkforyou

Keeping tabs on the UK's parliaments and assemblies
http://www.theyworkforyou.com/
Other
224 stars 50 forks source link

1689 announcement #1705

Closed lucascumsille closed 1 year ago

lucascumsille commented 1 year ago

Fixes: https://github.com/mysociety/theyworkforyou/issues/1689

BANNER NAV

A couple of observations: I moved it below the main navbar, because at the beginning I didn't notice where the banner was seating, it took me a bit to realise that it was on the top of the page, because it gets camouflaged with the browser bar(I use dark themes). I reduced the font size and increased the padding, so it looks like it has more breathing space and the text doesn't look too bold.

Option 1

option 1

Option 2

Option 2

Option 3

For option 3 I decided to move it to the top because, when using a button it looks more prominent.

Option 3

I can just drop commits so let me know which options you think would work better. Personally I prefer option 2, gives enough highlight to the banner content without disturbing the main navbar content and hero.

ajparsons commented 1 year ago

2 is good!

lucascumsille commented 1 year ago

@ajparsons the latest commit is for the featured blog below the hero section. But I need to add the "topics that might interest you" and also I'll ask for your help with enabling/testing this commit, because it has been a mix of editing the live version and adding the changes into the templates and CSS, so I'm not 100% sure it will work.

Screenshot 2023-04-19 at 10 33 42
ajparsons commented 1 year ago

To check we're on the same page:

The featured option that currently exists refers to a featured debate, rather than a arbitrary URL. I'll need to implement a new backend bit to talk to that front end (doesn't currently exist) - or at least a dummy one for the moment.

Going back to my original commit, I was talking about:

Image wise, which ones do you think you need?

lucascumsille commented 1 year ago

@ajparsons I think we will need the thumbnail size, instead of the large image.

ajparsons commented 1 year ago

I've added a temp json file based way of sourcing the information.

My path of least resistance approach in the long term would just be to store the json in the current banner storage in the database (will investigate that once the front end stuff is more finalised).

lucascumsille commented 1 year ago

@ajparsons The latest two commits add the sidebar featured content and the donation. Regarding the donation I have used the donation text from you Json file, but not sure if we want to be using that. I left a comment in the _donation.php

My reason to have them separate in the backend would be:

Let me know what you think =)

ajparsons commented 1 year ago

I was wondering about that.

Not sure if it's best to have multiple 'announcements' and be able to target them to multiple places with an extra line - or have a third option for sidebars.

Will have a think and a play with this the morning. Thanks so much for this!

lucascumsille commented 1 year ago

I was wondering about that.

Not sure if it's best to have multiple 'announcements' and be able to target them to multiple places with an extra line - or have a third option for sidebars.

Will have a think and a play with this the morning. Thanks so much for this!

No probs =) let me know if there is something else

ajparsons commented 1 year ago

So something's not quite working on the sidebar:

image

I think a few things that are already confusing:

lucascumsille commented 1 year ago

So something's not quite working on the sidebar:

image

I think a few things that are already confusing:

  • That little side menu is now too small to be noticed. I think that's ok because that was already true, and I'd like to move the summary page links to the top bar anyway.
  • But if we're doing that, and putting our content just below someone's face - I think we need a little separator just to say what it is. Mocked up a rubbish version above ('from mysociety'). Do you agree or is this not a problem?

Actually this reminds of Zarino's discovering( I think it was on the the Local hub) that some users didn't realise the list on the side bar was to browse content. Personally I prefer it on the side, because if you have a big list putting it on the top is a bit tricky, but not sure if that would be a possible scenario here.

I made a quick mock up. Our interactive colour in TWFY is green and hopefully the title will give users enough clues to about that section.

Screenshot 2023-04-24 at 07 04 05

Regarding the From mySociety I think it makes sense. Actually I would probably change it for mySociety logo.

Let me know what you think and I can add some commits to this.

ajparsons commented 1 year ago

Yes, that green bit is great. Also good point on the logo.

If it's easy enough to do - yes please, could you add a commit with those?

lucascumsille commented 1 year ago

@ajparsons I have added two commits. This is how it looks for me. Let me know if there is anything it needs changing =)

Screenshot 2023-04-24 at 13 13 08
ajparsons commented 1 year ago

This PR adds a more general announcement feature to TheyWorkForYou.

The three locations style content in slightly different ways:

The backend has been adapted to store JSON that stores details of multiple options. Format is shown here. Invalid Json throws an error (but is not checked against a specific schema):

Dev helpers:

For consistency with the script-to-rule-them-all approach elsewhere the 'script' directory as opposed to 'script', stores several useful management commands for use in dev. Currently this contains watch-css and `create-superuser'.

Other styling changes:

image

image

image

ajparsons commented 1 year ago

@lucascumsille : I'm happy with this, if you have a quick check of the images above to see if it seems as expected to you, and then I'll tidy up the history and get it ready for review?

lucascumsille commented 1 year ago

@lucascumsille : I'm happy with this, if you have a quick check of the images above to see if it seems as expected to you, and then I'll tidy up the history and get it ready for review?

Thanks @ajparsons. I think it fits the bill. I have included a new commit to decrease the size of the button for the top banner, so it uses less space. But if the intention is to make it more prominent feel free to drop that commit.

Screenshot 2023-04-24 at 15 59 32
ajparsons commented 1 year ago

This PR now replaced by https://github.com/mysociety/theyworkforyou/pull/1711