Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
129 commits
Select commit Hold shift + click to select a range
e25838a
wip duplication of nav
LilyL0u Feb 4, 2026
c9a639a
wip
LilyL0u Feb 9, 2026
af56a2c
top nav bar added
LilyL0u Feb 10, 2026
c58d015
menu button colours and hover state
LilyL0u Feb 10, 2026
5cf2394
Merge branch 'latest' into ws-2145-create-navigation-component
LilyL0u Feb 12, 2026
3c05b15
vary nav version on service
LilyL0u Feb 15, 2026
f315854
logo on top
LilyL0u Feb 15, 2026
6fe30ba
break point logo position changes
LilyL0u Feb 15, 2026
7e0db89
make postbox coloour full width and divider right colour
LilyL0u Feb 16, 2026
4dcc57f
new brand svg
LilyL0u Feb 16, 2026
81baabf
remove log
LilyL0u Feb 16, 2026
8146dfc
use new nav data
LilyL0u Feb 16, 2026
4d15764
vertical line dividers
LilyL0u Feb 16, 2026
70c33fe
nav items from isite data
LilyL0u Feb 16, 2026
ed3aa69
Merge branch 'latest' into ws-2145-create-navigation-component
LilyL0u Feb 16, 2026
76e1b00
tracking
LilyL0u Feb 16, 2026
8089657
freaky divider line stuff when it is one pixel
LilyL0u Feb 16, 2026
940fe11
put variant back in fetchConfig
LilyL0u Feb 16, 2026
0cf920e
unneccssary css
LilyL0u Feb 16, 2026
2d7c52c
unneeded code
LilyL0u Feb 16, 2026
6f3f573
When aria-current="page" is set on a link, screen readers will announ…
LilyL0u Feb 17, 2026
e3442d7
move brand image
LilyL0u Feb 17, 2026
2aa957a
dropdown nav drops down from top nav and covers bottom one
LilyL0u Feb 17, 2026
7f35f4d
amp ts error fix
LilyL0u Feb 17, 2026
49b5903
adds geta11yprops workaround to fix nav aria-current so it only annou…
pvaliani Feb 17, 2026
869c815
fix focus issue on dropdown nav
louisearchibald Feb 17, 2026
79b7339
Merge branch 'ws-2145-create-navigation-component' of ssh://github.co…
louisearchibald Feb 17, 2026
32f6ebb
Remove canonical styled component in favour of `css`
amoore108 Feb 18, 2026
a7a650d
Use breakpoint from ThemeProvider
amoore108 Feb 18, 2026
2da61b9
Add missing `rem` suffix
amoore108 Feb 18, 2026
7407d04
Convert `NewLogoBanner` to `css` instead of styled-component
amoore108 Feb 18, 2026
4890417
Remove comment
amoore108 Feb 18, 2026
792987d
Fix divider overflow
amoore108 Feb 18, 2026
a2d4592
Tidy up nav divs
amoore108 Feb 18, 2026
af6e074
Fix blocks padding
amoore108 Feb 18, 2026
c9346d7
Merge branch 'latest' into ws-2145-create-navigation-component
amoore108 Feb 18, 2026
4ea5bc4
Update bundleSizeConfig.js
amoore108 Feb 18, 2026
315db7d
Remove `Navigation/LanguageNavigation`, seems unneeded
amoore108 Feb 18, 2026
8e659d8
Remove `script` prop as all components should be using theme values
amoore108 Feb 18, 2026
7583abc
Variable tidy up
amoore108 Feb 18, 2026
7f9726c
Convert function args to object
amoore108 Feb 18, 2026
e137d05
Move `getTopItemA11yProps` out of render
amoore108 Feb 18, 2026
401197d
Remove explicit type casts in favour of inferring
amoore108 Feb 18, 2026
5df4af2
use isLive
LilyL0u Feb 19, 2026
63b49b2
Merge branch 'ws-2145-create-navigation-component' of github.com:bbc/…
LilyL0u Feb 19, 2026
dcf5358
Use `Navigation` type from global/types
amoore108 Feb 19, 2026
6613489
Merge branch 'latest' into ws-2145-create-navigation-component
amoore108 Feb 19, 2026
2d51bcb
new logo with less space on side
LilyL0u Feb 19, 2026
798f7aa
Merge branch 'ws-2145-create-navigation-component' of github.com:bbc/…
LilyL0u Feb 19, 2026
0939920
Fix forwarding `navType` prop in emotion-styled
amoore108 Feb 19, 2026
285f44c
psammead/nav snapshots
amoore108 Feb 19, 2026
73f61a6
legacy/nav snapshots
amoore108 Feb 19, 2026
0d6e8a1
pagelayout + header snapshots
amoore108 Feb 19, 2026
2d1c0c3
add linkId to new brand
LilyL0u Feb 19, 2026
f4d4459
Merge branch 'ws-2145-create-navigation-component' of github.com:bbc/…
LilyL0u Feb 19, 2026
388915e
adds storybook comp
holchris Feb 19, 2026
ab29a82
Center BBC blocks <600px
amoore108 Feb 19, 2026
769551d
Use `useNewNav` param only for Arabic/Tamil on Local/Test
amoore108 Feb 19, 2026
d1435d0
Use `pixelsToRem` util for defining divider width
amoore108 Feb 19, 2026
85635bc
Divider and lowernav tidy
amoore108 Feb 19, 2026
c85dc7f
Integration snapshot updates - SVG
amoore108 Feb 19, 2026
1af87be
Merge branch 'ws-2145-create-navigation-component' into WS-2187-creat…
louisearchibald Feb 19, 2026
c820fd6
Simplify nav+button layout
amoore108 Feb 19, 2026
2520cf0
Add `SERVICES_WITH_NEW_NAV` array list for reusability
amoore108 Feb 19, 2026
487531f
Update index.canonical.tsx
amoore108 Feb 19, 2026
05f8bdc
adds readme
holchris Feb 19, 2026
4a5c53e
Remove `navType` in favour of CSS overriding
amoore108 Feb 19, 2026
1c2a206
Create dummy Storybook story to suppress build error
amoore108 Feb 19, 2026
3cf1339
Merge branch 'latest' into ws-2145-create-navigation-component
amoore108 Feb 19, 2026
094d864
Combine `navRow` and `topRow` classes
amoore108 Feb 19, 2026
6d1d234
Snapshot updates
amoore108 Feb 19, 2026
e598568
Re-add `background-colour:transparent` that was removed accidentally
amoore108 Feb 19, 2026
4bfea6e
Move divider into new nav component
amoore108 Feb 19, 2026
c7803c2
adds navigation items array
holchris Feb 19, 2026
c5f96e1
Snapshot updates
amoore108 Feb 19, 2026
5d17386
Revert psammead-navigation `margin-inline-end` change
amoore108 Feb 19, 2026
115d23b
Revert `svg` and `display` changes in `psammead-navigation/Dropdown`
amoore108 Feb 19, 2026
e74b20c
Move CSS to fix diff
amoore108 Feb 19, 2026
7de4877
Merge branch 'latest' into ws-2145-create-navigation-component
amoore108 Feb 19, 2026
3e11779
uses serviceContextProvider
holchris Feb 19, 2026
5a256b6
Merge branch 'ws-2145-create-navigation-component' into WS-2187-creat…
holchris Feb 19, 2026
2476525
Add 'hover' style for dropdown menu
amoore108 Feb 20, 2026
298d581
Update index.styles.ts
amoore108 Feb 20, 2026
bfacfed
Fix SVG test temporarily
amoore108 Feb 20, 2026
0b3dc6f
Add `-secondary` for data-e2e for scrollable nav
amoore108 Feb 20, 2026
8a8bf96
Update index.amp.tsx
amoore108 Feb 20, 2026
a5a7d3a
Merge branch 'latest' into ws-2145-create-navigation-component
amoore108 Feb 20, 2026
7e72ca7
Add dummy tests to prevent jest failures
amoore108 Feb 20, 2026
0fc6138
Update index.test.tsx
amoore108 Feb 20, 2026
7ec9745
Re-jig `fetchConfig -> ctx-service-env` header setting
amoore108 Feb 20, 2026
26fc101
Diff reverts
amoore108 Feb 20, 2026
8c3cebe
Tidy up view/click tracking metadata
amoore108 Feb 20, 2026
493f67a
Merge branch 'latest' into ws-2145-create-navigation-component
amoore108 Feb 20, 2026
06d2969
Merge branch 'latest' into ws-2145-create-navigation-component
pvaliani Feb 20, 2026
87bf622
Add `null` check for nav items
amoore108 Feb 20, 2026
13685be
Re-add `SERVICES_WITH_NEW_NAV` config
amoore108 Feb 20, 2026
931ad05
Remove `service` prop from `Navigation` as no longer needed
amoore108 Feb 20, 2026
8ad0d07
Add `Direction` type
amoore108 Feb 20, 2026
a63c1da
Better naming for divider
amoore108 Feb 20, 2026
36c8d04
Remove `service` prop as no longer needed
amoore108 Feb 20, 2026
5faa178
Update index.tsx
amoore108 Feb 20, 2026
44568dd
Remove unneeded types
amoore108 Feb 22, 2026
845f8e3
Move types closer to components
amoore108 Feb 22, 2026
8a92d18
Remove `types` and `testHelpers` files
amoore108 Feb 22, 2026
560626c
Revert `psammead-navigation -> StyledLink` diff
amoore108 Feb 22, 2026
9632c6e
Update index.jsx
amoore108 Feb 22, 2026
864b5f3
Add test coverage for `useNewNav` param setting
amoore108 Feb 23, 2026
a60ec8c
Remove unneeded destruct
amoore108 Feb 23, 2026
396b912
Reset `SIMORGH_APP_ENV` after tests
amoore108 Feb 23, 2026
51a83b8
Only apply a11y props to `top` nav
amoore108 Feb 23, 2026
29211ad
Remove `css` from components and wrap in `div`
amoore108 Feb 23, 2026
0e3bff9
Revert "Remove `css` from components and wrap in `div`"
amoore108 Feb 23, 2026
1a5d1f5
Update index.jsx
amoore108 Feb 23, 2026
f2c96ae
Reset `SIMORGH_APP_ENV` in `fetchConfig` tests
amoore108 Feb 23, 2026
feed854
Filter out `hideOnLiteSite` items earlier
amoore108 Feb 23, 2026
9ffb79f
Remove redundant `insetInlineStart`
amoore108 Feb 23, 2026
a3ffb97
Remove hardcoded colour value
amoore108 Feb 23, 2026
1878ad0
adds pidgin nav
holchris Feb 23, 2026
779c27e
Merge branch 'ws-2145-create-navigation-component' into WS-2187-creat…
holchris Feb 23, 2026
0aa9168
Merge branch 'latest' into WS-2187-create-storybook-component-for-new…
holchris Feb 23, 2026
1745e25
refactor props
holchris Feb 23, 2026
9845895
remove unused props
holchris Feb 23, 2026
abbc0c9
clean up unused props
holchris Feb 23, 2026
f2e9e7b
update readme
holchris Feb 23, 2026
a4df649
adds accessibility metadata
holchris Feb 24, 2026
d846640
adds readme and metadata
holchris Feb 24, 2026
a22d390
updates readme
holchris Feb 24, 2026
1f8fddb
update readme
holchris Feb 24, 2026
7add17d
Merge branch 'latest' into WS-2187-create-storybook-component-for-new…
holchris Feb 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/app/components/Navigation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## Description

