previously, there was effort made to introduce search UI at #152. this PR completes that line of work by introducing full searching and filtering search results functionality
Changes
abstract subcomponents of <SearchResult/>
update <SearchResultContent/> to encapsulate search filtering logic
update <searchResult.Title/> component to be server-sided
expose radix-ui toggle group's onValueChange prop at <SearchResult.Filter/>
add search function searchProf and searchCourse at @/common/functions/*
[!IMPORTANT]
note that the quick and dirty sql query used is meant to be temporary, until we can find a sensible search solution with #72
Filter
radix-ui toggle group with exposed hook to update filter state
conditional rendering based on filter state
ranking: course is always ranked above professor
[!WARNING]
the review count & course/professor count statistics icon is currently using hard coded values (11 & 31) this will be addressed as a separate task at #162
How to Test
head to preview link
click / to open search bar
search anything, search "L" for example
should see results
a. if no results, should see a message "no results found"
closes #140
Context
previously, there was effort made to introduce search UI at #152. this PR completes that line of work by introducing full searching and filtering search results functionality
Changes
<SearchResult/>
<SearchResultContent/>
to encapsulate search filtering logic<searchResult.Title/>
component to be server-sidedonValueChange
prop at<SearchResult.Filter/>
searchProf
andsearchCourse
at@/common/functions/*
Implementation Details
Search
Filter
How to Test
/
to open search barPreview / Screenshots
Checklist