Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
5f9d112
update divider colour
louisearchibald May 28, 2026
285f365
add bbc blocks to languages page
louisearchibald May 28, 2026
1640d22
Merge branch 'latest' into WS-2562-update-ws-languages-page-navigation
louisearchibald May 28, 2026
4904057
Merge branch 'WS-2562-update-ws-languages-page-navigation' of ssh://g…
louisearchibald May 29, 2026
a4cfcee
pass isLanguagesPage prop to legacy brand container
louisearchibald May 29, 2026
26dd65a
update red banner height to 44px for languages page
louisearchibald May 29, 2026
e1ad83e
update brandsvg
louisearchibald May 29, 2026
94234f6
Merge branch 'latest' into WS-2562-update-ws-languages-page-navigation
louisearchibald Jun 2, 2026
412e4a7
Merge branch 'WS-2562-update-ws-languages-page-navigation' of ssh://g…
louisearchibald Jun 2, 2026
82acdba
Merge branch 'latest' into WS-2562-update-ws-languages-page-navigation
louisearchibald Jun 3, 2026
b40bbb6
Merge branch 'WS-2562-update-ws-languages-page-navigation' of ssh://g…
louisearchibald Jun 3, 2026
1de887c
Merge branch 'latest' into WS-2562-update-ws-languages-page-navigation
louisearchibald Jun 3, 2026
e64ed25
Merge branch 'WS-2562-update-ws-languages-page-navigation' of ssh://g…
louisearchibald Jun 3, 2026
493e57d
update viewbox values
louisearchibald Jun 4, 2026
7ac57be
undo previously added media queries
louisearchibald Jun 4, 2026
3bcd782
Revert "undo previously added media queries"
louisearchibald Jun 4, 2026
4ddf0d0
Merge branch 'latest' into WS-2562-update-ws-languages-page-navigation
louisearchibald Jun 4, 2026
40b7eb0
Merge branch 'WS-2562-update-ws-languages-page-navigation' of ssh://g…
louisearchibald Jun 4, 2026
63bb589
set brand header to 44px on languages page by passing isLanguagesPage…
louisearchibald Jun 4, 2026
e744334
small refactor to ensure languages page picks up correct padding
louisearchibald Jun 4, 2026
0ad3aa6
fix svg sizing at group 3 breakpoint
louisearchibald Jun 4, 2026
c044916
bbc blocks on languages homepage link to bbc.com
louisearchibald Jun 4, 2026
818ee72
ensure footer styles are not being affected
louisearchibald Jun 5, 2026
c502364
Merge branch 'latest' into WS-2562-update-ws-languages-page-navigation
louisearchibald Jun 5, 2026
6ecffc1
Merge branch 'WS-2562-update-ws-languages-page-navigation' of ssh://g…
louisearchibald Jun 5, 2026
575f26a
Merge branch 'latest' into WS-2562-update-ws-languages-page-navigation
louisearchibald Jun 5, 2026
dfd700c
Merge branch 'WS-2562-update-ws-languages-page-navigation' of ssh://g…
louisearchibald Jun 5, 2026
d33ab10
Revert "bbc blocks on languages homepage link to bbc.com"
louisearchibald Jun 5, 2026
9352e3e
Merge branch 'latest' into WS-2562-update-ws-languages-page-navigation
louisearchibald Jun 5, 2026
894b1cc
Merge branch 'WS-2562-update-ws-languages-page-navigation' of ssh://g…
louisearchibald Jun 5, 2026
b356389
further prevent footer logo from inheriting languages page styles
louisearchibald Jun 5, 2026
d1fb202
smol change
louisearchibald Jun 5, 2026
6e11182
export existing path helpers
louisearchibald Jun 5, 2026
c4854f2
scope styling changes to ws/languages only
louisearchibald Jun 5, 2026
27b5545
scope nav changes to ws/languages only
louisearchibald Jun 5, 2026
fb438cb
add storybook example to show correct nav changes for ws/languages
louisearchibald Jun 5, 2026
446163c
add unit tests checking for logo banner on languages page
louisearchibald Jun 5, 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
2 changes: 1 addition & 1 deletion src/app/components/CollapsibleNavigation/index.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const styles = {
transform: 'translateY(-50%)',
width: `${pixelsToRem(1)}rem`,
height: `${pixelsToRem(20)}rem`,
backgroundColor: palette.GREY_10,
backgroundColor: palette.GREY_5,
},
'&:nth-last-child(2)::after': {
background: 'none',
Expand Down
7 changes: 3 additions & 4 deletions src/app/components/ThemeProvider/chameleonLogos/ws.tsx

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/app/legacy/containers/Brand/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { useTheme } from '@emotion/react';
import { servicesWithVariants } from '#lib/utilities/variantHandler';
import { ServiceContext } from '../../../contexts/ServiceContext';
import { RequestContext } from '../../../contexts/RequestContext';
import { isGlobalLanguageHomepage } from '../Header/NewLogoBanner';

const StyledBrand = styled(Brand)`
position: relative;
Expand Down Expand Up @@ -43,6 +44,8 @@ const BrandContainer = ({
const maxWidth = svgRatio * svgMaxHeight;

const brandPath = getBrandPath(service, variant);
const { pathname } = use(RequestContext);
const isLanguagesPage = isGlobalLanguageHomepage(pathname);

Comment thread
louisearchibald marked this conversation as resolved.
return (
<StyledBrand
Expand All @@ -56,6 +59,7 @@ const BrandContainer = ({
skipLink={skipLink}
scriptLink={scriptLink}
ref={brandRef}
isLanguagesPage={isLanguagesPage}
{...props}
>
{children}
Expand Down
4 changes: 2 additions & 2 deletions src/app/legacy/containers/Header/NewLogoBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { use } from 'react';
import { RequestContext } from '#contexts/RequestContext';
import styles from './index.styles';

const GLOBAL_LANGUAGES_PATH = '/ws/languages';
export const GLOBAL_LANGUAGES_PATH = '/ws/languages';

const isGlobalLanguageHomepage = (inputPathname?: string) => {
export const isGlobalLanguageHomepage = (inputPathname?: string) => {
if (!inputPathname) return false;

const pathname = inputPathname?.split(/[?#]/)?.[0]?.replace(/\/$/, '');
Expand Down
10 changes: 8 additions & 2 deletions src/app/legacy/containers/Header/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import SERVICES_WITH_NEW_NAV from '#app/components/Navigation/config';
import { ServiceContext } from '../../../contexts/ServiceContext';
import ConsentBanner from '../ConsentBanner';
import BrandContainer from '../Brand';
import NewLogoBanner from './NewLogoBanner';
import NewLogoBanner, { isGlobalLanguageHomepage } from './NewLogoBanner';
import styles from './index.styles';

const Header = ({
Expand Down Expand Up @@ -88,6 +88,12 @@ const HeaderContainer = ({ navItems, propsForTopBarOJComponent }) => {

const shouldUseNewNav = SERVICES_WITH_NEW_NAV.includes(service);

const { pathname } = use(RequestContext);

const isLanguagesPage = isGlobalLanguageHomepage(pathname);

const shouldShowNewLogoBanner = shouldUseNewNav || isLanguagesPage;

Comment thread
louisearchibald marked this conversation as resolved.
let shouldRenderScriptSwitch = false;

if (scriptLink) {
Expand All @@ -112,7 +118,7 @@ const HeaderContainer = ({ navItems, propsForTopBarOJComponent }) => {

return (
<header role="banner" lang={serviceLang}>
{shouldUseNewNav && <NewLogoBanner />}
{shouldShowNewLogoBanner && <NewLogoBanner />}
{isAmp ? (
<Header
linkId="brandLink"
Expand Down
12 changes: 12 additions & 0 deletions src/app/legacy/containers/Header/index.stories.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { RequestContextProvider } from '#app/contexts/RequestContext';
import { HOME_PAGE } from '#app/routes/utils/pageTypes';
import HeaderContainer from '.';
import { ToggleContextProvider } from '../../../contexts/ToggleContext';

Expand All @@ -13,6 +15,16 @@ const Component = () => (
</ToggleContextProvider>
);

export const GlobalLanguages = () => (
<RequestContextProvider
service="ws"
pathname="/ws/languages"
pageType="HOME_PAGE"
>
<Component service="ws" />
</RequestContextProvider>
);

export default {
title: 'Containers/Header',
Component,
Expand Down
25 changes: 25 additions & 0 deletions src/app/legacy/containers/Header/index.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -320,4 +320,29 @@ describe(`Header`, () => {
expect(container).not.toContainElement(cookieBanner);
});
});

describe('WSLanguagesHeader', () => {
it('should render the logo banner on the WS Languages Homepage', async () => {
HeaderContainerWithContext({
renderOptions: {
pageType: HOME_PAGE,
service: 'ws',
pathname: '/ws/languages',
},
});
expect(await screen.findByTestId('logo-banner')).toBeInTheDocument();
});

it('should not render the logo banner for ws service on a non-languages page', () => {
HeaderContainerWithContext({
renderOptions: {
pageType: HOME_PAGE,
service: 'ws',
pathname: '/ws',
},
});

expect(screen.queryByTestId('logo-banner')).toBeNull();
});
});
});
30 changes: 24 additions & 6 deletions src/app/legacy/psammead/psammead-brand/src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,20 @@ const Banner = styled.div`
align-items: stretch;

@media (min-width: ${GEL_GROUP_1_SCREEN_WIDTH_MIN}) {
min-height: ${60 / 16}rem;
min-height: ${props =>
props.isLanguagesPage ? `${44 / 16}rem` : `${60 / 16}rem`};
padding: 0 ${GEL_SPACING};
}

@media (min-width: ${GEL_GROUP_2_SCREEN_WIDTH_MIN}) {
min-height: ${60 / 16}rem;
min-height: ${props =>
props.isLanguagesPage ? `${44 / 16}rem` : `${60 / 16}rem`};
padding: 0 ${GEL_SPACING_DBL};
}

@media (min-width: ${GEL_GROUP_3_SCREEN_WIDTH_MIN}) {
min-height: ${64 / 16}rem;
min-height: ${props =>
props.isLanguagesPage ? `${44 / 16}rem` : `${64 / 16}rem`};
}
`;

Expand Down Expand Up @@ -89,7 +92,8 @@ const BrandSvg = styled.svg`
}

