fix(media): a ride shows its own photo or none - #271
Merged
Conversation
Standing in the park's background photo when a ride had none looked like a graceful fallback. On a park page it looks like a bug: Bolles Flugschule, Bolles Riesenrad and Das verrückte Hotel Tartüff sat next to each other, all three showing the same carousel, one of them a hotel dark ride. An empty card says "no photo of this ride yet", which is true. The park's photo says "this is what the ride looks like", which is not. The empty state was already built — AttractionCard has its gradient placeholder and ParkBackground renders nothing without a source. Dropped the fallback on the cards (enrichAttractionsWithImages, getCardObjectPosition, the blog widgets and the editor's preview of them), on the ride page backdrop, and in the ride's JSON-LD image, which now falls through to the OG card instead of the park's picture. The OG card itself keeps the park photo: there it is chrome behind text naming the ride, not the thing being shown, and a blank social preview is the worse trade. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UaVtda1khmn5Ctu7MFJGpn
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Standing in the park's background photo when a ride had none looked like a graceful fallback. On the Phantasialand park page it looks like a bug — Bolles Flugschule, Bolles Riesenrad and Das verrückte Hotel Tartüff sitting next to each other, all three showing the same carousel, one of them a hotel dark ride.
An empty card says "no photo of this ride yet", which is true. The park's photo says "this is what the ride looks like", which is not.
What changed
The ride → park fallback is gone everywhere a picture stands for a ride:
enrichAttractionsWithImages,getCardObjectPosition)image(getAttractionImageSet)No new empty state was needed:
AttractionCardalready renders its gradient placeholder without a photo, andParkBackgroundalready returnsnullwithout a source.The OG card keeps the park photo. There it is chrome behind text that names the ride, not the thing being shown, and a blank social preview is the worse trade.
Verification
pnpm lint,tsc --noEmitandpnpm buildgreen,test:media49/49. Against a running production server:/api/parks/europe/germany/bruehl/phantasialand— all three rides from the screenshot now come back withbackgroundImage: null, while River Quest, Black Mamba, Taron, F.L.Y., Winja's Fear, Colorado Adventure, Chiapas, Raik, Geister Rikscha and Mystery Castle keep their own./media/URL at all; the Taron page still servestaron.jpgand its three crops.background-16x9/4x3/1x1still resolve there.Winja's Force and YOY Thrill now show no photo rather than their park's; that was already the documented cost of merging the duplicate images, and
docs/features/media-database.mdis updated to say so plainly.🤖 Generated with Claude Code
https://claude.ai/code/session_01UaVtda1khmn5Ctu7MFJGpn
Generated by Claude Code