DemomanApp / DemoMan

The TF2 Demo Manager
GNU General Public License v3.0
40 stars 5 forks source link

Add Pagination Option #28

Closed theaswanson closed 2 years ago

theaswanson commented 2 years ago

This PR adds a new setting that allows users to enable pagination to the main demo view. This improves performance greatly for users with several demos (like me with 1000+). When enabled, it defaults to 50 demos per page but is configurable using the dropdown option at the bottom of the page.

Open to any feedback you've got and willing to adjust the defaults, paging options, etc. as needed.

If this PR is helpful, I'd love a hacktoberfest-accepted tag on this PR to help aid my open source contributes this month for Hacktoberfest!

Screenshots

New option on Settings screen

New paginated view

Narcha commented 2 years ago

Hey, this looks really cool! Thanks for the PR :heart: When I originally made the table, I decided against pagination, but back then I wasn't aware how bad performance scales with the number of demos :) This looks like a really clean fix for this problem, I also appreciate the extra option in the settings.

I'm working on DemoMan v2 at the moment, which doesn't have this issue because it uses react-window for a virtualized list.

If you have the time, you can contribute to v2 on the tauri branch. I appreciate all the help I can get. Feel free to add me on Discord if you have any questions :)