Skip to content

Conversation

@Nabeel1276
Copy link
Contributor

@Nabeel1276 Nabeel1276 commented Jan 7, 2026

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

Summary

Created new route in Simorgh to render topic pages in NextJS app

Code changes

  • Added new route to the Next.js app to support Topic pages, reusing existing data fetching logic from express.
  • The constructPageFetchUrl function was updated so local Topic pages fetch data from the Next.js API.
  • Updated local topic page URL to reflect a correct asset route structure for topics, using the correct topic ID.
  • Added unit tests for the new Topic pages on nextJS
  • Added TOPIC_PAGES to derivedPageTypes accompanied by a unit test

Developer Checklist

  • UX
    • UX Criteria met (visual UX & screenreader UX)
  • Accessibility
    • Accessibility Acceptance Criteria met
    • Accessibility swarm completed
    • Component Health updated
    • P1 accessibility bugs resolved
    • P2/P3 accessibility bugs planned (if not resolved)
  • Security
    • Security issues addressed
    • Threat Model updated
  • Documentation
    • Docs updated (runbook, READMEs)
  • Testing
    • Feature tested on relevant environments
  • Comms
    • Relevant parties notified of changes

Testing

  • Manual Testing required?
    • Local (Ready-For-Test, Local)
    • Test (Ready-For-Test, Test)
    • Preview (Ready-For-Test, Preview)
    • Live (Ready-For-Test, Live)
  • Manual Testing complete?
    • Local
    • Test
    • Preview
    • Live

Additional Testing Steps

  1. List the steps required to test this PR.

Useful Links

@amoore108
Copy link
Contributor

Forgot that we'll also need an entry here to handle topics:

if (sanitisedPathname.includes('live')) return LIVE_PAGE;

@amoore108
Copy link
Contributor

Thanks for adding the derivePageType check, could we extend the tests in there to account for this new check?

@amoore108
Copy link
Contributor

Thanks for the updates, looks like this bit can be removed since its repeated above:

@Nabeel1276
Copy link
Contributor Author

Thanks for the updates, looks like this bit can be removed since its repeated above:

Sorry I don't think we are wanting to remove this, I don't see any repeats above?

@amoore108
Copy link
Contributor

amoore108 commented Jan 12, 2026

Thanks for the updates, looks like this bit can be removed since its repeated above:

Sorry I don't think we are wanting to remove this, I don't see any repeats above?

These lines here should do the same thing: https://github.com/bbc/simorgh/pull/13593/files#diff-081cd4618c7234f3d5377f59f4fc1bb534b5c990337834dce072f575ad796140R45-R47

@Nabeel1276
Copy link
Contributor Author

Thanks for the updates, looks like this bit can be removed since its repeated above:

Sorry I don't think we are wanting to remove this, I don't see any repeats above?

These lines here should do the same thing: https://github.com/bbc/simorgh/pull/13593/files#diff-081cd4618c7234f3d5377f59f4fc1bb534b5c990337834dce072f575ad796140R45-R47

I just seen that and was going to delete my message lol

Copy link
Contributor

@amoore108 amoore108 left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for addressing the comments 🙏

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.

4 participants