Review main Merged

94647[BUGFIX] Merge size info into a single row in file info panel

Gianluigi Martino CR +2 V +2 Easy +19 −1 updated 07/22/26, 11:01

Commit message

The generic field loop in `getPropertiesForTable()` lists all visible
TCA columns of `sys_file`, including "size" with its raw byte value.
Further down, an explicit "size" entry with a human-readable,
formatted value is added for file objects, resulting in the "size"
row being shown twice.

This patch now skips "size" in the generic loop for files, similar
to the existing "fileinfo" skip, since it is handled explicitly below.

Instead of discarding the raw byte value, the human-readable size is
combined into a single value, e.g. "103 KB (105,158 bytes)". A
new translatable "bytes" label with ICU plural form placeholders is
added, so the wording can be adjusted per language.

As a drive-by(e) the "crdate" column is also skipped now, as its
creation date information is already displayed on top of the
information block.

Review

  • Code review CR +2 Done
    • Garvin Hicking +2
    • Benni Mack +1
  • Verified V +2 Done
    • Garvin Hicking +2
    • Benni Mack +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 2431

Show 56 earlier messages
  1. Gianluigi Martino uploaded patch set 1 07/01/26, 12:59

  2. core-ci voted on patch set 1 V +1 07/01/26, 13:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/104150

  3. Georg Ringer commented on patch set 1 07/01/26, 13:09

    ElementInformationController.php:287

    please merge it with the line above with something like && in_array($field[fileinfo,size], what do you think?
  4. Gianluigi Martino commented on patch set 1 07/01/26, 13:19

    Thanks for the suggestion! No strong reason against it — I kept them as two separate blocks to mirror the existing style in this loop, where each skip condition has its own inline comment explaining why that specific field is excluded (see the mfa skip right above). Should i change it?
  5. Riccardo De Contardi commented on patch set 1 07/01/26, 13:29

    I'd be in favor of having both info on the same cell, something like Size 103KB (105158) But that's not that necessary,feel free to discard this one. For the user "103KB" is much more readable. I'd like to hear other opinions as well
  6. Riccardo De Contardi commented on patch set 1 07/01/26, 13:30

    AFAICS also width and height are duplicated, maybe because of EXT:filemetadata ?
  1. Garvin Hicking commented on patch set 1 07/02/26, 05:36

    Reply

    i agree we should keep the full size in this detail view inside that ine column. Maybe even: Size 103.10 kiB (105,158 bytes) for specificity?

    Reply

    I would vote to keep it as it is now, thats easier to read and more explicit
  2. Riccardo De Contardi commented on patch set 1 07/02/26, 06:59

    Reply

    YES! Perfect! Needless to say, "bytes" should be treated as a translatable label. For example, in italian, english words usually lose the plural "s" even when referring to multiple entities.
  3. Gianluigi Martino uploaded patch set 2 V +1 07/03/26, 12:49

  4. core-ci voted on patch set 2 V +1 07/03/26, 13:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/104283

  5. Gianluigi Martino commented on patch set 2 07/03/26, 13:10

    @erredeco@gmail.com Good catch, you're right - it's not caused by filemetadata itself, that extension just adds "width" and "height" as normal, visible fields. The panel then ends up showing them twice: once from the explicit image-dimensions display, and once again from the general metadata listing. Same root cause as the "size" duplication above, just in a different spot. I'll file a separate ticket and patch for it once this one is merged.
  6. Riccardo De Contardi commented on patch set 2 07/03/26, 14:12

    thank you

    Reply

    Done
  7. Riccardo De Contardi commented on patch set 2 07/03/26, 14:12

    Reply

    Done
  8. Riccardo De Contardi commented on patch set 2 07/03/26, 14:13

    Reply

    Done
  9. Riccardo De Contardi voted on patch set 2 V +1 07/03/26, 14:54

  10. Garvin Hicking updated the commit message in patch set 3 V +1 07/03/26, 15:37

  11. Garvin Hicking commented on patch set 3 07/03/26, 15:40

    locallang_core.xlf:670

    We should use the new ICU plural form syntax here, available since 14.3: ``` <source>{numberOfBytes, plural, one {# byte} other {# bytes}}</source> ``` and then parametrizize the `show_item.php.sizeInBytes` label to have a named argument `numberOFBytes`. Also while we're at it, let's use a label like `format.sizeInBytes` or so. That `show_item.php` really hurts and we shouldn't add more of them. Thanks so much for iterating on this!
  12. core-ci voted on patch set 3 V +1 07/03/26, 15:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/104309

  13. Garvin Hicking uploaded patch set 4 V +1 07/21/26, 20:20

  14. Garvin Hicking commented on patch set 4 CR +1 V +1 07/21/26, 20:20

    Reply

    Done

    ElementInformationController.php:287 Reply

    Done

    locallang_core.xlf:670 Reply

    Done
  15. Garvin Hicking uploaded patch set 5 CR +1 V +1 07/21/26, 20:23

  16. Garvin Hicking uploaded patch set 6 07/21/26, 20:36

  17. core-ci voted on patch set 4 V +1 07/21/26, 20:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105123

  18. core-ci voted on patch set 5 V +1 07/21/26, 20:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105124

  19. Garvin Hicking voted on patch set 6 CR +1 V +1 07/21/26, 20:42

  20. core-ci voted on patch set 6 V +1 07/21/26, 20:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105125

  21. Benni Mack uploaded patch set 7 CR +1 V +1 07/22/26, 10:43

  22. Benni Mack voted on patch set 7 CR +1 V +1 07/22/26, 10:43

  23. core-ci voted on patch set 7 V +1 07/22/26, 10:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105157

  24. Garvin Hicking voted on patch set 7 CR +2 V +2 07/22/26, 11:01

  25. Garvin Hicking merged patch set 8 07/22/26, 11:01