This component renders a the navigation bar which comprises of two tiers, the primary being three categories and the secondary being links to topics.

## Props

| Name | type | Description |
| ------------------------- | --------------------------- | --------------------------------------------------------- |
| navItems | Navigation[] | Array of Navigation items to display within the component |
| propsForTopBarOJComponent | { blocks?: TopStoryItem[] } | Optional object with blocks to display TopStoryItem |
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

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

The README documents a prop propsForTopBarOJComponent with type { blocks?: TopStoryItem[] }, but this prop is not being used in any of the story examples (Arabic or Pidgin). According to the Navigation component implementation, this is an optional prop for the Navigation component. Consider either adding an example story that demonstrates this prop, or clarifying in the documentation that this is an optional prop that is not demonstrated in the basic examples.

Copilot uses AI. Check for mistakes.

## How to use

Import and use the component in your page or story:

```tsx
import Navigation from './Navigation';
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

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

The import path in the example code is incorrect. It shows import Navigation from './Navigation'; but based on the component structure, it should be import Navigation from '.'; or the appropriate path to the Navigation component. The example should match how the component is actually imported and used.

Suggested change
import Navigation from './Navigation';
import Navigation from '.';

Copilot uses AI. Check for mistakes.
```
66 changes: 63 additions & 3 deletions src/app/components/Navigation/index.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,68 @@
const Component = () => <div>Navigation</div>;
import Navigation from '.';
import { ServiceContextProvider } from '#app/contexts/ServiceContext';
import type {
Navigation as NavigationType,
Services,
} from '#app/models/types/global';
import readme from './README.md';
import metadata from './metadata.json';

