dspace-angular
dspace-angular copied to clipboard
Make the number of communities in the Browse by Community page configurable
Is your feature request related to a problem? Please describe.
In DSpace 7, there are 20 top-level communities listed on the Browse by Community page, https://demo7.dspace.org/community-list. When the user clicks on "Show More," this adds 20 more communities. This is slow for repositories with many top-level communities.
In DSpace 6 XMLUI, all the top-level communities are listed on the Browse by Community page, https://demo.dspace.org/xmlui/community-list, which allows the user to immediately explore them all. Administrators, too, want to see the entire list without multiple clicks.
Describe the solution you'd like One solution would be to make the number of communities per page configurable with a number and the option, "all." Since the time to load the collections page in DSpace 6 XMLUI is acceptable, I don't think a large number or "all" would be a problem and would certainly be less time than waiting for multiple clicks to load the entire list.
Describe alternatives or workarounds you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context Add any other context or screenshots about the feature request here.
This ticket arguably could be done at the same time as #1749 , and might even use the same configuration option.
In this situation though, the max of 20 appears to be hardcoded here: https://github.com/DSpace/dspace-angular/blob/main/src/app/community-list-page/community-list-service.ts#L83
The fix though would be the same as #1749, and would be similar to @mwoodiupui 's work in #1771. We'd just need a new configuration to be added for this value. In my opinion, we might consider creating a single browseCommunities.pageSize
configuration which could be used to fix both #1749 and this ticket.
Thank you very much for working on these feature requests. Does changing a setting to 0 mean unlimited, as @mwoodiupui suggested? I don't see a comment about it.
@alawvt : No, unfortunately at this time there's no option for an "unlimited" value at this time & no immediate plans for that.
The pageSize values should be one of the valid "pageSizeOptions" listed here: https://github.com/DSpace/dspace-angular/blob/main/src/app/shared/pagination/pagination-component-options.model.ts#L25 If they are not one of those values, then it'll be rounded to the nearest valid value. As you can see in that list, the maximum you can choose is 100
This is purposeful as a value of "unlimited" is currently a bit dangerous in terms of performance. If you have 500 top level communities and you attempt to load them all at once, the performance is very poor right now . That's why currently we cap the max per page at 100.
@tdonohue, Thank you for that explanation. The maximum value of 100 is certainly reasonable.