Project

General

Profile

Actions

Feature #102337

closed

Make columnsToRender in RecordListDownloadController changable

Added by Henrik Ziegenhain about 1 year ago. Updated 4 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend API
Start date:
2023-11-07
Due date:
% Done:

100%

Estimated time:
PHP Version:
8.2
Tags:
Complexity:
Sprint Focus:

Description

This is a Feature-Request.

For e.g. custom csv-download requests it would be really nice to use existing core functionality.
The download settings modal is a very handy and user-friendly feature to download the currently displayed or even all columns.

It would be even more cool if one could hook into this, to change the "columnsToRender".

Short description of our task:
We created a new backend module to offer different data export possibilities.
One downloads should include the fields "a,b,c" from my table and the other the fields "d,e,f".
A click on the download link opens the known download settings modal from list view to set a filename, choose export format and may make some settings changes.
After click on "download", guess what, the download starts. This has the same look and feel as in list view.


Files


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Task #105407: Fix changelog deprecation issue numberResolvedGarvin Hicking2024-10-23

Actions
Related to TYPO3 Core - Task #105408: Remove deprecated DatabaseRecordList CSV hooksResolvedGarvin Hicking2024-10-23

Actions
Actions #1

Updated by Garvin Hicking about 1 year ago

I wonder if that could be an extension to the 'ctrl' array of the TCA of any table.

Different presets could be configured:

[
  'downloadPresets' => [
      'personalData' => ['first_name','last_name','city','zip','email']
      'interests'    => ['profile','bio','hobby'],
      'meta'         => ['uid', 'importID', 'last_login']
  ]
]

Then the popup could offer a checkable list of all presets, so the user could check either one or multiple of these presets.

If fields occur in multiple presets, they would be collapsed into only being used once.

Extensions could then both override core/foreign/third-party presets.

Combined with UserTSConfig maybe even user-specific presets could be implemented, if those also get evaluated for presets.

(Ideally we'd add proper events to populate/evaluate the RecordDownloadSettings Fluid template, and evaluate them in the action, so additional customization can be achieved by adding other things and not just presets, like: custom filters, record transformations, additional download formats, ...)

What do you think? It's a larger scope, but I'd be pretty interested in implementing this.

Actions #2

Updated by Benni Mack about 1 year ago

I would recommend to not extend TCA for such a specific feature, but rather use TSconfig to customize this functionality.

Why? TCA is loaded on every every request (frontend, BE Ajax), and we do not need this. There are certain things we can put into TCA, but I'd say not this.

Actions #3

Updated by Garvin Hicking about 1 year ago

Understood. I've got to check if I can access TSconfig within the Controller populating the modal as well as the actual download request (TCA would be accessible easily due to reasons you mentioned).

Actions #4

Updated by Henrik Ziegenhain about 1 year ago

Thanks for your comments.

The much bigger approach of Galvin to combine TsConfig with some presets and a Hook to manipulte the settings by PHP would indeed be very smart.
Maybe we could join forces. I also could offer some help.

Actions #5

Updated by Gerrit Code Review 8 months ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83713

Actions #6

Updated by Garvin Hicking 8 months ago

It took some time, but here's a first implementation:

https://review.typo3.org/c/Packages/TYPO3.CMS/+/83713

See the screenshot how the modal is enhanced. Configuration done via TSConfig:

mod.web_list.recordListDownloadPresets {
    pages {
        10 {
            label = Test-Preset-1
            columns = uid, title, crdate, slug, bodytext
        }

        20 {
            label = Test-Preset-2
            columns = uid, title, slug
        }
    }
}

Actions #7

Updated by Gerrit Code Review 7 months ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83713

Actions #8

Updated by Gerrit Code Review 7 months ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83713

Actions #10

Updated by Gerrit Code Review 7 months ago

Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83713

Actions #11

Updated by Gerrit Code Review 6 months ago

Patch set 5 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83713

Actions #12

Updated by Gerrit Code Review 6 months ago

Patch set 6 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83713

Actions #13

Updated by Gerrit Code Review 6 months ago

Patch set 7 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83713

Actions #14

Updated by Gerrit Code Review 6 months ago

Patch set 8 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83713

Actions #15

Updated by Gerrit Code Review 6 months ago

Patch set 9 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83713

Actions #16

Updated by Gerrit Code Review 5 months ago

Patch set 10 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83713

Actions #17

Updated by Gerrit Code Review 5 months ago

Patch set 11 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83713

Actions #18

Updated by Gerrit Code Review 5 months ago

Patch set 12 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83713

Actions #19

Updated by Gerrit Code Review 5 months ago

Patch set 13 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83713

Actions #20

Updated by Gerrit Code Review 5 months ago

Patch set 14 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83713

Actions #21

Updated by Gerrit Code Review 5 months ago

Patch set 15 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83713

Actions #22

Updated by Gerrit Code Review 5 months ago

Patch set 16 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83713

Actions #23

Updated by Gerrit Code Review 5 months ago

Patch set 17 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83713

Actions #24

Updated by Gerrit Code Review 5 months ago

Patch set 18 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83713

Actions #25

Updated by Gerrit Code Review 5 months ago

Patch set 19 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83713

Actions #26

Updated by Gerrit Code Review 5 months ago

Patch set 20 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83713

Actions #27

Updated by Gerrit Code Review 5 months ago

Patch set 21 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83713

Actions #28

Updated by Gerrit Code Review 5 months ago

Patch set 22 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83713

Actions #29

Updated by Gerrit Code Review 5 months ago

Patch set 23 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83713

Actions #30

Updated by Garvin Hicking 5 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #31

Updated by Benni Mack 4 months ago

  • Status changed from Resolved to Closed
Actions #32

Updated by Garvin Hicking 29 days ago

  • Related to Task #105407: Fix changelog deprecation issue number added
Actions #33

Updated by Christian Kuhn 28 days ago

  • Related to Task #105408: Remove deprecated DatabaseRecordList CSV hooks added
Actions

Also available in: Atom PDF