interface Props {
navItems: NavigationType[];
service: Services;
}

const Component = ({ navItems, service }: Props) => {
return (
<ServiceContextProvider service={service}>
<Navigation navItems={navItems} />
</ServiceContextProvider>
);
Comment on lines +15 to +20
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

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

The Navigation component requires multiple context providers that are missing from the story wrapper. The component uses use(RequestContext) (line 182-183 in index.tsx) and the canonical variant uses useToggle which requires ToggleContext (line 37 in index.canonical.tsx). Without these providers, the component will fail at runtime. You need to wrap the Navigation component with both RequestContextProvider and ToggleContextProvider, providing all required context values (isAmp, isLite, pageType, canonicalLink, origin for RequestContext). See examples in Embeds/AmpIframeEmbed/index.stories.tsx and CollapsibleNavigation/index.stories.tsx for reference.

Copilot uses AI. Check for mistakes.
};

export default {
title: 'Components/NewNavigation',
title: 'Components/Navigation',
Component,
parameters: {
docs: { readme },
metadata,
},
};

export const Example = Component;
export const Arabic = () => {
const navItems = [
{
title: 'رئيسية',
url: '/home',
subItems: [
{ title: 'أخبار', url: '/home/section1' },
{ title: 'شاهد', url: '/home/section2' },
{ title: 'صحة وعلوم', url: '/home/section3' },
],
},
{
title: 'شاهد',
url: '/news',
},
];
return <Component navItems={navItems} service={'arabic'} />;
};

