-
Notifications
You must be signed in to change notification settings - Fork 210
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
AV-Embeds Next.js routing #11804
base: latest
Are you sure you want to change the base?
AV-Embeds Next.js routing #11804
Conversation
const env = getEnvironment(resolvedUrl); | ||
const agent = certsRequired(resolvedUrl) ? await getAgent() : null; | ||
|
||
const parsedRoute = parseAvRoute(resolvedUrl); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is by no means final. More for debugging and testing URL parsing.
// Assumes /ws/ routes are purely for Simorgh AMP pages | ||
// - only for testing | ||
const isSyndicationRoute = !query.includes('ws'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this is still a draft / WIP, but wondering what is happening with AMP + Media Player? Or do we think that there might still be a need for an AMP version of the av-embed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea this is focused mainly on syndication routes for now. The ws/av-embeds
routes will need to be supported for AMP media players in Article pages. The logic here does support those routes too (at least parsing out the values from the URL), so they are pretty much good to go.
Part of https://jira.dev.bbc.co.uk/browse/WSTEAM1-1191
Overall changes
av-embeds
routes in the Next.js app and a basic debug outputThemeProvider
out ofPageWrapper
and intowithContexts
and_app
, beside the other Context providers. This is required as theav-embeds
routes do not need to render the page furniture (header/footer etc) thatPageWrapper
provides, but should still be able to produce a correctly styled 404/500 page if an incorrect route is providedCode changes
av-embeds
route in the[service]/[[...]].page.tsx
catch-allAV_EMBEDS
analyticsThemeProvider
out ofPageWrapper
and intowithContexts
for the Express app and_app
for the Next.js appThemeProvider
controlTesting
s
inav-embeds
in the URLHelpful Links
Add Links to useful resources related to this PR if applicable.
Coding Standards
Repository use guidelines