Skip to content

Fix View Code button on sample project details page#701

Open
2823sanskar wants to merge 1 commit into
komalharshita:mainfrom
2823sanskar:open-code-bug-fix
Open

Fix View Code button on sample project details page#701
2823sanskar wants to merge 1 commit into
komalharshita:mainfrom
2823sanskar:open-code-bug-fix

Conversation

@2823sanskar
Copy link
Copy Markdown

`

The View Code button on the sample project page was not working because static/script.js contained unclosed braces, which prevented the JavaScript file from loading correctly.

This PR fixes the JavaScript syntax issue, restores the View Code button behavior, adds the missing starter code renderer, and updates the starter code preview to display properly in a centered popup modal.

Users can now open any sample project, click View Code, and preview the starter template as intended.


Related Issue

Closes #700


Type of Change

  • Bug fix — resolves a broken behaviour

  • Style — CSS or visual changes only, no logic change


What Was Changed

static/script.js : Fixed JavaScript syntax issue caused by unclosed braces

static/script.js : Added missing starter code rendering function

templates/project.html : Fixed View Code popup/modal behavior on sample project page

static/styles.css (if changed) : mproved popup modal styling and visibility


Self-Review Checklist


Notes for Reviewer

This PR fixes issue #700 by restoring the View Code functionality on the sample project page.

Kindly add the GSSoC label if applicable.

Thank you.

`

The View Code button failed because script.js had unclosed braces that prevented the entire file from loading. This adds the missing code renderer, fixes the form submit handler, and styles the starter template as a centered popup modal.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 30, 2026

@2823sanskar is attempting to deploy a commit to the komalsony234-1530's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: The View Code button on the sample project details page does not open/show starter code correctly.

1 participant