Fix View Code button on sample project details page#701
Open
2823sanskar wants to merge 1 commit into
Open
Conversation
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.
|
@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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
`
The View Code button on the sample project page was not working because
static/script.jscontained 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
I have read CONTRIBUTING.md and followed all guidelines
My branch name follows the required naming convention
I tested locally before submitting
I did not leave any debug statements
I only modified files related to issue [Bug]: The View Code button on the sample project details page does not open/show starter code correctly. #700
I tested UI on desktop and mobile
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.
`