Added pagination to account holds history #1491
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What it does
Adds pagination to the accounts hold history page.
Why it is important
This will prevent long page load times for long time users. See #1475.
UI Change Screenshot
Implementation notes
I wasn't sure how many holds should be shown on each page, so I just left it as the pagy default.
The test I added might be considered redundant, but I figured I'd leave it in for now. It technically doesn't test the pagination functionality itself. I'm happy to make it do so, but I decided to hold off after I couldn't find a similar test for the other uses of pagy in the app.
I also left a small change in the Gemfile.lock regarding the installation of Nokogiri on laptops like mine.