Skip to content

Add pagination, search, and descriptions to org teams list#37084

Open
majorissuerep wants to merge 1 commit intogo-gitea:mainfrom
majorissuerep:feat/org-teams-pagination
Open

Add pagination, search, and descriptions to org teams list#37084
majorissuerep wants to merge 1 commit intogo-gitea:mainfrom
majorissuerep:feat/org-teams-pagination

Conversation

@majorissuerep
Copy link
Copy Markdown

Summary

Fixes #34482

The organization teams page showed all teams in a 2-column mosaic grid with no pagination, no search filter, and no team descriptions — unusable for organizations with many teams. The core maintainer indicated preference for a list view over the mosaic.

  • Replace 2-column card grid with flex-list layout (consistent with the members page)
  • Display team Description field when set (field already existed in model, just not shown)
  • Add search filter (?q=) matching team name and description via existing SearchTeam
  • Paginate results using MembersPagingNum setting (default 20 per page)
  • Owners see all org teams; non-owners see only their own teams (matches prior behavior)
  • Member avatars, member/repo counts, and join/leave actions are preserved

Test plan

  • Visit an org with many teams — verify pagination appears
  • Search by team name — verify results filter correctly
  • Search by description text — verify results include description matches
  • Verify team descriptions are shown in the list
  • Verify join/leave buttons still work
  • Verify non-owner members only see their own teams

Note: This PR was developed with AI assistance (Claude Sonnet 4.6). The implementation has been reviewed against the existing members page pattern and SearchTeam function.

🤖 Generated with Claude Code

…34482)

The teams list showed all teams in a mosaic grid with no pagination,
no search/filter, and no team descriptions, making it unusable for
organizations with many teams.

Changes:
- Replace 2-column card grid with a flex-list layout (consistent with
  the members page)
- Display team Description field when set
- Add search filter (q= param) that matches team name and description
  via the existing SearchTeam function
- Paginate using the existing MembersPagingNum setting (default 20)
- Owners see all org teams; non-owners see only their own teams
- Member avatars, member/repo counts and join/leave actions are preserved

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 2, 2026
@github-actions github-actions bot added modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files labels Apr 2, 2026
Copy link
Copy Markdown
Member

@bircni bircni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/go-gitea/gitea/blob/main/CONTRIBUTING.md

Please read what claude wrote in the PR for you - there are tasks whcich are not checked...

If your PR changes the UI, you must add after screenshots in the PR summary.

opts.UserID = ctx.Doer.ID
}

teams, total, err := org_model.SearchTeam(ctx, opts)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fires a fresh query to db again but these are alread loaded?

@GiteaBot GiteaBot added lgtm/blocked A maintainer has reservations with the PR and thus it cannot be merged and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/blocked A maintainer has reservations with the PR and thus it cannot be merged modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Paginate, filter and display descriptions of teams in the organization page

3 participants