forgejo/models
Gergely Nagy 47863d4f72
[GITEA] Fix the topic search paging
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 64d4ff41db)
(cherry picked from commit 06b808fa2c)
(cherry picked from commit 9205c9266a)
2024-01-28 10:58:28 +01:00
..
actions [GITEA] Add support for shields.io-based badges 2024-01-28 10:55:00 +01:00
activities Simplify how git repositories are opened (#28937) 2024-01-27 21:09:51 +01:00
admin
asymkey [GITEA] Add noreply email address as verified for SSH signed Git commits 2024-01-28 10:54:58 +01:00
auth [GITEA] Fix session generation for database 2024-01-28 10:54:59 +01:00
avatars Refactor some legacy code and remove unused code (#28622) 2023-12-28 09:38:59 +00:00
db [GITEA] Log SQL queries when the database return error 2024-01-28 10:58:28 +01:00
dbfs
fixtures [GITEA] Add noreply email address as verified for SSH signed Git commits 2024-01-28 10:54:58 +01:00
forgejo/semver [SEMVER] store SemVer in ForgejoSemVer after a database upgrade 2024-01-28 08:19:26 +01:00
forgejo_migrations [FEAT] Repository flags 2024-01-28 10:58:28 +01:00
git Add support for sha256 repositories (#23894) 2024-01-19 17:05:02 +01:00
issues [GITEA] Avoid WHERE IN for comment migration query 2024-01-28 10:54:59 +01:00
migrations [GITEA] new doctor check: fix-push-mirrors-without-git-remote (#1853) 2024-01-28 10:54:59 +01:00
organization
packages Fix some RPM registry flaws (#28782) 2024-01-19 11:37:10 +00:00
perm [GITEA] Optionally allow anyone to edit Wikis 2024-01-28 10:54:59 +01:00
project
pull [GITEA] GetScheduledMergeByPullID may involve a system user 2024-01-28 10:54:59 +01:00
repo [GITEA] Fix the topic search paging 2024-01-28 10:58:28 +01:00
secret
shared/types
system
unit
unittest [GITEA] Enable mocked HTTP responses for GitLab migration test 2024-01-28 10:54:58 +01:00
user [GITEA] add option for banning dots in usernames (squash) set in test 2024-01-28 10:55:00 +01:00
webhook
error.go Forbid removing the last admin user (#28337) 2024-01-15 06:51:43 +00:00
fixture_generation.go
fixture_test.go
main_test.go
org.go
org_team.go
org_team_test.go
org_test.go
repo.go
repo_test.go
repo_transfer.go
repo_transfer_test.go