Conversation
…ce it as the current page
…nces the exact current page
…m/bbc/simorgh into ws-2145-create-navigation-component
|
Shall we add a description/details to this now as its for review? |
| } | ||
|
|
||
| // Only fetch new nav for Arabic and Tamil services on Local/Test | ||
| if (service === 'arabic' && !isLive()) { |
There was a problem hiding this comment.
This only has arabic - should we be adding tamil to the check here as well?
There was a problem hiding this comment.
I can amend these checks to include Tamil. We'll need the backend change applied first to allow services other than Arabic to use the 'useNewNav' param, otherwise Tamil will try and render existing nav items in the new nav element.
There was a problem hiding this comment.
I still haven't been able to sort the audit issue otherwise it would be deployed, apologies 😅 😬
There was a problem hiding this comment.
No worries, I've made a small config so its a bit easier to rollout: 13685be
| /** | ||
| * Prefer server-provided navItems; fallback to ServiceContext.navigation if missing. | ||
| */ | ||
| const navigationItems = navItems || navFromServiceConfig; |
There was a problem hiding this comment.
Could this technically crash if nav data is missing or undefined from isite? I think we'll always have the forms but just thinking navigationItems is used before we verify it exists, then we index into it directly
The old nav had this null check
There was a problem hiding this comment.
Technically it could, but the service configs should always have the fallback. I can add in the guard though for parity.
There was a problem hiding this comment.
No worries, your call just wanted to point it out! I think that's fair if we always have the fallback
pvaliani
left a comment
There was a problem hiding this comment.
Nice work @LilyL0u and thanks @amoore108 for continuing working on it. Be good to get it updated in the next iterations!
Resolves JIRA:
Summary
A very high-level summary of easily-reproducible changes that can be understood by non-devs, and why these changes where made.
Code changes
Testing
Useful Links