Add image thumbnails to idea list#103
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
✅ Deploy Preview for project-idea-board ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
This PR adds optional image thumbnails to each item in the IdeaRoll list by querying the first preliminaryFindings.figure and rendering it as a pill-shaped thumbnail when present (supporting both local imageFile and external imageLink figures).
Changes:
- Extend the
IdeaRollGraphQL query to fetchpreliminaryFindings.figuresimage data (includinggatsbyImageDatafor local files). - Update
IdeaRolllist item layout to include a right-aligned thumbnail alongside the text content. - Introduce a reusable
FigureThumbnailcomponent to render eitherGatsbyImageor a plain<img>for external URLs.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/style/idea-roll.module.css | Adds flex layout and pill-thumbnail styling (size/mask/shadow). |
| src/components/IdeaRoll.tsx | Fetches figure data and conditionally renders a thumbnail per idea. |
| src/components/FigureThumbnail.tsx | New component that renders a local Gatsby image or external image URL thumbnail. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| width: 88 | ||
| height: 56 | ||
| layout: FIXED | ||
| quality: 80 |
There was a problem hiding this comment.
magic numbers? they seem to be repeated in the css also, so I wonder if they can be factored out into one place somehow.
| figure: { | ||
| url?: string | null; | ||
| file?: { | ||
| childImageSharp?: { |
There was a problem hiding this comment.
Just curious, Is there a non-sharp child image? (like a blurred thumbnail or something?)
| 0 0 0 1.5px rgba(255, 110, 0, 0.4), | ||
| 0 0 10px 2px rgba(255, 110, 0, 0.2), |
There was a problem hiding this comment.
Should these color constants be declared somewhere else as variables?
Problem
the index page is all text
Review time
small: one new component with styles
Summary
IdeaRollGraphQL query to fetch the first figure from each idea'spreliminaryFindings.figuresimageFilefigures (via GatsbyImage) and externalimageLinkfigures (plain<img>)--ALLEN_ORANGE) glow viabox-shadow; posts without images are unchangedFigureThumbnailcomponent so future image sources only require changes in one placeExample screenshot
Test Plan
imageFilefigure show a pill thumbnail with orange glowimageLinkfigure show the same treatmentyarn typeCheckandyarn testpass🤖 Generated with Claude Code