- Status changed to Needs review
almost 2 years ago 8:21pm 26 March 2024 - Status changed to RTBC
almost 2 years ago 2:01pm 27 March 2024 - πΊπΈUnited States smustgrave
1) Drupal\Tests\workspaces\Functional\WorkspaceTest::testWorkspaceManagePage Behat\Mink\Exception\ExpectationException: Link with label Term 1 found. /builds/issue/drupal-3273461/core/tests/Drupal/Tests/WebAssert.php:580 /builds/issue/drupal-3273461/core/tests/Drupal/Tests/WebAssert.php:350 /builds/issue/drupal-3273461/core/modules/workspaces/tests/src/Functional/WorkspaceTest.php:224 /builds/issue/drupal-3273461/vendor/phpunit/phpunit/src/Framework/TestResult.php:728 ERRORS! Tests: 9, Assertions: 211, Errors: 1.Test-only feature shows test coverage
I don't have 50 workspaces :) but based on how I've seen other parts of core do this this appears correct.
- π·π΄Romania amateescu
@smustgrave, you don't need 50 workspaces, just to edit >50 entities in a workspace :P
One thing I don't really like about this MR is the large number of arguments of
WorkspaceAssociation::getTrackedEntities(), but I didn't have any better idea. Maybe a new method is needed for getting a "paginated" list of tracked entities, without the ability to filter by entity type ID and entity ID... not sure. - π¬π§United Kingdom alexpott πͺπΊπ
Is there any reason why we're not using \Drupal\Core\Database\Query\PagerSelectExtender and \Drupal\Core\Database\Query\TableSortExtender?
- π·π΄Romania amateescu
@alexpott because
WorkspaceAssociation::getTrackedEntities()is a "low level" API function that shouldn't be influenced by any global pager. Maybe this is another point in favor of adding a separate method for this listing :) - π¬π§United Kingdom alexpott πͺπΊπ
Maybe we could add getTrackedEntitiesAsQuery() and return the query object for us to do stuff with - or just not use it... but given \Drupal\workspaces\WorkspaceAssociation::TABLE - maybe this returning a query object you to do stuff to would work nicely.
- Status changed to Needs review
almost 2 years ago 5:02pm 27 March 2024 - π¬π§United Kingdom alexpott πͺπΊπ
Gonna put this back to needs review while @amateescu has a think.
- Status changed to Needs work
almost 2 years ago 6:40pm 18 April 2024 - Status changed to Needs review
almost 2 years ago 3:57pm 25 April 2024 - π·π΄Romania amateescu
Implemented the separate method as discussed above, and it's looks much better!
Regarding
\Drupal\Core\Database\Query\TableSortExtender, we can't use it because the data displayed in the table is coming from the individual revision objects, not from the `workspace_association` table. - Status changed to Needs work
almost 2 years ago 4:28pm 25 April 2024 The Needs Review Queue Bot β tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide β to find step-by-step guides for working with issues.
- Status changed to Needs review
almost 2 years ago 4:40pm 25 April 2024 - π·π΄Romania amateescu
Btw, a quick`n`dirty way to test this MR is to edit a couple of entities in a workspace and manually change
WorkspaceViewBuilder.php::$limitto 1 :) - Status changed to RTBC
almost 2 years ago 6:17pm 26 April 2024 - πΊπΈUnited States smustgrave
I did just that haha thanks for the pointer
I applied some minor change to the MR for the return type but overall rest of the changes appear good
- Status changed to Fixed
almost 2 years ago 11:36am 30 April 2024 - π¬π§United Kingdom alexpott πͺπΊπ
Committed and pushed f7950eb418 to 11.x and fdac75b8b0 to 10.3.x. Thanks!
-
alexpott β
committed fdac75b8 on 10.3.x
Issue #3273461 by amateescu, smustgrave, alexpott: Add pagination to the...
-
alexpott β
committed fdac75b8 on 10.3.x
-
alexpott β
committed f7950eb4 on 11.x
Issue #3273461 by amateescu, smustgrave, alexpott: Add pagination to the...
-
alexpott β
committed f7950eb4 on 11.x