Skip to content

feat(events): show event images in the upcoming list - #601

Merged
mohanadft merged 3 commits into
mainfrom
feat/upcoming-event-images
Oct 29, 2026
Merged

mohanadft merged 3 commits into
mainfrom
feat/upcoming-event-images

Conversation

@mohanadft

Copy link
Copy Markdown
Collaborator

Summary

A teammate suggested showing event images on the events page itself instead of only in the popup. This adds them to the Upcoming section on /events without breaking date-first scanning, and without the list looking broken when an event has no image (common in the feed).

  • Next up spotlight. The soonest confirmed event (has a popup description or a link) gets a large panel. Its image is shown whole (object-contain in a fixed-height Stone frame), because many previews are flyers with text baked in that would be ruined by cropping. The fixed height also prevents layout shift on load. On mobile the image stacks above the text.
  • Row thumbnails. Every other event keeps its row layout and gets a 72px square thumbnail (56px on mobile) only if it has a real image. Rows without one leave no empty slot.
  • Never default.jpg in Upcoming. A spotlight event with no image, or whose image fails to load, shows a typographic date panel instead. A row whose thumbnail fails removes it.
  • No confirmed events means no spotlight; everything stays a row.
  • Design system. The section moves from #EA4335 and gray utilities onto Grove Green and the ink tokens from DESIGN.md. The popup, the Past carousel and the page header are unchanged.

Code

  • eventsLogic.ts: hasPreviewImage, isUpcomingConfirmed, splitSpotlight (pure, unit-tested).
  • EventPreviewImage.tsx: optional onUnavailable, loading, width/height props. Existing callers behave exactly as before.
  • UpcomingEventsSection.tsx: spotlight and row components sharing one click handler (popup, else external link).

Accessibility

Thumbnails use alt="" because the title beside them already names the event. The spotlight image uses alt="Event image for {title}". Every clickable surface has a Grove Green focus outline. No motion was added.

Test plan

  • pnpm test (new tests for the three helpers)
  • pnpm lint (0 errors), pnpm check (0 errors)
  • On a Cloudflare preview, check /events when the next event has a tall flyer, a wide banner, and no image
  • Check the mobile layout (thumbnail stacked above the link; titles not squeezed)
  • Clicking the spotlight or a row opens the popup, or the external link when there's no description

🤖 Generated with Claude Code

The soonest confirmed event gets a "Next up" spotlight with its image shown
whole (object-contain in a fixed-height frame, so tall flyers aren't cropped
and layout doesn't shift). Other rows get a 72px thumbnail only when the event
has a real image. Upcoming never falls back to default.jpg: an image-less or
failed spotlight shows a typographic date panel, and a row simply drops its
thumbnail.

Also moves the section onto the live design system (Grove Green and ink
tokens replace #EA4335 and gray utilities).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Deploying website with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1606710
Status: ✅  Deploy successful!
Preview URL: https://cde048cc.website-aun.pages.dev
Branch Preview URL: https://feat-upcoming-event-images.website-aun.pages.dev

View logs

mohanadft and others added 2 commits October 29, 2026 12:54
The CTA label varies in width ("More info", "Register", "Watch online",
"Soon"), so a content-sized slot pushed each row's thumbnail to a different
x position. Give the CTA a fixed-width, right-aligned slot from sm up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Right-aligned labels in the fixed slot made "Soon" start further right than
"More info". Left-align them so every label starts at the same x.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mohanadft
mohanadft merged commit 2826e3b into main Oct 29, 2026
5 checks passed
@mohanadft
mohanadft deleted the feat/upcoming-event-images branch October 29, 2026 12:28
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.

1 participant