Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
15e561a
Add responsive ilustrated header
gustavo-olmedo Sep 15, 2026
58a7d6f
Improve puzzle image accesibility and display stters
gustavo-olmedo Sep 15, 2026
6961e24
Update to temporarily hide puzzles newsletter and popularity sections
gustavo-olmedo Sep 15, 2026
e383713
Update to use guardian headline typography for puzzles useful links
gustavo-olmedo Sep 15, 2026
bc29010
Fix issue variable name
gustavo-olmedo Sep 15, 2026
93f0194
Update puzzles hub card styling and responsive dimensions
gustavo-olmedo Sep 15, 2026
9408348
Fix puzzles hub alignment and header image resolution
gustavo-olmedo Sep 15, 2026
0cad61f
Update crossword archive icon and add sidebar links
gustavo-olmedo Sep 15, 2026
862ff1e
Add responsive separators between puzzle cards
gustavo-olmedo Sep 15, 2026
4bb794c
Update to align useful links divider at wide breakpoint
gustavo-olmedo Sep 16, 2026
1ae04a8
Update to remove 768px breakpoint
gustavo-olmedo Sep 16, 2026
1c10085
Merge branch 'main' into puzzles/images-sizing-accesibility-setters
gustavo-olmedo Sep 16, 2026
f00a7e6
Fix puzzles header tests
gustavo-olmedo Sep 16, 2026
638616d
Update to replace puzzle colours with source palette tokens
gustavo-olmedo Sep 16, 2026
337c169
Merge branch 'main' into puzzles/images-sizing-accesibility-setters
gustavo-olmedo Sep 16, 2026
007e2a8
Update to support dated puzzle routes with section-prefixed slugs
gustavo-olmedo Sep 16, 2026
e70a571
Merge branch 'main' into puzzles/images-sizing-accesibility-setters
gustavo-olmedo Sep 16, 2026
ad5a619
Update to rollback newslettersignup card we are not going to implemen…
gustavo-olmedo Sep 16, 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
57 changes: 35 additions & 22 deletions dotcom-rendering/src/components/PuzzlesArchiveMenu.island.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,18 @@ const wrapperStyles = css`
position: relative;
display: block;
width: max-content;
margin-top: ${space[1]}px;
margin-top: ${space[2]}px;
margin-left: auto;

${from.tablet} {
margin-left: 0;
}

&[open] .archive-arrow {
transform: rotate(90deg);
}
`;

const summaryStyles = css`
position: relative;
display: inline-flex;
min-height: 44px;
min-height: 24px;
align-items: center;
gap: ${space[2]}px;
padding: 0;
Expand All @@ -57,6 +54,12 @@ const summaryStyles = css`
cursor: pointer;
list-style: none;
${textSans14};
/* Preserve a 44px pointer target around the 24px archive label. */
::before {
position: absolute;
inset: -10px 0;
content: '';
}

::-webkit-details-marker {
display: none;
Expand All @@ -70,8 +73,8 @@ const summaryStyles = css`
`;

const arrowStyles = css`
display: inline-block;
transition: transform 0.1s ease-out;
display: block;
flex-shrink: 0;
`;

const menuStyles = css`
Expand Down Expand Up @@ -116,27 +119,27 @@ export const PuzzlesArchiveMenu = ({
const summaryRef = useRef<HTMLElement>(null);

useEffect(() => {
const close = (event: MouseEvent | KeyboardEvent) => {
const close = (event: Event) => {
const details = detailsRef.current;
if (details?.open !== true) {
return;
}
if (event instanceof KeyboardEvent && event.key !== 'Escape') {
return;
}
if (
event instanceof MouseEvent &&
details.contains(event.target as Node)
) {
if (event instanceof KeyboardEvent) {
if (event.key !== 'Escape') return;
} else if (event.composedPath().includes(details)) {
return;
}
details.open = false;
if (event instanceof KeyboardEvent) summaryRef.current?.focus();
};
document.addEventListener('mousedown', close);
document.addEventListener('pointerdown', close, true);
document.addEventListener('mousedown', close, true);
document.addEventListener('click', close, true);
document.addEventListener('keydown', close);
return () => {
document.removeEventListener('mousedown', close);
document.removeEventListener('pointerdown', close, true);
document.removeEventListener('mousedown', close, true);
document.removeEventListener('click', close, true);
document.removeEventListener('keydown', close);
};
}, []);
Expand All @@ -153,13 +156,23 @@ export const PuzzlesArchiveMenu = ({
<details css={wrapperStyles} ref={detailsRef}>
<summary css={summaryStyles} ref={summaryRef}>
{label}{' '}
<span
<svg
width="9"
height="5"
viewBox="0 0 9 5"
fill="none"
xmlns="http://www.w3.org/2000/svg"
aria-hidden="true"
className="archive-arrow"
focusable="false"
css={arrowStyles}
>
{'>'}
</span>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M3.05176e-05 0.712324L3.82876 5H4.55936L8.38813 0.712328L7.69406 0L4.19403 3L0.694092 0L3.05176e-05 0.712324Z"
fill="black"
/>
</svg>
</summary>
<ul aria-label={label} css={menuStyles}>
{validArchives.map(({ archive, url }) => (
Expand Down
29 changes: 14 additions & 15 deletions dotcom-rendering/src/components/PuzzlesDirectory.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ import { breakpoints } from '@guardian/source/foundations';
import type { PuzzlesLayoutType } from '../types/puzzlesPage';
import { PuzzlesDirectory } from './PuzzlesDirectory';

const previewImage =
'https://i.guim.co.uk/img/uploads/2023/11/01/SaturdayEdition_-_5-3.jpg?width=600&dpr=1&s=none&crop=5%3A3';

const layout: PuzzlesLayoutType = {
containers: [
{
Expand All @@ -17,26 +14,28 @@ const layout: PuzzlesLayoutType = {
items: [
[
{
id: 'ball',
title: 'On the ball',
type: 'quiz',
set: 'all',
id: 'featured-mini',
title: 'Mini crossword',
type: 'crossword',
set: 'mini',
cardVariant: 'large',
cadence: 'Daily',
image: previewImage,
slug: 'on-the-ball',
variant: 'iframe-page',
image: 'https://i.guim.co.uk/img/uploads/2026/09/15/crossword-MINI.png?width=440&dpr=2&s=none',
imageAlt: 'Mini crossword illustration',
setter: 'Example setter',
url: '/puzzles-and-games/crosswords/mini/1',
backgroundColour: '#e5e5e5',
},
{
id: 'film',
title: 'Film reveal',
type: 'quiz',
id: 'featured-word-wheel',
title: 'Word wheel',
type: 'word-wheel',
set: 'all',
cardVariant: 'large',
cadence: 'Daily',
image: previewImage,
slug: 'film-reveal',
image: 'https://i.guim.co.uk/img/uploads/2026/09/15/word-games-WORD-WHEEL.png?width=440&dpr=2&s=none',
imageAlt: 'Word wheel illustration',
slug: 'word-wheel',
variant: 'iframe-page',
backgroundColour: '#e5e5e5',
},
Expand Down
Loading
Loading