9205c9266a
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 |
||
---|---|---|
.. | ||
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 |