Skip to content

feat(features): rebuild /features as a photo-led page in the Sports/News language - #185

Open
anthonysantiago-eng wants to merge 1 commit into
decemberfrom
claude/project-thread-hh43al
Open

anthonysantiago-eng wants to merge 1 commit into
decemberfrom
claude/project-thread-hh43al

Conversation

@anthonysantiago-eng

Copy link
Copy Markdown
Collaborator

Requested by Anthony · project thread

What

Rebuilds /features on the layout language of the new Sports and News pages:

Part Fills from
Cover: full-width photo (2.35:1 desktop, 4:5 phones, focal-point crop), title box over its lower left, dek, byline, read time Pin, else newest story with a photo
Second story: portrait photo beside headline + dek Pin, else next newest
The Lens: one photo a day, photographer credited at byline size and linked to their staff page Photos editors pick (rotates daily); falls back to recent credited photos from any section
Two strips (News-style) Pins, else next newest
Photo Stories: 3 photo cards with photo counts Pins (editor chooses which photo each card shows), else photo-led stories only
From the Archive: the Sports carousel Next 12 stories

Replaces the three-column index (On Campus / Latest / Arts / Photo Spotlight carousel / More in Features).

Keeping it current without weekly upkeep

Features runs 2 to 3 stories a month in term, so:

  • A pinned story stays until changed, unless it's more than 6 weeks older than the newest Features story. Then the slot fills automatically.
  • The Lens rotates through the editors' set daily. If the set is empty or every photo in it was added more than 2 months ago, it shows recent credited photos instead.
  • Photo Stories only auto-fill with photo-led stories ("Photo" in the kicker, photo feature, or a gallery/carousel block), so the label never lies.

Notes for review

  • No schema change. features-page-layout.layout is already JSON. The new shape (version: 2) is in lib/featuresLayout.ts. normalizeFeaturesLayout carries old saves over (hero/subs → cover/second/strips, Photo Spotlight → The Lens, spotlight stories → Photo Stories). On Campus, Latest and Arts pins are dropped. Production keeps rendering the old layout's pins until someone saves in the new editor.
  • SportsFeatured gains optional heading, headingId, allHref and allLabel props (defaults unchanged) so Features can reuse the carousel.
  • The layout editor is rebuilt around the new slots. It keeps drag and drop and the existing photo browser (now "The Lens", searching all sections). There's also a per-story photo picker under each pinned Photo Story.
  • scripts/seed-features.ts writes the new shape.
  • Docs: docs/features-section.md.

Testing

  • pnpm lint, pnpm typecheck: clean
  • pnpm test:unit: 83 passed, including new tests/lib/featuresPage.test.ts (old-layout carry-over, auto-fill, stale pins, Lens rotation and fallback)
  • Ran locally on seed data at 1440px and 390px. In the editor: pinned a cover and a Photo Story, chose that story's photo, activated, and checked the page.

Generated by Claude Code

…ews language

The Features page used the old three-column index: a boxed-in lead with no
dek, two rails of small headlines, and three overlapping "more" lists. It
now follows the Sports and News layout:

- Cover story across the page, with the title box over the photo's foot
  (4:5 on phones, focal-point cropped)
- A two-to-one row: a second story with a portrait photo, and The Lens, one
  photo a day from a set editors pick, with the photographer credited like
  an author
- Two wide strips, a Photo Stories row, and From the Archive (the Sports
  carousel, now taking a heading and closing link)

Every slot can be pinned in the layout editor and fills itself when empty.
A pin more than six weeks older than the newest story gives way, and The
Lens falls back to recent credited photos when its picks are empty or over
two months old, so a quiet month leaves the page current. Photo Stories
only auto-fill with photo-led stories, and editors can choose which photo a
pinned one shows.

The layout stays a JSON field (no migration). Old layouts are carried over
by normalizeFeaturesLayout.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TTjZzRUF1shh4dw3Y211AA
@anthonysantiago-eng anthonysantiago-eng self-assigned this Nov 22, 2026
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