You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 21, 2019. It is now read-only.
Improve the UI of the current search results page, perhaps using a similar layout as Github which allows to select which object the user wants to see the results for.
The text was updated successfully, but these errors were encountered:
@msb and myself sketched this out on a whiteboard. We think that this can be done by improving the existing search API to use Django's full text search API. The per-resource type lists can then be populated using the existing API.
This brings us to the list on the left. Looking at how GitHub does it, the search counts on the left are loaded asynchronously and can appear some seconds after the page load. E.g., https://github.com/search?q=linux takes up to two seconds to fill all the numbers in.
Unfortunately we currently use CursorPagination which does not support counting the number of resources. Adding the count for all calls would be inefficient; counts are expensive to compute. One option is to add a countOnly parameter so that, e.g. /api/playlists/?search={query}&countOnly would return
{
"resultCount": 12345
}
With this change the numbers next to the resources can be filled in asynchronously by fetching /api/{resourceType}/?search={query}&countOnly.
Change the existing /api/{playlists,channels,media}?search={query} API to use full-text search for the query.
Add a "countOnly" parameter to the resource list which returns simply a count of the resources. (This may require implementing a custom paginator based on CursorPagination?)
And the bit required for this story is:
Implement a new /search page in the UI which uses the API to populate the individual lists of resources by type and the new "countOnly" query to populate the numbers.
Improve the UI of the current search results page, perhaps using a similar layout as Github which allows to select which object the user wants to see the results for.
The text was updated successfully, but these errors were encountered: