Problem/Motivation
"Comments per page" setting cannot be configured to show "all comments" also if the dockbook of CommentStorageInterface::loadThread says:
* @param int $comments_per_page * (optional) The amount of comments to display per page. * Defaults to 0, which means show all comments.
I can't set 0 for "Comments per page" due to hardcoded "min" on form element (introduced with #2239369: "Comments per page" setting cannot be configured to be larger than 300 and modified with #2906298: Comments per page number validation)
Proposed resolution
I think we could set "min" as 0 for permit to show all comments without pager.
In the next comment the patches for 8.7.x and 8.5.x
| Comment | File | Size | Author |
|---|---|---|---|
| #25 | interdiff_20-25.txt | 575 bytes | ranjith_kumar_k_u |
| #25 | 2986372-25.patch | 3.44 KB | ranjith_kumar_k_u |
| #20 | interdiff_16-20.txt | 1.6 KB | ranjith_kumar_k_u |
| #20 | 2986372-20.patch | 3.44 KB | ranjith_kumar_k_u |
| #16 | 2986372-16.patch | 1.7 KB | ranjith_kumar_k_u |
Comments
Comment #2
robertom commentedComment #7
ranjith_kumar_k_u commentedRe-rolled for 9.2
Comment #12
larowlanLets add a test for this, and review the UI text to make it clear that zero has a special meaning
Comment #13
_utsavsharma commentedRerolled for 10.1.x.
Please review.
Comment #14
_utsavsharma commentedComment #15
smustgrave commentedThis issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request as a guide.
Moving back for the tests.
Comment #16
ranjith_kumar_k_u commentedAdded test, please review
Comment #17
ranjith_kumar_k_u commentedComment #18
smustgrave commentedGood job expanding on an existing test case.
Think we need to also test that when it's set to 0 that all comments are appearing.
Comment #19
ranjith_kumar_k_u commented.
Comment #20
ranjith_kumar_k_u commentedAdded the tests as per #18
Comment #21
ranjith_kumar_k_u commentedComment #22
smustgrave commentedTests look good!
Good work
Comment #23
penyaskitoNot a native English speaker, but shouldn't this be "Enter 0 for _showing_ all comments"?
Comment #24
catchI think it should probably be "Enter 0 to show all comments"
Comment #25
ranjith_kumar_k_u commentedChanged description text.
Comment #26
ranjith_kumar_k_u commentedComment #27
penyaskitoThat looks good.
Comment #29
catchLooks good.
Committed 98217b5 and pushed to 10.1.x. Thanks!