So, to be clear, that would be the number of discussions per page when browsing from the Flarum single page app?

To consider in the implementation: does it affect the number of discussions per page on the user profile. Does it affect the default number of discussions per page when using the REST API directly. What happens if the value is set to a higher value than the maximum currently allowed by the REST API (50).

If this is added to core, I feel like there should also be one for the posts per page for the user profile for completeness. Changing the number of posts per "page" in a discussion probably isn't really necessary since it's using infinite scroll but i would affect the nojs at the same time so 🤷‍♂️

    Currently page size is hardcoded as 20 items per page. It would be great to change this value independently for discussions and posts (and possibly other views too) - while page size for posts in discussion if fine for me, I would prefer to display more discussions on discussions lists.

    It's true that it's hard-coded from an administrator point of view, but the number of results per page is fully extensible and can be changed by extensions.

    REST API users can already customize the number of results, with the maximum allowed being 50 (and extensions can increase that limit).

      clarkwinkelmann It's true that it's hard-coded from an administrator point of view, but the number of results per page is fully extensible and can be changed by extensions.

      There are multiple places where page size is hardcoded like this:
      https://github.com/flarum/framework/blob/2541349c6828d0d5af81db007ae2c2447f3996f7/framework/core/src/Forum/Content/Index.php#L78

      I actually tried to create custom discussions list view with 50 discussions per page, and it worked for initial page load, but "load more" button ignored this page size and loaded discussion using 20 as offset. So I ended with 1-50 most recent discussions, and then again 21-40 loaded from REST API.

      It may be possible to adjust page size for data loaded from REST using JS, but fixing this for initial payloads looks quite inconvenient. And a discrepancy between these settings will result duplicates or skipped discussions on listing.

      3 months later
      Merged 3 posts from Alow to configure page size for discussions/posts list.

      Moderation remark: Two overlapping proposals have now been merged. The other proposals posts have been merged to the end of the discussion to avoid confusion.

      4 days later

      Oh thanks @GreXXL for bringing this back, I honestly forgot there was a similar request, sorry!

      clarkwinkelmann So, to be clear, that would be the number of discussions per page when browsing from the Flarum single page app?

      Yes, that's right.

      I think we should also respect some kind of limit, for example the REST API limit (50) would be more than double the current limit so it should be enough (?), I mean somehow we should avoid crazy numbers, because apart from having to modify the API, I don't know if that could end up causing other problems.

      If this is added to core, I feel like there should also be one for the posts per page for the user profile for completeness.

      I think you're right, it would be a very good idea to take advantage of a PR like this to finally allow for the extension of both discussions and posts.

      If any moderator sees this could you change the title of the proposal to "Make it possible to extend the number of discussions/posts shown" I can't flag the OP.

      GreXXL changed the title to Make it possible to extend the number of discussions/posts shown .
      9 days later

      I've updated the OP and the image adding the rest of the things discussed, anyone think there is anything else to add to this proposal?

      2 months later

      I don't understand is there a way or extension to do this or not yet?

      I also think we should be able to display more links on homepage especially for SEO, the homepage can send without worry 100 internal links to the posts rather than 20 and therefore send juice to more pages.

      2 years later

      Darkle Is there any extension that can achieve more than 20 discussions on a single page?

        cokavar I almost forgot about this proposal, now that I’m checking, I noticed this PR (flarum/framework3918 )

        Sorry for pinging you @SychO, but if I understood correctly, then this would be possible in 2.0, and therefore this proposal could be closed, right?

          Darkle it solves this part of the proposal:

          Darkle Fix the current hard-coded implementation so that it can be extended.

          The limit in 2.0 has one single source of truth, which is the backend value.