62173[FEATURE] Introduce paginate view helper
Commit message
Review
-
Code review CR 0
-
Verified V 0
Issues 1
Files 20
- typo3/sysext/beuser/Classes/Controller/BackendUserController.php5+8 −2
- typo3/sysext/beuser/Classes/Controller/BackendUserGroupController.php+7 −1
- typo3/sysext/beuser/Resources/Private/Language/locallang.xlf4+21 −0
- typo3/sysext/beuser/Resources/Private/Partials/BackendUser/PaginatedList.htmlnew+5 −0
- typo3/sysext/beuser/Resources/Private/Partials/BackendUser/PaginatedListBody.htmlrenamed+0 −0
- typo3/sysext/beuser/Resources/Private/Partials/BackendUser/PaginatedListWidget.htmldeleted+0 −3
- typo3/sysext/beuser/Resources/Private/Partials/BackendUserGroup/PaginatedList.htmlnew+5 −0
- typo3/sysext/beuser/Resources/Private/Partials/BackendUserGroup/PaginatedListBody.htmlrenamed+0 −0
- typo3/sysext/beuser/Resources/Private/Partials/BackendUserGroup/PaginatedListWidget.htmldeleted+0 −3
- typo3/sysext/beuser/Resources/Private/Partials/Pagination.htmlnew+98 −0
- typo3/sysext/beuser/Resources/Private/Templates/BackendUser/Index.html+1 −1
- typo3/sysext/beuser/Resources/Private/Templates/BackendUserGroup/Index.html3+1 −1
- typo3/sysext/core/Documentation/Changelog/master/Feature-89576-IntroducePaginateViewHelper.rstnew+44 −0
- typo3/sysext/core/Tests/Acceptance/Backend/Extensionmanager/GetExtensionsCest.php+1 −1
- typo3/sysext/extensionmanager/Classes/Controller/ListController.php+8 −1
- typo3/sysext/extensionmanager/Resources/Private/Language/locallang.xlf+21 −0
- typo3/sysext/extensionmanager/Resources/Private/Partials/List/TerPaginator.html+4 −2
- typo3/sysext/extensionmanager/Resources/Private/Partials/List/TerPaginatorPagination.htmlnew+106 −0
- typo3/sysext/extensionmanager/Resources/Private/Templates/List/Ter.html+1 −1
- typo3/sysext/fluid/Classes/ViewHelpers/PaginateViewHelper.php20new+123 −0
Review log 4670
Show 2645 earlier messages
-
Alexander Schnitzler uploaded patch set 1 10/31/19, 16:42
-
TYPO3com voted on patch set 1 V +1 10/31/19, 16:55 Completed build in 13m 02s on Thu, 31 Oct, 04:55 PM Test Summary: 48079 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37910
-
Georg Ringer commented on patch set 1 11/01/19, 19:07
PaginateViewHelper.php:24is this intended? -
Alexander Schnitzler uploaded patch set 2 11/04/19, 11:20
-
TYPO3com voted on patch set 2 V -1 11/04/19, 11:23 Completed build in 03m 04s on Mon, 4 Nov, 11:23 AM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37968
-
TYPO3com commented on patch set 2 11/04/19, 11:42 Completed build in 25m 06s on Mon, 4 Nov, 11:42 AM Test Summary: 3 of 48428 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37968
-
TYPO3com commented on patch set 2 11/04/19, 12:55 Completed build in 2h 00m 03s on Mon, 4 Nov, 12:55 PM Test Summary: 1 of 48438 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37968
-
TYPO3com commented on patch set 2 11/04/19, 12:59 Completed build in 3h 38m 32s on Mon, 4 Nov, 12:59 PM Test Summary: 1 of 48438 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37968
-
Alexander Schnitzler uploaded patch set 3 11/04/19, 13:01
-
TYPO3com voted on patch set 3 V -1 11/04/19, 13:15 Completed build in 12m 08s on Mon, 4 Nov, 01:15 PM Test Summary: 1 of 48438 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37971
-
TYPO3com commented on patch set 3 11/04/19, 13:28 Completed build in 37m 23s on Mon, 4 Nov, 01:28 PM Test Summary: 1 of 48438 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37971
-
Alexander Schnitzler uploaded patch set 4 11/04/19, 14:47
-
TYPO3com voted on patch set 4 V -1 11/04/19, 14:57 Completed build in 09m 45s on Mon, 4 Nov, 02:57 PM Test Summary: 38009 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37975
-
TYPO3com voted on patch set 4 V +1 11/04/19, 14:59 Completed build in 21m 02s on Mon, 4 Nov, 02:59 PM Test Summary: 48079 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37975
-
Alexander Schnitzler commented on patch set 4 11/04/19, 15:00
This change is ready for review.locallang.xlf:168Reply UnresolvedWe can but we then create more dependencies between extensions which I would like to avoid if possible.PaginateViewHelper.php:24ReplyNo, and it's removed. -
Alexander Schnitzler wrote 11/04/19, 17:43
Topic set to fluid -
Mathias Brodala commented on patch set 4 11/06/19, 08:37
PaginateViewHelper.php:110Maybe it would be a good idea to also support arrays and any iterable and countable object. See https://github.com/pagemachine/typo3-formlog/blob/8ee8baf439ae558a745f6ef4b643ff7b3253dddc/Classes/ViewHelpers/Iterator/PaginateViewHelper.php as an example. -
Alexander Schnitzler commented on patch set 4 11/06/19, 09:24
PaginateViewHelper.php:110Reply UnresolvedAbsolutely. I also thought about a dedicated paginator class that takes care of the logic, so that this view helper would only be a shell or proxy. We should also separate the packages. I don't want a dependency to Extbase and Core. -
Alexander Schnitzler marked it work in progress 11/06/19, 09:24
-
Georg Ringer commented on patch set 4 11/06/19, 09:37
shouldnt we call it ViewHelper?locallang.xlf:169what about moving those to ext:fluid? -
Alexander Schnitzler commented on patch set 4 11/06/19, 10:31
This change is ready for review.Reply Unresolved
Acklocallang.xlf:169Reply UnresolvedI already answered this in the other file. I don't want to introduce new dependencies between packages. fluid might provide a view helper that supports pagination but imo fluid should not be the authority here. So, the goal is to strip down ext fluid to a bare minimum. A stupid bridge to the fluid library, with no further logic. -
Alexander Schnitzler marked it work in progress 11/06/19, 10:31
-
Alexander Schnitzler uploaded patch set 5 11/06/19, 20:05
-
Alexander Schnitzler uploaded patch set 6 11/06/19, 20:08
-
TYPO3com voted on patch set 5 V -1 11/06/19, 20:15 Completed build in 10m 42s on Wed, 6 Nov, 08:15 PM Test Summary: 2 of 48511 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-38045
-
TYPO3com voted on patch set 6 V -1 11/06/19, 20:18 Completed build in 09m 32s on Wed, 6 Nov, 08:18 PM Test Summary: 3 of 48511 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-38046
-
TYPO3com commented on patch set 6 11/06/19, 20:42 Completed build in 43m 16s on Wed, 6 Nov, 08:42 PM Test Summary: 2 of 48511 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-38046
-
Alexander Schnitzler uploaded patch set 7 11/07/19, 08:47
-
TYPO3com voted on patch set 7 V -1 11/07/19, 08:47 Completed build in 12s on Thu, 7 Nov, 08:47 AM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-38060
-
Alexander Schnitzler uploaded patch set 8 11/07/19, 08:48
-
Alexander Schnitzler uploaded patch set 9 11/07/19, 08:52
-
TYPO3com voted on patch set 8 V -1 11/07/19, 08:59 Completed build in 10m 46s on Thu, 7 Nov, 08:59 AM Test Summary: 1 of 48555 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-38061
-
TYPO3com voted on patch set 9 V -1 11/07/19, 09:04 Completed build in 12m 08s on Thu, 7 Nov, 09:04 AM Test Summary: 1 of 48555 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-38062
-
TYPO3com voted on patch set 9 V +1 11/07/19, 09:05 Completed build in 25m 39s on Thu, 7 Nov, 09:05 AM Test Summary: 48196 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-38062
-
Alexander Schnitzler uploaded patch set 10 11/07/19, 12:29
-
TYPO3com voted on patch set 10 V -1 11/07/19, 12:39 Completed build in 10m 25s on Thu, 7 Nov, 12:39 PM Test Summary: 14 of 48506 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-38074
-
Mathias Brodala commented on patch set 10 11/22/19, 15:10
What's the current state here? This would be perfect to fix https://forge.typo3.org/issues/88873 -
TYPO3com commented on patch set 10 11/22/19, 15:14 Completed build in 2h 55m 06s on Fri, 22 Nov, 03:14 PM Test Summary: 14 of 48506 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-38074
-
Alexander Schnitzler commented on patch set 10 11/22/19, 17:45
> Patch Set 10: > > What's the current state here? This would be perfect to fix https://forge.typo3.org/issues/88873 Well, this patch relies on this one (https://review.typo3.org/c/Packages/TYPO3.CMS/+/62239/) which obviously nobody likes to review. ¯\_(ツ)_/¯ -
Alexander Schnitzler marked it work in progress 11/22/19, 17:45
-
Mathias Brodala commented on patch set 10 11/22/19, 17:48
> Patch Set 10: > > > Patch Set 10: > > > > What's the current state here? This would be perfect to fix https://forge.typo3.org/issues/88873 > > Well, this patch relies on this one (https://review.typo3.org/c/Packages/TYPO3.CMS/+/62239/) which obviously nobody likes to review. ¯\_(ツ)_/¯ Thanks, I didn't notice that one. I'll have a look and try to encourage the people at the form sprint here. :-) -
Alexander Schnitzler commented on patch set 10 11/22/19, 17:49
> Patch Set 10: > > > Patch Set 10: > > > > > Patch Set 10: > > > > > > What's the current state here? This would be perfect to fix https://forge.typo3.org/issues/88873 > > > > Well, this patch relies on this one (https://review.typo3.org/c/Packages/TYPO3.CMS/+/62239/) which obviously nobody likes to review. ¯\_(ツ)_/¯ > > Thanks, I didn't notice that one. I'll have a look and try to encourage the people at the form sprint here. :-) Nice to hear. Thanks! -
Alexander Schnitzler uploaded patch set 11 11/23/19, 12:05
-
TYPO3com voted on patch set 11 V -1 11/23/19, 12:16 Completed build in 10m 50s on Sat, 23 Nov, 12:16 PM Test Summary: 14 of 48525 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-38735
-
Alexander Schnitzler uploaded patch set 12 11/23/19, 13:25
-
TYPO3com voted on patch set 12 V -1 11/23/19, 13:32 Completed build in 07m 34s on Sat, 23 Nov, 01:32 PM Test Summary: 9 of 48525 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-38744
-
Alexander Schnitzler uploaded patch set 13 11/23/19, 15:21
-
TYPO3com voted on patch set 13 V +1 11/23/19, 15:28 Completed build in 06m 51s on Sat, 23 Nov, 03:28 PM Test Summary: 48159 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-38767
-
Alexander Schnitzler commented on patch set 13 11/23/19, 15:31
This change is ready for review. -
Mathias Brodala commented on patch set 13 11/23/19, 15:55
BackendUserController.php:163Entries like these are kept for backward-compat to custom templates? If yes, we should at least add a comment about this or consider some deprecation right away.Index.html:18Wouldn't it make sense to use the same partial for users and user groups? -
Mathias Brodala commented on patch set 13 CR -1 11/23/19, 15:58
PaginateViewHelper.php:74This must be a description instead.PaginateViewHelper.php:75Same here.PaginateViewHelper.php:76Same here. -
Mathias Brodala commented on patch set 13 11/23/19, 15:59
PaginateViewHelper.php:99Please drop these on the subsequent lines since they make the hint impossible to read. ;-)PaginateViewHelper.php:102Yes, because it provides a drop-in replacement for the widget. -
Alexander Schnitzler commented on patch set 13 11/23/19, 17:22
BackendUserController.php:163ReplyI don't understand your comment here. What do you think has changed and what do you want to keep?Index.html:18ReplyThat's up to you and others to decide. I am not of a fluid guy and I therefore changed as little as necessary.PaginateViewHelper.php:99ReplyHow is it impossible to read? Don't get it.PaginateViewHelper.php:102ReplyThen we need to add the possibility to pass a pagination object to replace the SimplePagination object if needed. -
Mathias Brodala commented on patch set 13 11/23/19, 18:10
BackendUserController.php:163ReplyI'd assume that only the paginated backend users are passed to the template since only these are used for output.PaginateViewHelper.php:99ReplyWell todo: because todo: these todo: are todo: everywhere. ;-)PaginateViewHelper.php:102ReplyTrue but I wonder if only a pagination should be passed in .. -
Alexander Schnitzler commented on patch set 13 11/24/19, 16:05
BackendUserController.php:163ReplyYes, but that didn't change.PaginateViewHelper.php:99ReplyI don't see the problem. What is the better way to write multiline todo's? And btw: This todo is meant to be removed with the next patch set anyway, so I don't see why you are so picky here. ;)PaginateViewHelper.php:102ReplyI'm fine with that. But then we don't have a choice to overwrite the paginator arguments. -
Alexander Schnitzler rebased onto patch set 14 12/08/19, 11:45
-
TYPO3com voted on patch set 14 V +1 12/08/19, 11:53 Completed build in 07m 37s on Sun, 8 Dec, 11:53 AM Test Summary: 68708 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39263
-
Alexander Schnitzler commented on patch set 14 12/08/19, 12:05
Hi Mathias, can you please give feedback hereBackendUserController.php:163ReplyI consider this resolvedIndex.html:18ReplyConsider this resolved/postponed due to lack of activity.PaginateViewHelper.php:74Reply UnresolvedThe description is the same as in the PaginateWidgets. If you want to change this, please go ahead.PaginateViewHelper.php:75ReplyAckPaginateViewHelper.php:76ReplyAckPaginateViewHelper.php:99ReplyConsider this resolved.PaginateViewHelper.php:102ReplyPassing in only a paginator only makes sense of the PaginatonInterface defines a getter for it's internal PaginatorInterface instance as the paginator is still needed here to provide the current page number. But I don't want to introduce a new method in the interface just to be more flexible in this view helper. Therefore I decided to not let users pass a pagination into this view helper due to the following reasons: - This viewhelper is not necessary any more and just a convenience feature. Those that are familiar with the new Pagination and Paginator interfaces can use those in the controllers and pass finalized objects into the view and work with those right away. - Therefore this viewhelper uses the SimplePagination which is not exchangeable. - More sophisticated paginations should be realized without a view helper or with a custom paginate view helper that does the magic. -
Alexander Schnitzler uploaded patch set 15 12/08/19, 12:11
-
TYPO3com voted on patch set 15 V -1 12/08/19, 12:19 Completed build in 07m 42s on Sun, 8 Dec, 12:19 PM Test Summary: 58618 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39264
-
TYPO3com voted on patch set 15 V +1 12/08/19, 12:47 Completed build in 43m 25s on Sun, 8 Dec, 12:47 PM Test Summary: 68708 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39264
-
Rémy DANIEL commented on patch set 15 CR -1 12/19/19, 09:42
On one side I ear "pagination should be orchestrated by the controller in a Paginator", and on the other side I will have a new Fluid ViewHelper which works with a PaginatorInterface, but this VH will be able to update the Paginator with a currentPageNumber and itemsPerPage from the view. Is it an "anti pattern" or I am too picky? IMHO: the Core must show THE way to do stuff (so without Paginate VH), but should allow users to code custom VH if needed. Fluid should not ship a Paginate VH and widget.paginate should be deprecated. ext:beuser's controller should instanciate a SimplePagination and assign it to the view, and the templates should use directly the SimplePagination getters to display the pagination. Maybe SimplePagination can beneficts two news methods: hasLessPages and hasMorePages. -
Claus Due commented on patch set 15 12/19/19, 09:58
> Patch Set 15: Code-Review-1 > > On one side I ear "pagination should be orchestrated by the controller in a Paginator", and on the other side I will have a new Fluid ViewHelper which works with a PaginatorInterface, but this VH will be able to update the Paginator with a currentPageNumber and itemsPerPage from the view. > Is it an "anti pattern" or I am too picky? I half agree; there are still use cases where this is "ok" to do in Fluid (e.g. FLUIDTEMPLATE implementations that don't have a DataProcessor with pagination support). It isn't exactly an anti-pattern since you cannot (natively) read the current page no. and itemsPerPage from for example GET (but you can harvest and assign this through TS when using FLUIDTEMPLATE). Secondarily there are use cases where you simply cannot change what occurs in the controller (third party exts) - and this is our main reason for providing a pagination VH. > IMHO: the Core must show THE way to do stuff (so without Paginate VH), but should allow users to code custom VH if needed. Given that we do have a use case for purely-Fluid pagination (cases where you do not control external implementation, e.g. controllers from third party ext) I would still provide it. > Maybe SimplePagination can beneficts two news methods: hasLessPages and hasMorePages. Not a bad idea. These would be accessible in Fluid using `{paginator.morePages}` but I think the main use case is "to know if there are pages before and/or after current page" and the methods should perhaps be named accordingly, e.g. `{paginator.pagesBefore}` and `{paginator.pagesAfter}` which could do the required math and return integers containing the total number of pages before/after current (just so you don't have to do this math with Fluid). Which would mean these shouldn't be boolean assertion methods (hasXXX) but rather standard getters (getXXX). Even better would be to provide an array of page numbers before/after current page since these are 1) easier to iterate and 2) still allow extracting the page count by chaining `f:count`. -
Sybille Peters commented on patch set 15 09/12/21, 06:31
Is there some chance this could get merged? For some time, a reusable solution for pagination in Fluid does not exists which results in (probably) everyone more or less copying one of the several Pagination partials from the core or creating their own. When things are optimized in the core, you have to change it in several places, see https://review.typo3.org/c/Packages/TYPO3.CMS/+/71016 Also, it makes it more difficult for extension authors. I think one of the goals this year was to make it easier for editors and developers. -
Torben Hansen commented on patch set 15 09/27/21, 18:16
Reply
I think extension authors should provide a pagination using the TYPO3 pagination API from within their extensions (in controller actions). This is IMO the most clean way to provide a pagination. Implementation is straight forward and can also be made configurable (see ext:news as example - https://github.com/georgringer/news/commit/434a43bcbfdec2f15c4b9ff477a74cfbe298c266) -
Benni Mack wrote 11/29/21, 10:08
Change destination moved from master to main -
Benni Mack updated the commit message in patch set 16 11/29/21, 13:20
-
Simon Schaufelberger commented on patch set 16 06/17/22, 20:24
@Alexander: I think this patch can be abandoned because it is implemented with https://review.typo3.org/c/Packages/TYPO3.CMS/+/64522, or? -
Christian Kuhn commented on patch set 16 06/18/22, 23:37
agree, Simon. And the patch is stalled. I'll abandon for now. -
Christian Kuhn abandoned the change 06/18/22, 23:37
locallang.xlf:168