Skip to content

feat: Add project preview thumbnails to project cards - #8483

Open
nishtha-agarwal-211 wants to merge 22 commits into
dhairyagothi:Mainfrom
nishtha-agarwal-211:feat/preview-thumbnails-7956
Open

nishtha-agarwal-211 wants to merge 22 commits into
dhairyagothi:Mainfrom
nishtha-agarwal-211:feat/preview-thumbnails-7956

Conversation

@nishtha-agarwal-211

Copy link
Copy Markdown
Contributor

Description

Resolves #7956

This PR introduces visual screenshot previews (thumbnails) to all project cards on the homepage grid. Previously, the grid only displayed text metadata (title, description, tags), which made browsing less engaging. Adding visual thumbnails provides immediate visual context for each project, making the browsing experience significantly more premium, dynamic, and intuitive.

Key Changes

1. Centralized Preview Generation (scripts/generate-previews.js)

  • Configured the Puppeteer viewport to 800x500 (retaining the standard 16:10 / 1.6 aspect ratio for thumbnails) to ensure text and components are clearly readable.
  • Centrally stored generated screenshots inside the public/previews/ directory (e.g. public/previews/<project_folder_name>.png) instead of scattering them in individual project directories.
  • Filtered out utility folders like previews, images, and node_modules from screenshot generation.

2. Auto-Mapped Metadata & Validation Fixes (projects.json)

  • Mapped all 229 projects in the registry to their local directory paths and appended the previewImage property.
  • Fixed 4 pre-existing path errors in the registry (specifically for Zomato-clone, Quiz App Timer, Gemini Clone, and Mind Reader) to ensure that the repository's automatic metadata schema checks pass perfectly.

3. Dynamic Card Rendering (index.js)

  • Extracted and resolved the previewImage field relative to the current URL base, maintaining compatibility for both the main homepage and the /contributors/ directories.
  • Rendered the thumbnail inside card structures with an onerror="this.parentNode.style.display='none';" fallback so that cards gracefully revert to their clean text-only layout if their screenshot is missing.

4. Styled Container & Smooth Hover Animation (style.css)

  • Styled .card-preview-image-container and its inner image to enforce rounded corners, border accents, and a dark background mask.
  • Added a zoom micro-animation on hover (scale(1.05)) with ease transitions to make cards feel highly responsive and interactive.

Copilot AI review requested due to automatic review settings June 14, 2026 16:43
@vercel

vercel Bot commented Jun 14, 2026

Copy link
Copy Markdown

@nishtha-agarwal-211 is attempting to deploy a commit to the Dhairya Gothi 's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for submitting your pull request! 🙌 We'll review it as soon as possible. In the meantime, please ensure that your changes align with our CONTRIBUTING.md. If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@dhairyagothi dhairyagothi added gssoc:approved Approved by admin level:intermediate Intermediate difficulty task type:refactor Refactoring/improvement labels Jun 15, 2026
@vercel

vercel Bot commented Jun 15, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
100-days-100-web-project Ready Ready Preview, Comment Jun 28, 2026 5:15am

@dhairyagothi

Copy link
Copy Markdown
Owner

Projects are not showing

Comment thread scripts/generate-previews.js Fixed
@nishtha-agarwal-211

Copy link
Copy Markdown
Contributor Author

Hey @dhairyagothi , Can you please review this pr when you have time!

- Re-add project dhairyagothi#245 (Flashcard Quiz) to projects.json with previewImage
- Restore skeleton shimmer loader CSS classes used by renderSkeletons() in index.js

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@vercel

vercel Bot commented Jul 24, 2026

Copy link
Copy Markdown

Deployment failed with the following error:

The provided GitHub repository does not contain the requested branch or commit reference. Please ensure the repository is not empty.

@nishtha-agarwal-211

Copy link
Copy Markdown
Contributor Author

Hi @dhairyagothi ! Hope you're doing well. Just following up on this PR. It is up-to-date with main and ready for review whenever you get a chance. Thank you for your time and support!

This branch was successfully deployed

1 active (outdated) deployment
Preview — 33432765 Deployed Jun 28, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved Approved by admin level:intermediate Intermediate difficulty task type:refactor Refactoring/improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Add project preview thumbnails to project cards

4 participants