cuny-academic-commons / commons-in-a-box

Commons In A Box - A suite of community and collaboration tools for WordPress, designed especially for academic communities
http://commonsinabox.org
72 stars 14 forks source link

Improve group member pagination #468

Closed boonebgorges closed 2 months ago

boonebgorges commented 7 months ago

Group pagination is not easy to use, particularly in groups with many members. We should make several improvements:

Screenshot_2024-02-06_19-53-29

  1. Pagination links currently appear only at the top of the page. It should appear at the bottom as well.
  2. Pagination links are not styled properly. They should be styled like the links on directories.
  3. Let's increase the default per_page to 100, and add a hidden feature that allows users to pass a per_page URL param to increase this (with some high ceiling like 500).
boonebgorges commented 5 months ago

We're not totally consistent throughout our various interfaces on how pagination ought to behave, but I tried for a layout that seems pretty reminiscent of what we do elsewhere.

Screenshot_2024-04-29_11-49-08

The default per_page is now 96 (need a number divisible by 2 and 3 for better behavior across grid sizes), and there's a filter that allows it to be set differently via plugin.

bree-z commented 2 months ago

Hi Boone,

I have a few questions as I'm testing this:

Thanks!

Pagination links at bottom of Group Home:

PaginationTextLinks
boonebgorges commented 2 months ago

Should the pagination styling only appear on Group > Membership or should I also see it in the members list at the bottom of the Group Home? Currently I see text links there.

The 'Members' list on the group home was not part of the original spec, but it was an easy change, so I made it.

When viewing Group > Membership as a non-admin, should I be seeing pagination links at the top, or just at the bottom? I currently see them at the bottom only.

Bottom only. Moving it to the top would mean making decisions about what to do with the 'Viewing...' pagination text, which currently appears in the same line as the subnav. The current layout mirrors what you see on group directories, and we don't have a ready-made alternative if we introduce top pagination for this view. If it's needed, it'll have to wait for a future release. (The focus of this feature request from BMCC was on group management by admins.)

When viewing Group Home > Membership as an admin, does the group need to have more than 100 members to see the pagination?

Yes.

bree-z commented 2 months ago

The 'Members' list on the group home was not part of the original spec, but it was an easy change, so I made it.

This looks good, thanks!

I also tested with more than 100 members and what I see reflects your screenshot above.