bobertoyin / cubecrit

A website for reviewing speedcubes.
0 stars 0 forks source link

Create Search Page #2

Closed bobertoyin closed 1 month ago

bobertoyin commented 6 months ago

To enable users to search through our site's content, we need a search page to show users what cubes are available for review.

The search URL should look something like /search?q=<query string>&puzzle_type=<puzzle_type external id>&manufacturers=<multiple manufacturer external ids>&sort_by=<sorting method>&page=<page number>.

q represents the search query that the user has entered, and will be used to filter out puzzles by their display name. This parameter can be optional/empty.

puzzle_type represents the puzzle type that users want to filter by. This parameter can be optional/empty.

manufacturers represents the manufacturers that users want to filter by. This parameter can be optional/empty.

sort_by represents the sorting method for the results. This could be something like "A-Z", "Rating: High to Low", etc.

page represents the page number for the results. We want to paginate our results to prevent large database loads and slow response times. Each page should show the same number of results (this number will be determined by our back-end, and is not user-configurable). If this parameter is missing/empty then we assume that we are showing the first page of results.

Additionally, the search bar on the home page should route the user to this page with the appropriate parameters.