Problem/Motivation
If you place a mini-browser block somewhere and disable pagination, you'll still see the result count displayed above the projects. This is intrusive and kinda dumb; if pagination is disabled, you can see all the projects right there.
Proposed resolution
If pagination is disabled, don't show the result count in a mini-browser. This is one-line fix in ProjectBrowser.svelte:
{#if rowsCount}
needs to be:
{#if rowsCount && paginate}
Issue fork project_browser-3513763
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
ijf8090 commentedComment #3
matthewsmith619 commentedI am working on this as part of #Atlanta2025
Comment #4
matthewsmith619 commentedComment #5
lostcarpark commentedSteps to reproduce:
The browser will show "12 results" above the list of recipes
Comment #7
tim.plunkettThere's a test for pagination across multiple project browser instances that *should* be able to test this too.
Look for
\Drupal\Tests\project_browser\FunctionalJavascript\MultipleInstancesTest::testIndependentPagination()Comment #8
lostcarpark commentedI think the Tim's suggestion seems overkill for this, and I don't think a FunctionalJavascript test is required.
My thinking is the test should place a block with pagination enabled, and verify the result count is displayed. Then edit the block, disable pagination, and verify result count not shown.
There are some existing Functional tests in the file
ProjectBrowserBlockTest.phpthat should be very similar, and it should be very straightforward to add a very similar test.Comment #9
chrisfromredfinI think because the fix is in Svelte code, we need a FunctionalJavascriptTest to render the JS.
Comment #10
chrisfromredfinComment #11
chrisfromredfinComment #12
phenaproximaThis seems reasonable to me, with solid test coverage, but I have a few questions/suggestions.
Comment #13
chrisfromredfinOK, everything here is green. Could use another look.
Comment #14
phenaproximaMakes sense to me! Thanks for the detailed comments.
Comment #17
chrisfromredfinmerged and cherry-picked