Skip to content

docs: add inline comments to script.js#63

Merged
komalharshita merged 3 commits into
komalharshita:mainfrom
nirvani-nj:docs/scriptjs-comments
May 18, 2026
Merged

docs: add inline comments to script.js#63
komalharshita merged 3 commits into
komalharshita:mainfrom
nirvani-nj:docs/scriptjs-comments

Conversation

@nirvani-nj
Copy link
Copy Markdown
Contributor

Summary

This PR improves the readability of static/script.js by adding beginner-friendly inline comments and function-level explanations across the skill chip manager, form validation, API handling, result rendering, and code viewer logic. The goal is to help new contributors better understand the DOM manipulation and client-side flow without changing any application behavior.

Related Issue

Closes #54

Type of Change

  • Documentation — updates docs, README, or code comments only

What Was Changed

File Change made
static/script.js Added inline comments and beginner-friendly explanations for functions, DOM interactions, validation flow, API requests, and project card rendering

How to Test This PR

  1. Clone this branch: git checkout docs/scriptjs-comments
  2. Install dependencies: pip install -r requirements.txt
  3. Run the app: python app.py
  4. Open http://127.0.0.1:5000/
  5. Test skill chip addition/removal and recommendation generation
  6. Run the tests: python tests/test_basic.py

Expected test output:

27 passed, 0 failed out of 27 tests

Test Results

27 passed, 0 failed out of 27 tests

Self-Review Checklist

  • I have read CONTRIBUTING.md and followed all guidelines
  • My branch name follows the required convention
  • I have run python tests/test_basic.py and all 27 tests pass
  • I have not modified files outside the scope of the linked issue
  • No application logic or UI behavior was changed

Notes for Reviewer

This PR only adds comments/documentation inside static/script.js. No application logic or UI behavior was modified.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 15, 2026

@nirvani-nj 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.

@github-actions github-actions Bot added gssoc-2026 type:docs Improvements or additions to documentation type:accessibility ui and removed type:docs Improvements or additions to documentation gssoc-2026 labels May 15, 2026
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Thank you for submitting your first pull request to DevPath.

Before review:

  • Complete the PR template fully
  • Ensure all tests pass
  • Link your PR to an issue
  • Keep changes scoped to the issue

A maintainer will review your contribution soon.

Copy link
Copy Markdown
Owner

@komalharshita komalharshita left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution. The added inline comments and beginner-focused explanations improve readability and make the frontend logic easier for new contributors to understand.

However, this PR currently has merge conflicts because static/script.js has changed significantly in recent merged PRs. Please sync your branch with the latest main branch and resolve the conflicts before further review.

Also note that another PR is currently working on a very similar documentation improvement for the same file. The first cleanly resolved and review-ready implementation will be considered for merge, while overlapping PRs may be marked as duplicate afterward.

@komalharshita komalharshita added type:docs Improvements or additions to documentation gssoc-2026 level:beginner labels May 15, 2026
@nirvani-nj
Copy link
Copy Markdown
Contributor Author

Resolved merge conflicts by syncing with the latest main branch and preserving the updated functionality.

@komalharshita
Copy link
Copy Markdown
Owner

@nirvani-nj check the pull request again

@komalharshita komalharshita added the need review Further information is requested label May 17, 2026
@nirvani-nj
Copy link
Copy Markdown
Contributor Author

Resolved merge conflicts by syncing with the latest main branch and preserving the updated functionality.

@komalharshita
Copy link
Copy Markdown
Owner

looks good to merge

@komalharshita komalharshita merged commit 47ae1b6 into komalharshita:main May 18, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc-2026 level:beginner need review Further information is requested type:accessibility type:docs Improvements or additions to documentation ui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add inline comments to script.js for new contributors

2 participants