Repository navigation
Conversation
🚀 Image pushed to AWS ECRImage digest: 🐛 Run the image locallyThe following can be used to run the image locally: # Refer to image using the immutable digest. Find alternatives below.
IMAGE_IDENTIFIER="@sha256:b60b4ce4e4fa2e3ad3aeb9b649815d995aa4aed41a3ee76ecc3e00d224cf10fa"
# Refer to image using branch tag
# IMAGE_IDENTIFIER=":branch-pf-reinstate-storylines-rendering"
# Refer to image using build tag
# IMAGE_IDENTIFIER=":build-32653"
# Set environment variables for the AWS CLI
AWS_PROFILE="<A_PROFILE_FROM_JANUS>"
AWS_DEFAULT_REGION="eu-west-1"
IMAGE_ACCOUNT_ID=$(aws ssm get-parameter --name /organisation/accounts/artifacts --query "Parameter.Value" --output text)
REGISTRY="${IMAGE_ACCOUNT_ID}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com"
IMAGE="${REGISTRY}/guardian/dotcom-rendering/dotcom-rendering${IMAGE_IDENTIFIER}"
# Login to AWS ECR https://docs.aws.amazon.com/AmazonECR/latest/userguide/registry_auth.html
aws ecr get-login-password | docker login --username AWS --password-stdin $REGISTRY
# Pull the image
docker pull $IMAGE
# Run the image. You'll likely need to set additional flags. See https://docs.docker.com/reference/cli/docker/container/run.
docker run $IMAGEFrom guardian/actions-ecr. |
b49e9d6 to
92fb78b
Compare
92fb78b to
a0c8181
Compare
1611f9e to
0ad175d
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Upstream contract mismatches can reject entire tag pages, and navigation, accessibility, and hidden-image loading issues remain.
6 open issues
Handle optional image sources and alt text before validation · New Normalize absent category articles before schema validation · New Expose active storyline state to screen readers · New Wrap carousel buttons in measurable list items · New Use lazy loading for hidden archive card images · New Preserve lead headline for accessible splash link labels · New
What changed in this PR
Restores Storylines on tag pages for a new opt-in experiment, reusing existing card layouts and accepting optional Frontend data.
Changes:
- Adds Storylines models, schema validation, transformations, and tests.
- Restores tablet-and-larger rendering with selectors, publication dates, and feedback controls.
- Registers the zero-percent experiment and threads Storylines styling through shared cards.
| File | Description |
|---|---|
| dotcom-rendering/src/types/tagPage.ts | Adds optional Storylines content. |
| dotcom-rendering/src/types/storylinesContent.ts | Defines input and parsed models. |
| dotcom-rendering/src/types/front.ts | Adds supporting-story publication dates. |
| dotcom-rendering/src/server/handler.front.web.ts | Passes Storylines data into tag pages. |
| dotcom-rendering/src/paletteDeclarations.ts | Adds Storylines colours. |
| dotcom-rendering/src/model/enhanceTagPageStorylinesContent.ts | Converts Storylines into card groups. |
| dotcom-rendering/src/model/enhanceTagPageStorylinesContent.test.ts | Tests transformations and data guards. |
| dotcom-rendering/src/lib/formatStorylinesDateRange.ts | Formats edition-aware date context. |
| dotcom-rendering/src/lib/formatStorylinesDateRange.test.ts | Tests date formatting and fallbacks. |
| dotcom-rendering/src/layouts/TagPageLayout.tsx | Inserts the responsive Storylines island. |
| dotcom-rendering/src/frontend/schemas/feTagPage.json | Adds Storylines schema validation. |
| dotcom-rendering/src/frontend/feTagPage.ts | Accepts optional, nullable Storylines data. |
| dotcom-rendering/src/components/YoutubeAtom/YoutubeAtomFeatureCardOverlay.tsx | Explicitly disables Storylines age behaviour. |
| dotcom-rendering/src/components/SvgBetaLabel.tsx | Adds the beta badge. |
| dotcom-rendering/src/components/SupportingKeyStoriesContent.tsx | Renders key-story links and dates. |
| dotcom-rendering/src/components/StorylinesSectionContent.stories.tsx | Adds a dated Storybook example. |
| dotcom-rendering/src/components/StorylinesSectionContent.island.tsx | Implements selection, content, and feedback. |
| dotcom-rendering/src/components/StorylinesSection.tsx | Adds section layout and AI disclosure. |
| dotcom-rendering/src/components/StaticFeatureTwo.tsx | Disables Storylines mode for existing cards. |
| dotcom-rendering/src/components/ScrollableFeature.island.tsx | Disables Storylines mode for existing cards. |
| dotcom-rendering/src/components/FlexibleGeneral.tsx | Propagates Storylines layout behaviour. |
| dotcom-rendering/src/components/FlexibleGeneral.stories.tsx | Sets the standard Storybook mode. |
| dotcom-rendering/src/components/FeatureCardCardAge.tsx | Shows older Storylines publication dates. |
| dotcom-rendering/src/components/FeatureCard.tsx | Passes Storylines mode to card ages. |
| dotcom-rendering/src/components/FeatureCard.stories.tsx | Updates shared story props. |
| dotcom-rendering/src/components/ExpandableAtom/Footer.tsx | Supports left-aligned Storylines feedback. |
| dotcom-rendering/src/components/DecideContainer.tsx | Keeps ordinary containers outside Storylines mode. |
| dotcom-rendering/src/components/CardHeadline.tsx | Supports Storylines sublink typography. |
| dotcom-rendering/src/components/Card/Card.tsx | Adds Storylines dates and supporting-content rendering. |
| dotcom-rendering/fixtures/manual/storylines-section.ts | Supplies representative Storylines content. |
| ab-testing/config/types.ts | Adds the newsroom AI team identifier. |
| ab-testing/config/abTests.ts | Registers the zero-percent server experiment. |
Review effort: Balanced
| i === 0, | ||
| )} | ||
| onClick={() => handleStorylineChange(storyline.id)} | ||
| type="button" |
There was a problem hiding this comment.
Yes, there's a bit of an issue here due to needing to re-use the ScrollableCarousel which doesn't forward aria props and so can't be given a tablist role. For this PR I think it's best not to start changing the ScrollableCarousel component, so I will make a ticket to follow up and find a way to turn this into a proper aria tab component. aria-pressed is a step in the right direction so I've applied that mitigation here now.
…le when we aren't showing the Storylines container on mobile
dee4665 to
3f0d3c2
Compare
alexduf
left a comment
There was a problem hiding this comment.
I can't pretend I've understood it in its entirety, but I think it's looking good!
| webPublicationDate={webPublicationDate} | ||
| showClock={!!showClock} | ||
| serverTime={serverTime} | ||
| isStorylines={false} |
There was a problem hiding this comment.
should we default this attribute to false to avoid injecting it in many components, or is it voluntary to keep it explicit?
There was a problem hiding this comment.
At one point there was a problem with the way it was plumbed through this component, so I thought it worth making a mandatory prop for explicitness. I haven't done that consistently throughout (e.g. with Card) because it would have ended up changing a whole bunch of extra files, so there might be something to be said for consistency..?


What does this change?
Reinstates the rendering of 'Storylines' content on tag pages, if passed as part of the data model from Frontend, behind a 0% test. This functionality was removed previously in #15757.
I've tried to keep things as similar as possible to the original implementation, but there are a couple of changes:
articles published since <date>footer.Contrasting opinionstoOpinions, so I've updated the categories type (standardising the counterintuitiveFind multimediatoMultimedia, too). This is a no-op as far as the rendered page goes, while making the categories type more intuitive. The one expected behaviour change is in the Ophandata-link-name, but I think this slight change is fine because this test will be discontinuous with the previous one.Dependencies
main, and vice versa, and no problems arose. The Storylines data is optional in the DCR data model, so they can be merged in any order.Why?
We are running a new test of the Storylines component.
How has this change been tested?
main; all works as expected.Screenshots