-
-
Notifications
You must be signed in to change notification settings - Fork 21
Add images to work experience #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add images to work experience #19
Conversation
Add support for displaying featured images in work experience entries with lightbox gallery view. Closes coderdiaz#8
|
@coderdiaz, Pls review the PR. |
There was a problem hiding this comment.
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 image gallery functionality to work experience entries, allowing job entries to display thumbnail images that open in a lightbox viewer when clicked.
- Adds optional
imagesfield to job collection schema - Creates a new React-based
ImageLightboxcomponent with navigation controls - Integrates image thumbnails and lightbox functionality into the
WorkExperiencecomponent
Reviewed Changes
Copilot reviewed 4 out of 9 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/content.config.ts | Updates job collection schema to support optional image arrays |
| src/content/jobs/reboot-studio/index.mdx | Adds sample image paths to demonstrate new image gallery feature |
| src/content/jobs/sofia/index.mdx | Minor formatting fix (adds line number to trailing content) |
| src/components/ui/WorkExperience.astro | Adds image thumbnail rendering and lightbox initialization script |
| src/components/ui/ImageLightbox.tsx | New React component implementing image lightbox with navigation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@shrvansudhakara Could you check the Copilot review? Thanks 🙏 |
- Removed `document.addEventListener('DOMContentLoaded', ...)` wrapper
- Script now executes immediately when the component renders
- Compatible with Astro's client-side navigation and view transitions
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- Remove unnecessary Promise.all from image mapping - Use stable keys for React list items - Implement event delegation to prevent memory leaks - Add accessibility attributes (role, aria-modal, aria-label) - Add keyboard navigation support (Escape, Arrow keys)
- Fix top-level return error in Astro script by wrapping logic in if block - Implement Framer Motion for smooth lightbox animations - Preserve aspect ratio for vertical and horizontal images - Add fade and scale transitions matching reference design - Add body scroll lock when lightbox is open
|
@coderdiaz, Pls review the revisions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works amazing! Great job!
|
|
🗒️ Description
This PR adds support for displaying featured images in work experience entries with an interactive lightbox gallery. Users can now showcase visual highlights from their roles (project screenshots, team photos, etc.).
Fixes #8
📝 Changes
Modified Files
src/content.config.ts- Addedimagesfield to job collection schemasrc/components/ui/WorkExperience.astro- Added image thumbnail display and lightbox integrationsrc/content/jobs/- Reorganized into subdirectories (each job in its own folder)New Files
src/components/ui/ImageLightbox.tsx- React component for full-screen image gallery with navigationsrc/content/jobs/reboot-studio/index.mdx- Restructured with example imagessrc/content/jobs/reboot-studio/image-*.jpg- Example featured images🚀 Features
🔧 Implementation Details
Schema update:
Directory structure:
Lightbox features:
✅ Testing
📸 Screenshots
Thumbnail Gallery:

Lightbox View:




🎥 Demo
demo.mp4
🔗 Related
Note: Feature is optional and won't affect experiences without image(s).