export const Pidgin = () => {
const navItems = [
{
title: 'News',
url: '/home',
subItems: [
{ title: 'Nigeria', url: '/home/section1' },
{ title: 'Africa', url: '/home/section2' },
{ title: 'World', url: '/home/section3' },
],
},
{
title: 'Video',
url: '/news',
},
];
return <Component navItems={navItems} service={'pidgin'} />;
};
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

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

The Pidgin story is being created, but according to the Navigation config file (src/app/components/Navigation/config.ts), only 'arabic' and 'tamil' services are listed in SERVICES_WITH_NEW_NAV. The PR description mentions creating stories for Arabic and Pidgin, but Pidgin is not included in the config. This may cause issues when the Navigation component is used with the Pidgin service if it's not configured to use the new navigation. Either update the config to include 'pidgin', or clarify if the Pidgin story is intended for demonstration purposes only.

Suggested change
};
};
Pidgin.storyName = 'Pidgin (demo only)';
Pidgin.parameters = {
docs: {
description: {
story:
'This story is for demonstration purposes only. The Pidgin service is not currently configured in SERVICES_WITH_NEW_NAV, so this story does not reflect the production navigation configuration.',
},
},
};

Copilot uses AI. Check for mistakes.
29 changes: 29 additions & 0 deletions src/app/components/Navigation/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"alpha": false,
"lastUpdated": {
"day": 24,
"month": "February",
"year": 2026
},
"uxAccessibilityDoc": {
"done": false,
"reference": {
"url": "",
"label": "Screen Reader UX"
}
},
"acceptanceCriteria": {
"done": false,
"reference": {
"url": "",
"label": "Accessibility Acceptance Criteria"
}
},
"swarm": {
"done": false,
"reference": {
"url": "",
"label": "Accessibility Swarm Notes"
}
}
}
Loading