fix: repair broken form submit handler and restore Clear Filters function#443
fix: repair broken form submit handler and restore Clear Filters function#443ckprojects77 wants to merge 2 commits into
Conversation
…tionality fixes komalharshita#409 Signed-off-by: chaitanya kumari <chaitanyakumarichalla099@gmail.com>
|
@ckprojects77 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. |
komalharshita
left a comment
There was a problem hiding this comment.
Thank you for the contribution.
I reviewed the changes and verified that this PR repairs the broken form submission flow and cleans up duplicated logic in static/script.js.
The updated submit handler correctly preserves the validation → loading → API request → response/error handling sequence, while the renderResults() cleanup removes duplicated conditions that could cause inconsistent empty-state behavior.
The changes are focused, improve maintainability, and directly address user-facing issues without introducing unrelated functionality.
Looks good to me and is ready to be merged.
|
@ckprojects77 resolve the conflicts before merging |
|
I opened this issue and would like to work on it under GSSoC 2026. |
Summary
The Clear Filters button on the Find Project page was completely non-functional. The root cause was a duplicate nested fetch block inside the form submit handler in script.js that caused a JavaScript syntax error, crashing the entire script before any event listeners could register including the Clear Filters click handler. Fixed by removing the duplicate broken fetch block and replacing the entire submit handler with a single clean version.
Related Issue
Closes #409
Type of Change
What Was Changed
|
static/script.js| Removed duplicate nested fetch block inside catch handler that was causing a syntax error and preventing all event listeners from registering.How to Test This PR
git checkout fix/clear-filters-buttonpip install -r requirements.txtpython app.pyTest Results
Frontend only fix no backend tests affected.
Screenshots
Before: Clicking Clear Filters did nothing
After: All fields reset correctly on click
Self-Review Checklist
Notes for Reviewer
This is a pure JavaScript fix in static/script.js. No Python backend files were modified. The duplicate fetch block was introduced by a previous contributor and was breaking the entire script execution.