Fix: More sensible handling of headline and subhead in wires list #165
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this change?
Feed list:
headline
in preference toslug
for the main heading; only use slug if there is no headline.headline
, use thesubhead
if it's present, or the first 100 characters of the body text if not. Only show if it's not the same as the heading.Detail view:
Show the
slug
as part of the headline, but visually de-emphasized unless there is noheadline
.This seems like the 'right' way to use
slug
,headline
andsubhead
, and it's more in line with how the agencies render their own content. There are cases where this doesn't work perfectly for our current data (noted below) but it feels like we should try to fix those upstream unless that's not possible.Known issues
These are not ideal, but it feels most sensible to try and fix these upstream so that we can use the headline as the main heading, and the subhead (where present) as the subheading.
AFP
Currently all the AFP stories we're getting from Fip have their subhead set to

JZ
, which is surfaced by this change:AP
AP stories from Fip seem to have their
headline
andsubhead
switched around.PA
When a
headline
is set, it's often repeated at the beginning of the body text, which means that the subheading is repetitive.How to test
Images
Accessibility