Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

emma-imber
Copy link
Contributor

@emma-imber emma-imber commented Oct 25, 2024

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

@emma-imber emma-imber changed the title Don't check allowed sections for affiliate links in frontend Don't check allowed sections or default off tags for affiliate links in frontend Oct 30, 2024
@emma-imber emma-imber marked this pull request as ready for review October 30, 2024 15:14
@emma-imber emma-imber requested a review from a team as a code owner October 30, 2024 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant