Skip to content

Conversation

@Kanavpreet-Singh
Copy link
Contributor

worked on issue #352 under hacktoberfest 2025

Screenshot:
Screenshot 2025-10-17 214340

@vercel
Copy link

vercel bot commented Oct 17, 2025

@Kanavpreet-Singh 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 17, 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 17, 2025 4:34pm

💡 Enable Vercel Agent with $100 free credit for automated AI reviews

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

Adds a new beginner project page describing and embedding a Simon Says memory game, including features, concepts practiced, and a live demo.

  • Introduces a new project doc with description, features, and bonus challenges
  • Embeds a live demo via an iframe (CodeSandbox)

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

Comment on lines +33 to +37
<iframe src="https://codesandbox.io/p/sandbox/frosty-nobel-849xrz"
style="width:100%; height: 500px; border:0; border-radius: 4px; overflow:hidden;"
title="simon-says-game"
allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking"
sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

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

The iframe src points to a CodeSandbox editor URL (/p/sandbox/...) which is typically blocked from embedding; use the embed endpoint instead. Replace with https://codesandbox.io/embed/frosty-nobel-849xrz (optionally add query params like ?fontsize=14&hidenavigation=1&theme=light).

Copilot uses AI. Check for mistakes.

## Live Demo

<div align="center">
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

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

[nitpick] The align attribute is obsolete in HTML5. Prefer a style-based approach, e.g., <div style="text-align:center"> or a CSS class.

Suggested change
<div align="center">
<div style="text-align:center;">

Copilot uses AI. Check for mistakes.
Comment on lines +36 to +37
allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking"
sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

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

The iframe permissions and sandbox flags are overly broad for a simple game embed; apply the principle of least privilege. Suggest narrowing to only what’s needed, e.g., allow="fullscreen" and sandbox="allow-scripts allow-same-origin".

Suggested change
allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking"
sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
allow="fullscreen"
sandbox="allow-scripts allow-same-origin"

Copilot uses AI. Check for mistakes.
<div align="center">
<iframe src="https://codesandbox.io/p/sandbox/frosty-nobel-849xrz"
style="width:100%; height: 500px; border:0; border-radius: 4px; overflow:hidden;"
title="simon-says-game"
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

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

Add loading="lazy" to the iframe to defer loading the demo until it scrolls into view, improving page load performance.

Suggested change
title="simon-says-game"
title="simon-says-game" loading="lazy"

Copilot uses AI. Check for mistakes.
title="simon-says-game"
allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking"
sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
></iframe>
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

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

Provide a fallback link for users/browsers that block iframes. Add a link just below the iframe, e.g.,

<a href="https://codesandbox.io/s/frosty-nobel-849xrz\" target="_blank" rel="noopener noreferrer">Open live demo on CodeSandbox

.

Suggested change
></iframe>
></iframe>
<p><a href="https://codesandbox.io/s/frosty-nobel-849xrz" target="_blank" rel="noopener noreferrer">Open live demo on CodeSandbox</a></p>

Copilot uses AI. Check for mistakes.
@sumn2u
Copy link
Owner

sumn2u commented Oct 17, 2025

@Kanavpreet-Singh Is it possible to put the whole source code inside a folder under examples folder like others?

@Kanavpreet-Singh
Copy link
Contributor Author

added @sumn2u

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

@sumn2u sumn2u merged commit 6728425 into sumn2u:main Oct 18, 2025
1 of 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