Review main Abandoned

67314[BUGFIX] Respect TSconfig in file list search action

Elias Häußler CR 0 V 0 Hard +153 −138 updated 07/09/21, 12:58

Commit message

With #79310 the clipboard in file list module was integrated
into the file list search. However, it was always shown
regardless of the TSconfig value
`options.file_list.enableClipBoard` which controls the
output behaviour.

Additionally, the TSconfig values
`options.file_list.enableDisplayBigControlPanel` and
`options.file_list.enableDisplayThumbnails` did not
have any effect in the file list search action.

All configuration values are now evaluated before
rendering the appropriate checkboxes. The output behavior
of those components has been fixed as well. It now
depends on the actual state for each component being
either enabled or disabled. Therefore it is now streamlined
in both views (normal list view and search view).

Review

  • Code review CR 0
  • Verified V 0

Issues 2

Files 2

Review log 1525

  1. Elias Häußler uploaded patch set 1 12/30/20, 10:15

  2. TYPO3com voted on patch set 1 V -1 12/30/20, 10:24 Completed build in 09m 31s on Wed, 30 Dec, 10:24 AM Test Summary: 1 of 32781 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8502

  3. TYPO3com commented on patch set 1 12/30/20, 10:39 Completed build in 09m 09s on Wed, 30 Dec, 10:39 AM Test Summary: 1 of 32781 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8505

  4. TYPO3com commented on patch set 1 12/30/20, 13:29 Completed build in 11m 20s on Wed, 30 Dec, 01:29 PM Test Summary: 31045 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8507

  5. TYPO3com commented on patch set 1 12/30/20, 13:35 Completed build in 11m 38s on Wed, 30 Dec, 01:35 PM Test Summary: 6 of 32411 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8508

  6. TYPO3com voted on patch set 1 V +1 12/30/20, 19:03 Completed build in 09m 46s on Wed, 30 Dec, 07:03 PM Test Summary: 32540 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8512

  7. Richard Haeser commented on patch set 1 12/31/20, 07:48

    All of the controls in search doesn't seem to work. Maybe good to fix them all? This fix is working, but showing / hiding thumbnails is not working either and same for extended view. Do we want to fix that in this bugfix, or do this in a separate patch?
  8. Guido Schmechel commented on patch set 1 01/03/21, 12:40

    FileListController.php:528

  9. Guido Schmechel commented on patch set 1 01/03/21, 12:51

    Reply

    I would suggest that this is a separate fix. Here, for example, the combination of UserTsConfig and selection in the FileList is broken. Also the template does not process this value.
  10. Richard Haeser commented on patch set 1 01/03/21, 18:55

    Reply

    Question why I asked is because in the initializeIndexAction (where this part is copied from) is having all the options. So I guess this is fixed by using the same code as for the initializeIndexAction method.
  11. Guido Schmechel commented on patch set 1 01/04/21, 15:19

    Reply

    I understand your approach, but the searchAction also needs to be adapted in the fluid template. Therefore, I would rather separate it.
  12. Elias Häußler commented on patch set 1 01/06/21, 12:45

    FileListController.php:528 Reply Unresolved

    AFAICS there are three statuses which are handled differently: * selectable (default) => let the user decide whether to show/hide clipboard => this affects the rendering of the checkbox itself (see https://github.com/TYPO3/TYPO3.CMS/blob/759e8daaeb2d4d9f032f698c0e9a99c7653e6e40/typo3/sysext/filelist/Classes/Controller/FileListController.php#L811 and https://github.com/TYPO3/TYPO3.CMS/blob/759e8daaeb2d4d9f032f698c0e9a99c7653e6e40/typo3/sysext/filelist/Resources/Private/Partials/ListOptions.html#L21) * activated => explicitly show clipboard and do not render a checkbox * deactivated => explicitly hide clipboard and do not render a checkbox `$this->MOD_SETTINGS['clipBoard']` only describes whether to render the clipboard itself, depending on: * either `options.file_list.enableClipBoard` being "activated" (show) or "deactivated" (hide) * or `options.file_list.enableClipBoard` being "selectable" in combination with a checked checkbox (which set `$this->MOD_SETTINGS['clipBoard']` to "1", see https://github.com/TYPO3/TYPO3.CMS/blob/759e8daaeb2d4d9f032f698c0e9a99c7653e6e40/typo3/sysext/filelist/Classes/Controller/FileListController.php#L281-L285 and https://github.com/TYPO3/TYPO3.CMS/blob/759e8daaeb2d4d9f032f698c0e9a99c7653e6e40/typo3/sysext/filelist/Classes/Controller/FileListController.php#L813-L820) As conclusion, I'd say that we cannot check for "selectable" here as this would mean: Always render the clipboard, even if the user hasn't checked the checkbox. In other words: Setting `$this->MOD_SETTINGS['clipBoard'] = true` if `options.file_list.enableClipBoard = selectable` would override the actual state from the checkbox and makes it useless ("selectable" would then be the same as "activated"). What do you think?
  13. Elias Häußler commented on patch set 1 01/06/21, 12:57

    Reply

    I'd also vote for doing this in a separate patch as the additional changes seem to be a little more complex and this patch is more about respecting valid TSconfig.
  14. Richard Haeser commented on patch set 1 01/06/21, 22:21

    Reply

    I was also talking about the TSconfig. But the TSconfig for thumbs and extended view are also not working as far as I have seen. If something functional is wrong that is of course another patch.
  15. Elias Häußler uploaded patch set 2 01/07/21, 08:00

  16. Elias Häußler commented on patch set 2 01/07/21, 08:05

    Reply Unresolved

    Hmm, that's right. I now fixed all TSconfig occurrences (hopefully) for search action and streamlined the output behavior for index/search action. Can you please look at it again? The behavior of clipboard checkboxes (in case a specific clipboard is selected) is still not the same in search action as in index action. I'm not sure whether this should be streamlined as well. Seems to be a little more work and might be better handled in a separate patch (in case we decide to fix it).
  17. Elias Häußler uploaded patch set 3 01/07/21, 08:06

  18. TYPO3com voted on patch set 2 V -1 01/07/21, 08:10 Completed build in 09m 56s on Thu, 7 Jan, 08:10 AM Test Summary: 32565 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8717

  19. TYPO3com voted on patch set 3 V -1 01/07/21, 08:16 Completed build in 09m 05s on Thu, 7 Jan, 08:16 AM Test Summary: 32565 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8718

  20. TYPO3com commented on patch set 3 01/07/21, 08:36 Completed build in 09m 47s on Thu, 7 Jan, 08:36 AM Test Summary: 1 of 32806 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8719

  21. TYPO3com commented on patch set 3 01/07/21, 08:51 Completed build in 10m 03s on Thu, 7 Jan, 08:51 AM Test Summary: 32565 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8720

  22. Elias Häußler uploaded patch set 4 01/07/21, 09:13

  23. TYPO3com voted on patch set 4 V +1 01/07/21, 09:24 Completed build in 11m 08s on Thu, 7 Jan, 09:24 AM Test Summary: 32565 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8722

  24. Guido Schmechel commented on patch set 4 01/08/21, 10:49

    Search.html:61 Unresolved

    Based on "The output behavior of those components has been fixed as well." we need this: <f:if condition="({file.isImage} || {file.isMediaFile}) && {moduleSettings.displayThumbs}"> And a corresponding function in typo3/sysext/filelist/Classes/FileFacade.php
  25. Oli Bartsch abandoned the change 07/09/21, 12:58

    In the meantime this had been fixed with https://review.typo3.org/c/Packages/TYPO3.CMS/+/69718. There is no extbase/fluid usage anymore and therefore also no differences between list view and search result view.