3bdfb7a7aa
When searching for repository topics, either via the API, or via Explore, paging did not work correctly, because it only applied when the `page` parameter was non-zero. Paging should have applied when the page size is greater than zero, which is what this patch does. As a result, both the API, and the Explore endpoint will return paged results (30 by default). As such, when managing topics on the frontend, the offered completions will also be limited to a pageful of results, based on what the user has already typed. This drastically reduces the amount of traffic, and also the number of the topics to choose from, and thus, the rendering time too. The topics will be returned by popularity, with most used topics first. A single page will contain `[api].DEFAULT_PAGING_NUM` (30 by default) items that match the query. That's plenty to choose from. Fixes #132. Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu> (cherry picked from commit 64d4ff41dbab7b3b84571b595158c3b451f53af7) (cherry picked from commit 06b808fa2c0ddd52ca4569157892a0c7fc154b1f) (cherry picked from commit 9205c9266a7d2b058100d03f5f3272f670f35866) (cherry picked from commit 47863d4f724e7d2465acd6fca91e98157c60a29b) |
||
---|---|---|
.. | ||
archiver.go | ||
attachment.go | ||
attachment_test.go | ||
avatar.go | ||
collaboration.go | ||
collaboration_test.go | ||
fork.go | ||
fork_test.go | ||
git.go | ||
issue.go | ||
language_stats.go | ||
main_test.go | ||
mirror.go | ||
pushmirror.go | ||
pushmirror_test.go | ||
redirect.go | ||
redirect_test.go | ||
release.go | ||
release_test.go | ||
repo.go | ||
repo_flags.go | ||
repo_flags_test.go | ||
repo_indexer.go | ||
repo_list.go | ||
repo_list_test.go | ||
repo_test.go | ||
repo_unit.go | ||
repo_unit_test.go | ||
search.go | ||
star.go | ||
star_test.go | ||
topic.go | ||
topic_test.go | ||
update.go | ||
upload.go | ||
user_repo.go | ||
user_repo_test.go | ||
watch.go | ||
watch_test.go | ||
wiki.go | ||
wiki_test.go |