Skip to content

fix: clear stale empty-state and grid content on new search#806

Open
nancysangani wants to merge 1 commit into
komalharshita:mainfrom
nancysangani:fix/no-results-state-reset
Open

fix: clear stale empty-state and grid content on new search#806
nancysangani wants to merge 1 commit into
komalharshita:mainfrom
nancysangani:fix/no-results-state-reset

Conversation

@nancysangani

Copy link
Copy Markdown

Fixes #730

setLoadingState and renderResults in script.js did not fully reset all three result sub-states (#results-loading, #results-empty, #results-grid) before each transition, causing the "No Projects Found" card to persist visually during a subsequent search.

Changes:

  • static/script.jssetLoadingState(true) now clears resultsGrid.innerHTML and resultsEmptyEl.textContent before showing the spinner; renderResults resets both display states and guards emptyMessageEl against null before branching on result count
  • tests/test_no_results_reset.py — 20 tests covering API state independence, alternating no-match/match sequences, HTML landmark presence, and the two JS fixes

@vercel

vercel Bot commented Jun 8, 2026

Copy link
Copy Markdown

@nancysangani 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:bug Something isn't working type:accessibility ui type:testing and removed type:bug Something isn't working gssoc-2026 labels Jun 8, 2026
@nancysangani

Copy link
Copy Markdown
Author

Hi @komalharshita, please review the PR when you get a chance. Thanks!

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.

[Bug]: "No Projects Found" state overlaps or fails to clear when regenerating project matches

1 participant