Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: More sensible handling of headline and subhead in wires list #165

Merged
merged 3 commits into from
Feb 20, 2025

Conversation

bryophyta
Copy link
Contributor

@bryophyta bryophyta commented Feb 20, 2025

What does this change?

Feed list:

  • main heading: use headline in preference to slug for the main heading; only use slug if there is no headline.
  • sub heading: instead of using the headline, use the subhead 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 no headline.

This seems like the 'right' way to use slug, headline and subhead, 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:
image

AP

AP stories from Fip seem to have their headline and subhead 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

  • Running locally against the CODE db should provide a good sense of how this works with the existing feeds.

Images

Before After
image image
image image
image image

Accessibility

@bryophyta bryophyta marked this pull request as ready for review February 20, 2025 12:47
@bryophyta bryophyta requested a review from a team as a code owner February 20, 2025 12:47
Copy link
Member

@andrew-nowak andrew-nowak left a comment

Choose a reason for hiding this comment

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

lgtm! I'm being very nitpicky with the suggestions, feel free to ignore lol

Co-authored-by: Andrew Nowak <10963046+andrew-nowak@users.noreply.github.com>
@bryophyta bryophyta merged commit dcb6e59 into main Feb 20, 2025
3 checks passed
@bryophyta bryophyta deleted the pf/headline-subhead-in-ui branch February 20, 2025 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants