guardian / frontend

The Guardian DotCom.
https://theguardian.com
Other
5.85k stars 555 forks source link

Don't check allowed sections or default off tags for affiliate links in frontend #27561

Closed emma-imber closed 4 days ago

emma-imber commented 4 weeks ago

What does this change?

This change removes the check for supported sections and default off tags for articles where showAffiliateLinks is not defined. We are moving to treat Composer as the source of truth for affiliate links, so if showAffiliateLinks is not defined for an article, we will default to not showing affiliate links. If affiliate links should be shown on an article, showAffiliateLinks should be defined.

This change has meant we can simplify the logic and function in frontend, and I have updated and removed some tests to reflect the logic change. I've also added comments to document the tests, as they were pretty opaque. The diff isn't super helpful for the test file, might be easier to read without the diff highlighting

github-actions[bot] commented 4 weeks ago

Deploy build 3297 of dotcom:frontend-all to CODE

All deployment options - [Deploy build 3297 of `dotcom:frontend-all` to CODE](https://riffraff.gutools.co.uk/deployment/deployAgain?project=dotcom%3Afrontend-all&build=3297&stage=CODE&updateStrategy=MostlyHarmless&action=deploy) - [Deploy parts of build 3297 to CODE by previewing it first](https://riffraff.gutools.co.uk/preview/yaml?project=dotcom%3Afrontend-all&build=3297&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.

prout-bot commented 4 days ago

Seen on FRONTS-PROD (merged by @emma-imber 12 minutes and 2 seconds ago)

prout-bot commented 4 days ago

Seen on ADMIN-PROD (merged by @emma-imber 12 minutes and 13 seconds ago)