fix(resources): render SVG thumbnails in cards#7711
Open
arjunmehta-git wants to merge 1 commit intomasterfrom
Open
fix(resources): render SVG thumbnails in cards#7711arjunmehta-git wants to merge 1 commit intomasterfrom
arjunmehta-git wants to merge 1 commit intomasterfrom
Conversation
Query SVG thumbnail fields for the Resources grid and teach the shared card component to fall back to SVG and dark SVG assets when raster thumbnails are unavailable. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Arjun Mehta <231106746+arjunmehta-git@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR fixes missing thumbnails in the Resources listings by querying SVG thumbnail fields and updating the shared Card component to fall back to SVG assets (including dark-mode variants) when raster thumbnails aren’t available.
Changes:
- Extend the Resources grid static query to include
thumbnail_svganddarkthumbnail_svg. - Update the shared
Cardcomponent to prefer raster thumbnails but fall back to SVG (and use dark variants in dark mode). - Avoid rendering the image component when no thumbnail exists.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/sections/Resources/Resources-grid/DataWrapper.js | Adds SVG thumbnail fields to the allMdx query used by the Resources grid. |
| src/components/Card/index.js | Implements thumbnail selection logic with SVG and dark-mode fallbacks, and guards image rendering when missing. |
leecalcote
reviewed
May 6, 2026
Member
leecalcote
left a comment
There was a problem hiding this comment.
Thanks. Let's see what the deploy preview looks like.
ritzorama
approved these changes
May 6, 2026
Contributor
|
🚀 Preview deployment: https://layer5.io/pr-preview/pr-7711/
|
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.
Summary
thumbnail_svganddarkthumbnail_svgfor the Resources gridProblem
The Resources page requested only raster thumbnail fields, while a set of published resources define only SVG thumbnail metadata. The shared card component also ignored the SVG fields, so those cards rendered without images.
Result
Resources cards now render available SVG thumbnails, including dark-mode variants when present.