guardian / frontend

The Guardian DotCom.
https://theguardian.com
Other
5.84k stars 554 forks source link

Limit highlights container to 6 stories #27475

Closed Georges-GNM closed 3 weeks ago

Georges-GNM commented 3 weeks ago

What does this change?

The highlights container is only intended to have 6 stories in it, but the fronts tool doesn't limit the number that can be added - it's been left to the platforms to only render 6.

A previous PR set it so that only 6 stories would get added to "lite" version of the pressed front, leaving the full version with any more that were added in the tool. AFAIK the lite version is what normally gets served, but we had reports that suggested the full version was being used.

We implemented a temporary solution in DCR, but it's preferable to tweak the logic upstream, so that when highlights collection gets pressed, it can only have 6 stories.

Testing

The only way to really test this, AFAICT, is to deploy the branch, make a change to the highlights container in the fronts tool, and manually check the pressed.json in AWS to confirm it only has six - at the time of writing, this is what the relevant section of the file looks like:

image

Which matches up with the intention in the tool:

image
github-actions[bot] commented 3 weeks ago

Deploy build 2903 of dotcom:frontend-all to CODE

All deployment options - [Deploy build 2903 of `dotcom:frontend-all` to CODE](https://riffraff.gutools.co.uk/deployment/deployAgain?project=dotcom%3Afrontend-all&build=2903&stage=CODE&updateStrategy=MostlyHarmless&action=deploy) - [Deploy parts of build 2903 to CODE by previewing it first](https://riffraff.gutools.co.uk/preview/yaml?project=dotcom%3Afrontend-all&build=2903&stage=CODE&updateStrategy=MostlyHarmless) - [What's on CODE right now?](https://riffraff.gutools.co.uk/deployment/history?projectName=dotcom%3Afrontend-all&stage=CODE)

From guardian/actions-riff-raff.

cemms1 commented 3 weeks ago

Incredible investigation work here @Georges-GNM 👏 really impressive work. Your solution is brilliant as is but I have a suggestion to improve it further by making it a bit more readable

prout-bot commented 3 weeks ago

Seen on ADMIN-PROD (merged by @Georges-GNM 12 minutes ago)

prout-bot commented 3 weeks ago

Seen on FRONTS-PROD (merged by @Georges-GNM 13 minutes and 5 seconds ago)