Skip to content

Conversation

@ayush-pandey047
Copy link
Contributor

This PR adds a Random Photo Viewer app example:

  • Fetches random photos from Unsplash API
  • Shows a loader while images load
  • Fixed image display area with fade-in
  • Attractive gradient header with hover animation
  • Responsive design for mobile and desktop

@vercel
Copy link

vercel bot commented Oct 6, 2025

@ayush-pandey047 is attempting to deploy a commit to the Suman Kunwar's projects Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Oct 6, 2025

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

Project Deployment Preview Comments Updated (UTC)
learn-javascript Ready Ready Preview Comment Oct 6, 2025 11:44pm

@sumn2u sumn2u requested a review from Copilot October 6, 2025 23:43
Copy link
Contributor

Copilot AI left a 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 a new Random Photo Viewer example application that displays random photos with an attractive user interface. The app includes a loader animation while images load and features responsive design for both mobile and desktop views.

  • Implements a random photo viewer with fade-in animations and loading states
  • Creates an attractive gradient header with hover effects and responsive layout
  • Includes comprehensive styling with modern CSS features and mobile responsiveness

Reviewed Changes

Copilot reviewed 4 out of 10 changed files in this pull request and generated 3 comments.

File Description
examples/random-photo-viewer/index.html HTML structure with header, button, and image display area
examples/random-photo-viewer/script.js JavaScript logic for random photo selection and loading states
examples/random-photo-viewer/style.css Complete CSS styling with gradients, animations, and responsive design
examples/random-photo-viewer/README.md Documentation explaining the project features and concepts

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

<button id="btn">Show Random Photo</button>
</div>


Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

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

[nitpick] Remove extra blank lines between the closing header div and the image-wrapper div to maintain consistent spacing throughout the HTML.

Suggested change

Copilot uses AI. Check for mistakes.
Comment on lines +22 to +23


Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

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

[nitpick] Remove extra blank lines before the script tag to maintain consistent spacing throughout the HTML.

Suggested change

Copilot uses AI. Check for mistakes.
Comment on lines +5 to +10
const photos = [
"images/photo1.jpg",
"images/photo2.jpg",
"images/photo3.jpg",
"images/photo4.jpg",
"images/photo5.jpg"
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

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

The hardcoded image paths reference files that don't exist in the repository. This will result in broken images and failed loading. Consider using placeholder images or documenting that users need to add these images to an 'images' folder.

Suggested change
const photos = [
"images/photo1.jpg",
"images/photo2.jpg",
"images/photo3.jpg",
"images/photo4.jpg",
"images/photo5.jpg"
// You can replace these placeholder URLs with your own images by adding them to an 'images' folder
// and updating the paths below (e.g., "images/photo1.jpg").
const photos = [
"https://via.placeholder.com/400x300?text=Photo+1",
"https://via.placeholder.com/400x300?text=Photo+2",
"https://via.placeholder.com/400x300?text=Photo+3",
"https://via.placeholder.com/400x300?text=Photo+4",
"https://via.placeholder.com/400x300?text=Photo+5"

Copilot uses AI. Check for mistakes.
Copy link
Owner

@sumn2u sumn2u left a comment

Choose a reason for hiding this comment

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

LGTM.

Image

@sumn2u
Copy link
Owner

sumn2u commented Oct 7, 2025

Fixes #322

@sumn2u sumn2u merged commit b8c75ee into sumn2u:main Oct 7, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants