Skip to content

Show a message when no projects match the search or tag filter - #777

Open
GuillermoBarreto wants to merge 1 commit into
firstcontributions:mainfrom
GuillermoBarreto:fix/no-results-filter-message
Open

GuillermoBarreto wants to merge 1 commit into
firstcontributions:mainfrom
GuillermoBarreto:fix/no-results-filter-message

Conversation

@GuillermoBarreto

Copy link
Copy Markdown

What: when a search term (alone or combined with a tag filter) matches no projects, the project list currently goes completely blank with no feedback. This adds a #no-results message below the list ("No projects match your search or tag filter. Try a different search term or clear the filter.") that is shown only when the filtered list is empty, and hidden again as soon as anything matches.

Why: on a site aimed at first-time contributors, a blank page after searching looks broken and gives no hint what to do next. The message is hidden by default (and stays hidden with JavaScript disabled), so there is no change for users who are not filtering.

Change: src/components/ProjectList.astro only — one message element, one toggle in filterProjects(), plus matching styling.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant