Add a dashboard search box to the landing page - #171
Merged
Conversation
Filters the landing page by dashboard name and description as you type. Names and descriptions are matched differently on purpose. A name is matched as a plain substring of the whole query, stopwords included, so "guat" finds "Guatemala Hands On 1" and a dashboard actually called "The Basin" stays findable by typing "the". A description is matched by its significant words only, with common English function words dropped from the query. Requiring "the" to appear would surface nearly every dashboard in the app, which is noise rather than a filter. A query made up entirely of stopwords therefore leaves no description terms and falls back to name matching alone -- the case that makes the feature worth having. Two supporting choices: query tokens match inside longer words, so "flood" finds "flooding"; and both sides are NFD-normalized before comparison, so "clasificacion" finds "Clasificación". The matcher lives in its own module and is pure, so it is tested directly rather than only through the rendered page. The box hides itself when there are no dashboards to search, reports "n of m dashboards" while filtering, offers a clear button, and shows a no-matches message instead of an empty page. The New Dashboard tile is hidden while a query is active, since it is not a dashboard and would read as a match. No backend change: name and description are already in the dashboard metadata. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Filters the landing page by dashboard name and description as you type. Names and descriptions are matched differently on purpose.
A name is matched as a plain substring of the whole query, stopwords included, so "guat" finds "Guatemala Hands On 1" and a dashboard actually called "The Basin" stays findable by typing "the".
A description is matched by its significant words only, with common English function words dropped from the query. Requiring "the" to appear would surface nearly every dashboard in the app, which is noise rather than a filter. A query made up entirely of stopwords therefore leaves no description terms and falls back to name matching alone -- the case that makes the feature worth having.
Two supporting choices: query tokens match inside longer words, so "flood" finds "flooding"; and both sides are NFD-normalized before comparison, so "clasificacion" finds "Clasificación".
The matcher lives in its own module and is pure, so it is tested directly rather than only through the rendered page. The box hides itself when there are no dashboards to search, reports "n of m dashboards" while filtering, offers a clear button, and shows a no-matches message instead of an empty page. The New Dashboard tile is hidden while a query is active, since it is not a dashboard and would read as a match.
No backend change: name and description are already in the dashboard metadata.