Skip to content

[6.x] Paginate and search the user groups listing - #16106

Merged
jasonvarga merged 1 commit into
statamic:6.xfrom
charlietennant:user-groups-pagination
Dec 2, 2026
Merged

jasonvarga merged 1 commit into
statamic:6.xfrom
charlietennant:user-groups-pagination

Conversation

@charlietennant

Copy link
Copy Markdown
Contributor

Fixes #16105

The user groups index now uses a server driven Listing, the same approach as the static cache explorer. The page only receives whether any groups exist (for the empty state), and the listing fetches one page at a time with search on title and handle. Groups are sorted by title, as before.

User counts use queryUsers()->count() instead of users()->count(), so users are no longer hydrated, and only the groups on the current page are counted.

The JSON response from user-groups.index changes from a plain array to { data, meta }. Nothing in core uses it, but an addon calling it would need updating.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jasonvarga
jasonvarga merged commit bfc96d6 into statamic:6.x Dec 2, 2026
62 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

User groups listing is slow with a large number of groups

2 participants