Skip to content

Add image thumbnails to idea list#103

Merged
meganrm merged 7 commits into
mainfrom
feature/images
Jun 11, 2026
Merged

Add image thumbnails to idea list#103
meganrm merged 7 commits into
mainfrom
feature/images

Conversation

@meganrm

@meganrm meganrm commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

Problem

the index page is all text

Review time

small: one new component with styles

Summary

  • Extends the IdeaRoll GraphQL query to fetch the first figure from each idea's preliminaryFindings.figures
  • Renders a pill-shaped thumbnail (88×56px, zoomed in 20%) on the right side of each list item when an image is available — supports both local imageFile figures (via GatsbyImage) and external imageLink figures (plain <img>)
  • Styling: stadium/pill mask with a soft orange (--ALLEN_ORANGE) glow via box-shadow; posts without images are unchanged
  • Extracts thumbnail rendering into a standalone FigureThumbnail component so future image sources only require changes in one place

Example screenshot

Screenshot 2026-06-02 at 3 18 41 PM

Test Plan

  • Verify ideas with a local imageFile figure show a pill thumbnail with orange glow
  • Verify ideas with an external imageLink figure show the same treatment
  • Verify ideas with no figures look identical to before (no empty box, full-width text)
  • Verify yarn typeCheck and yarn test pass

🤖 Generated with Claude Code

@netlify

netlify Bot commented Jun 2, 2026

Copy link
Copy Markdown

Deploy Preview for project-idea-board ready!

Name Link
🔨 Latest commit cd7d620
🔍 Latest deploy log https://app.netlify.com/projects/project-idea-board/deploys/6a2b2ca723712100084a9810
😎 Deploy Preview https://deploy-preview-103--project-idea-board.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 IdeaRoll GraphQL query to fetch preliminaryFindings.figures image data (including gatsbyImageData for local files).
  • Update IdeaRoll list item layout to include a right-aligned thumbnail alongside the text content.
  • Introduce a reusable FigureThumbnail component to render either GatsbyImage or 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.

Comment thread src/components/IdeaRoll.tsx
Comment thread src/components/FigureThumbnail.tsx Outdated
Comment thread src/components/IdeaRoll.tsx

@toloudis toloudis left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM, just one minor thing about the width/height values being repeated

width: 88
height: 56
layout: FIXED
quality: 80

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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?: {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just curious, Is there a non-sharp child image? (like a blurred thumbnail or something?)

Comment thread src/style/idea-roll.module.css Outdated
Comment on lines +85 to +86
0 0 0 1.5px rgba(255, 110, 0, 0.4),
0 0 10px 2px rgba(255, 110, 0, 0.2),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should these color constants be declared somewhere else as variables?

@meganrm meganrm merged commit 17936e6 into main Jun 11, 2026
9 checks passed
@meganrm meganrm deleted the feature/images branch June 11, 2026 21:48
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.

4 participants