@media (min-width: ${GEL_GROUP_3_SCREEN_WIDTH_MIN}) {
height: ${30 / 16}rem;
height: ${props =>
props.isLanguagesPage ? `${24 / 16}rem` : `${30 / 16}rem`};
}

@media screen and (-ms-high-contrast: active), print {
Expand All @@ -115,7 +119,13 @@ const LocalisedBrandName = ({
);
};

const StyledBrand = ({ linkId, product, serviceLocalisedName = null, svg }) => {
const StyledBrand = ({
linkId,
product,
serviceLocalisedName = null,
svg,
isLanguagesPage = false,
}) => {
return svg ? (
<>
<BrandSvg
Expand All @@ -130,6 +140,7 @@ const StyledBrand = ({ linkId, product, serviceLocalisedName = null, svg }) => {
focusable="false"
aria-hidden="true"
height="32"
isLanguagesPage={isLanguagesPage && linkId !== 'footer'}
>
{svg.group}
</BrandSvg>
Expand All @@ -152,11 +163,18 @@ const Brand = forwardRef((props, ref) => {
skipLink = null,
linkId = null,
children,
serviceLocalisedName,
isLanguagesPage,
...rest
} = props;

return (
<Banner svgHeight={svgHeight} scriptLink={scriptLink} {...rest}>
<Banner
svgHeight={svgHeight}
scriptLink={scriptLink}
isLanguagesPage={isLanguagesPage && linkId !== 'footer'}
{...rest}
>
<SvgWrapper ref={ref} className="brand-svg-wrapper">
{url ? (
<StyledLink
Expand Down
Loading