WS-2081 - Render navigation items from API#13652
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR implements rendering of navigation items from the API response for both Next.js and Express applications, with a fallback mechanism to service config values during the migration period.
Changes:
- Fetches navigation data from the config API in both Next.js (
_app.page.tsx) and Express (index.jsx) applications - Passes navigation items through the component hierarchy via props
- Updates Navigation component to prefer API-sourced navigation over service config
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| ws-nextjs-app/pages/_app.page.tsx | Fetches navigation config, extracts items, and passes to PageWrapper |
| ws-nextjs-app/pages/[service]/topics/[id]/[[...variant]].page.tsx | Updates type import for GetServerSideProps |
| src/server/index.jsx | Fetches navigation config and adds to data object |
| src/app/models/types/serviceConfig.ts | Refactors navigation type to use shared Navigation type |
| src/app/models/types/global.ts | Defines shared Navigation type |
| src/app/legacy/containers/Navigation/index.test.jsx | Adds tests for navItems prop behavior |
| src/app/legacy/containers/Navigation/index.jsx | Implements fallback logic from navItems prop to service config |
| src/app/legacy/containers/Header/index.jsx | Passes navItems prop to NavigationContainer |
| src/app/legacy/containers/App/App.test.jsx | Updates test with navItems data |
| src/app/legacy/containers/App/App.jsx | Includes navItems in state mapping |
| src/app/components/PageLayoutWrapper/index.tsx | Adds navItems prop and passes to HeaderContainer |
louisearchibald
approved these changes
Jan 29, 2026
pvaliani
approved these changes
Jan 29, 2026
adds return null for navResults [CP] Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
pvaliani
approved these changes
Feb 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves JIRA: https://bbc.atlassian.net/browse/WS-2081
Summary
Renders navigation items from the API response if they are available, falling back to the
ServiceContextnavigation values if they are not to allow migration of services to the API versionCode changes
Testing
Useful Links