Skip to content

Feat/add clear button and persistance#253

Open
pavithapari wants to merge 5 commits into
komalharshita:mainfrom
pavithapari:feat/add-clear-button-and-persistance
Open

Feat/add clear button and persistance#253
pavithapari wants to merge 5 commits into
komalharshita:mainfrom
pavithapari:feat/add-clear-button-and-persistance

Conversation

@pavithapari
Copy link
Copy Markdown

Summary

This PR adds a Reset button to the recommendation form and implements localStorage persistence so the user’s selected skills, experience level, area of interest, and time availability are restored after a page reload. It also updates the form styling and markup to support the new button in the UI.

Related Issue

Closes #170

Type of Change

  • Bug fix — resolves a broken behaviour
  • Feature — adds new functionality
  • Style — CSS or visual changes only, no logic change
  • Data — adds new projects to projects.json
  • Documentation — updates docs, README, or code comments only
  • Refactor — restructures code without changing behaviour
  • Test — adds or updates tests

What Was Changed

File Change made
index.html Added the Reset button to the recommendation form
style.css Styled the Reset button so it matches the form layout
script.js Added localStorage persistence for selected skills and form fields, and wired the Reset button to clear both UI state and stored data

How to Test This PR

  1. Clone this branch: git checkout feat/add-clear-button-and-persistance
  2. Install dependencies: pip install -r requirements.txt
  3. Run the app: python app.py
  4. Open the app in the browser.
  5. Select skills, experience level, interest, and time availability.
  6. Reload the page and confirm the values are restored.
  7. Click Reset and confirm the selections are cleared.
  8. Reload again and confirm nothing is persisted.

Test Results

  PASS  test_projects_json_loads
  PASS  test_each_project_has_required_fields
  PASS  test_find_project_by_id_found
  PASS  test_find_project_by_id_missing
  PASS  test_parse_skills_basic
  PASS  test_parse_skills_empty_string
  PASS  test_parse_skills_single_entry
  PASS  test_score_single_project_full_match
  PASS  test_score_single_project_no_match
  PASS  test_get_recommendations_returns_results
  PASS  test_get_recommendations_max_three
  PASS  test_get_recommendations_no_match_returns_empty
  PASS  test_get_recommendations_result_format
  PASS  test_validate_all_valid
  PASS  test_validate_missing_skills
  PASS  test_validate_missing_level
  PASS  test_validate_missing_interest
  PASS  test_validate_missing_time
  PASS  test_validate_all_missing
  PASS  test_home_route
  PASS  test_recommend_api_valid
  PASS  test_recommend_api_missing_field
  PASS  test_recommend_api_empty_body
  PASS  test_project_detail_found
  PASS  test_project_detail_not_found
  PASS  test_internal_server_error_page
  PASS  test_view_code_found
  PASS  test_download_code_found

28 passed, 0 failed out of 28 tests

Screenshots

Before After
image image

Self-Review Checklist

  • I have read CONTRIBUTING.md and followed all guidelines
  • My branch name follows the convention: feat/, fix/, docs, data, style/, test/
  • I have run python tests/test_basic.py and all 27 tests pass
  • I have run flake8 . locally and there are no errors
  • I have not introduced any print() or console.log() debug statements
  • Every new function I wrote has a docstring
  • I have not modified files outside the scope of the linked issue
  • If I changed the UI, I tested it at 375px (mobile) and 1280px (desktop)
  • If I added a project to the dataset, it has all required JSON fields

Notes for Reviewer

The form state is stored in localStorage and cleared when Reset is pressed. Please verify the reload behavior for both the skill chips and the select inputs.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 17, 2026

@pavithapari 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.

@pavithapari
Copy link
Copy Markdown
Author

@komalharshita Please review this pr

@komalharshita
Copy link
Copy Markdown
Owner

@pavithapari kindly resolve the merge conflicts

@pavithapari
Copy link
Copy Markdown
Author

pavithapari commented May 20, 2026

@komalharshita

  1. Resolved merge conflicts between feat/add-clear-button-and-persistance and main, keeping the Clear Filters button and autocomplete="off" from main.
  2. Fixed leftover issues from the merge including duplicate labels, duplicate submit button, and broken feature card markup. Also fixed stat card sizing/spacing and the skill strip marquee animation that was defined but never applied.
  3. Tested locally and everything looks fine.
  4. Please merge this before any other PRs — the current UI on main is broken and will cause issues for anyone working on top of it.
  5. This pr also solves the current problems in the website including broken code in the form and floating skillsets
  6. Current PR also solves issues [Bug]: Prevent Supporting Skills Section from Overflowing Viewport Width #382,Bug: Raw HTML/Code Visible Inside Skills Input Field #357,[bug] Skills Box gives Code segment in Display, Add more skill sets #377,[Enhancement]: Minor UI/UX issues in supported skills tab that kind of requires redesigning #342

I have made this contribution under GSSoc'26

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.

Add “Clear All Selections” button and persist user preferences

2 participants