Skip to content

SEO toggle and tests added#14105

Draft
victranfield wants to merge 4 commits into
latestfrom
WS-2316-Content-URL-to-Audio-Object
Draft

SEO toggle and tests added#14105
victranfield wants to merge 4 commits into
latestfrom
WS-2316-Content-URL-to-Audio-Object

Conversation

@victranfield

Copy link
Copy Markdown
Contributor

Resolves JIRA: https://bbc.atlassian.net/browse/WS-2316

Summary

Add contentUrl to AudioObject structured data on podcast episode pages where a valid downloadable audio URL exists

Code changes

  • List key code changes that have been made.

Testing

  1. List the steps required to test this PR.

Useful Links

Comment on lines +59 to +62
const { enabled: podcastSeoImprovementsEnabled } = useToggle(
'podcastSeoImprovements',
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This toggle doesn't seem to exist in iSite anywhere. I can see that in the ticket it says to put this change behind the toggle, but i think that maybe that has been made up by the AI? I wouldn't have thought a change this small / non-breaking would need to be put behind a toggle.

test isite link for reference

live isite toggles result (you will need to set the header Origin to https://www.bbc.com/ for this link to work)

I may have missed it somewhere though so please shout if im wrong and we need this in place!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, I think we should remove the toggle. if we validate these changes are okay locally and on preview then that's enough

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, I agree

@Louis-Matsika

Copy link
Copy Markdown
Contributor

using this asset: http://localhost:7081/russian/podcasts/p076qqzl/p0mj1352?renderer_env=live

and validating it, I see the contentUrl coming through okay with no warning or errors : )

I think we should remove the toggle, but other than that changes look good!

Comment thread src/app/lib/config/toggles/liveConfig.js Outdated
"onDemandRadioSchedule": {
"enabled": false,
},
"podcastPromo": {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

once this toggle is removed from the live config this snapshot will neeed updating too!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, can I just run npm test -- -u

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

npm run test:unit -u

or

npm run test:unit:updatesnapshots

you can always check package.jsons for lists of commands that you can use, under the scripts object 😄

@emilysaffron emilysaffron Jun 10, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or when its just one snapshot failing like this, you can go that test file and run just that test with -u appended, using npx jest pathname

'@id': audioId,
name: episodeTitle || promoBrandTitle,
description: summary,
...(contentUrl && {

@emilysaffron emilysaffron Jun 10, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: we could simplify this by doing

downloadLink.linkUrl && {

downloadLink.linkUrl
encodingFormat: 'audio/mpeg'
}

and not bothering with the contentUrl variable

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.

3 participants