feat: [PagerRenderer] add method to return the number of all items
Description I get this request a lot from users who want to see how many items are actually in a list. I think the simplest and most aesthetically pleasing way to do this is to include it in the Pager itself.
Checklist:
- [x] Securely signed commits
- [x] Component(s) with PHPDoc blocks, only if necessary or adds value
- [x] Unit testing, with >80% coverage
- [x] User guide updated
- [x] Conforms to style guide
Can you explain why you need this? and please read this: https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/pull_request.md
I get this request a lot from users who want to see how many items are actually in a list. I think the simplest and most aesthetically pleasing way to do this is to include it in the Pager itself. See: [image: image.png]
kenjis @.***> ezt írta (időpont: 2023. dec. 10., V, 12:44):
Can you explain why you need this? and please read this: https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/pull_request.md
— Reply to this email directly, view it on GitHub https://github.com/codeigniter4/CodeIgniter4/pull/8318#issuecomment-1848941044, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2CBDH4N2K7LUCFHVFM4JLYIWOATAVCNFSM6AAAAABAOOV5BSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBYHE2DCMBUGQ . You are receiving this because you authored the thread.Message ID: @.***>
--
Üdvözlettel / Best Regards: János KOVÁCS
Also, if the Pager knows the total number of items, it is advisable not to use a separate query for this.
Janos Kovacs @.***> ezt írta (időpont: 2023. dec. 10., V, 13:23):
I get this request a lot from users who want to see how many items are actually in a list. I think the simplest and most aesthetically pleasing way to do this is to include it in the Pager itself. See: [image: image.png]
kenjis @.***> ezt írta (időpont: 2023. dec. 10., V, 12:44):
Can you explain why you need this? and please read this: https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/pull_request.md
— Reply to this email directly, view it on GitHub https://github.com/codeigniter4/CodeIgniter4/pull/8318#issuecomment-1848941044, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2CBDH4N2K7LUCFHVFM4JLYIWOATAVCNFSM6AAAAABAOOV5BSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBYHE2DCMBUGQ . You are receiving this because you authored the thread.Message ID: @.***>
--
Üdvözlettel / Best Regards: János KOVÁCS
--
Üdvözlettel / Best Regards: János KOVÁCS
This is an enhancement.
PRs with any enhancement should be sent to next minor version branch 4.5.
See https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/workflow.md#branching-revisited
Please change the base branch. See https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/workflow.md#if-you-sent-to-the-wrong-branch
Can you add test code? See https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/pull_request.md#unit-testing
Please implement this change if possible. Unfortunately, I cannot help with test and documentation requests, but the addition is so clear, simple and helpful that it would be very useful.
kenjis @.***> ezt írta (időpont: 2023. dec. 10., V, 13:44):
This is an enhancement. PRs with any enhancement should be sent to next minor version branch 4.5. See https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/workflow.md#branching-revisited
Please change the base branch. See https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/workflow.md#if-you-sent-to-the-wrong-branch
— Reply to this email directly, view it on GitHub https://github.com/codeigniter4/CodeIgniter4/pull/8318#issuecomment-1848955040, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2CBDA6DXVJOC7EMWXNDJ3YIWVCVAVCNFSM6AAAAABAOOV5BSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBYHE2TKMBUGA . You are receiving this because you authored the thread.Message ID: @.***>
--
Üdvözlettel / Best Regards: János KOVÁCS
We expect all contributions to conform to our style guide, be commented (inside the PHP source files), be documented (in the user guide), and unit tested (in the test folder).
Note, we expect all code changes or bug-fixes to be accompanied by one or more tests added to our test suite to prove the code works. If pull requests are not accompanied by relevant tests, they will likely be closed. Since we are a team of volunteers, we don't have any more time to work on the framework than you do. Please make it as painless for your contributions to be included as possible. If you need help with getting tests running on your local machines, ask for help on the forums. We would be happy to help out.
https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/pull_request.md#contributions
Can someone take over this?
Can someone take over this?
I can take this up, If it hasn't been resolved yet
We need the following to merge this PR.
- test code
- user guide
@davidnsai Can you send a new PR based on this?
Sure, I should be able to do that ASAP