gitea icon indicating copy to clipboard operation
gitea copied to clipboard

Increase default item listing size `ISSUE_PAGING_NUM` to 20

Open noerw opened this issue 3 years ago • 3 comments

This increases the default value for listings of issues, projects and milestones to 20, for better UX and consistency with other listings.

For reference, GH uses 25 and 30 items in most listings, but they have a slightly more compact layout too.

closes #20184

noerw avatar Jul 30 '22 00:07 noerw

LGTM (ps: CI failure is related, it seems that some tests assume that the page size must be 10 😂)

wxiaoguang avatar Jul 30 '22 02:07 wxiaoguang

Codecov Report

Merging #20547 (1c13962) into main (335e918) will increase coverage by 0.03%. The diff coverage is n/a.

@@            Coverage Diff             @@
##             main   #20547      +/-   ##
==========================================
+ Coverage   46.82%   46.86%   +0.03%     
==========================================
  Files         979      979              
  Lines      135831   135831              
==========================================
+ Hits        63606    63652      +46     
+ Misses      64415    64374      -41     
+ Partials     7810     7805       -5     
Impacted Files Coverage Δ
modules/setting/setting.go 48.46% <ø> (ø)
modules/util/timer.go 85.71% <0.00%> (-14.29%) :arrow_down:
modules/git/repo_base_nogogit.go 71.69% <0.00%> (-3.78%) :arrow_down:
modules/git/utils.go 66.29% <0.00%> (-3.38%) :arrow_down:
models/issues/comment.go 50.32% <0.00%> (-0.44%) :arrow_down:
routers/web/repo/issue.go 36.72% <0.00%> (+0.11%) :arrow_up:
services/pull/pull.go 40.80% <0.00%> (+0.46%) :arrow_up:
modules/queue/workerpool.go 55.44% <0.00%> (+0.51%) :arrow_up:
models/notification.go 63.32% <0.00%> (+1.09%) :arrow_up:
modules/notification/ui/ui.go 60.71% <0.00%> (+1.78%) :arrow_up:
... and 5 more

Help us with your feedback. Take ten seconds to tell us how you rate us.

codecov-commenter avatar Jul 31 '22 21:07 codecov-commenter

Fixing the tests was a bit tricky because the refactor in https://github.com/go-gitea/gitea/pull/19318 was a bit messy:

  • now that there is a separate route for issue search from the frontend, /api/v1/issues/search can use the API page size config. I'll fix that in another PR
  • there were tests in integrations/issue_test.go copied verbtim from the API → changed those tests to make use of the frontend api for issue search
  • within the test functions there were tests doing exactly the same requests (which i assume were originally for testing different auth mechanisms) → removed

noerw avatar Jul 31 '22 21:07 noerw