Review main Merged

80097[FEATURE] Add base64 attribute to f:image and f:uri.image

Sebastien Convers CR +2 V +2 Normal +72 −2 updated 08/05/24, 09:09

Commit message

Add an option to return the base64 encoded contents of an
image embedded via f:image or f:uri.image, via the new
attribute `base64=true`.

This can be used to prevent additional HTTP calls or to
ease embedding in FluidEmail templates.

Review

  • Code review CR +2 Done
    • Georg Ringer +2
    • Chris Müller +1
    • Markus Klein +1
    • Garvin Hicking +1
  • Verified V +2 Done
    • Georg Ringer +2
    • Chris Müller +1
    • Garvin Hicking +1
    • core-ci +1 CI

Issues 1

Files 5

Review log 3342

Show 1317 earlier messages
  1. Sebastien Convers uploaded patch set 1 07/19/23, 12:32

  2. core-ci voted on patch set 1 V -1 07/19/23, 12:39 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44311

  3. Chris Müller commented on patch set 1 07/19/23, 12:40

    As this is a feature, a changelog rst is needed, see here: https://docs.typo3.org/m/typo3/guide-contributionworkflow/main/en-us/AddingDocumentation/Index.html#changelog Additionally, features are only added to main, not to LTS releases.
  4. Stefan Bürk commented on patch set 1 CR -1 07/19/23, 13:41

    See comment on Chris comment.

    Reply

    Thank you for your first contribution. You ask for hints, and Chris Müller already stated the first things I want clearify a little bit: * Per policy, FEATURES are only added to the main branch / next LTS version. In relativly rare rare cased a excamption may be maded, but this must be approved by the Project Lead (Benni mack) - don't expect it. * Per policy a changelog rst file is mandantory for features, deprecations and breaking changes. There is also a small helper on forger to help with it: https://forger.typo3.com/utilities/rst * For this feature, we should cover this with test(s) to be sure it will not break in the future. (Regression guard). * Git commit message is the first line of truth, helping in debugging things and other things we should add some more context and information to the commit message describing the need for the feature and a minor scratch up. (summary - detailed in the rest file). * The red ci states, that there is a cgl error (violation og the coding guilde line). You can click the link to see the runs and the output. To fix it, you can use the runTests.sh (if you have docker + docker-compose installed) to fix it. I'm putting a -1 on it for now. You can look into the other tests or even the tests for the ImageViewHelper itself and try to add tests for this feature. Let me know (ping here or on slack) if you need help to add the tests or if I should take care of it. Normally, I would have pushed on it and polished some things - but I got your statement in the issue in the way that you want to learn - so I decided to write them here instead of doing some things. Was not to offent you. Lot of things already are good ;) Patch done with gerrit, having a issue created beforehand, having a Resolved and Releases line, the correct prefix - great !!!! Regarding the cgl error, either fix it manually or execute following after you cherry-picked your patch again on a clean main branch: ``` Build/Scripts/runTests.sh -s cglGit ``` which will execute the cgl only on the php files contained in the last commit (your patch) and if something is fixed you can see it -> git status .. just ammend it to your patch and push it again: ``` git add . ; git commit --amend ; git push ```
  5. Sebastien Convers uploaded patch set 2 CR -1 V -1 07/19/23, 13:48

  6. core-ci voted on patch set 2 V +1 07/19/23, 13:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44312

  7. Sebastien Convers commented on patch set 2 07/19/23, 14:07

    Reply

    Thanks for all the information! I thought the cgl was done in the pre-commit hook, to be sure i manually ran `Build/Scripts/runTests.sh` because i red too fast and thought it was running everything, then i finally ran the "good" command! Shoud be better now 😊
  8. Stefan Bürk commented on patch set 2 07/19/23, 14:19

    Reply

    the pre-commit os only a check, not a automatic fix. Do you need help with adding a test (my other comments) ? Or do you try to come up with some tests ?
  9. Stefan Bürk commented on patch set 2 CR -1 07/19/23, 14:35

    on it ...
  10. Simon Schaufelberger rebased onto patch set 3 CR -1 V +1 12/22/23, 01:20

  11. core-ci voted on patch set 3 V +1 12/22/23, 01:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/50893

  12. Garvin Hicking commented on patch set 3 12/22/23, 18:37

    This looks interesting! Sebastien, are you still interested to get this wrapped up? :-)
  13. Chris Müller uploaded patch set 4 V +1 12/23/23, 15:39

  14. core-ci voted on patch set 4 V +1 12/23/23, 15:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/50933

  15. Markus Klein commented on patch set 4 12/23/23, 22:12

    This should also be added to the uri.image VH IMHO
  16. Anja Leichsenring commented on patch set 4 CR -1 01/03/24, 07:01

    agree with Marcus, the tag based and uri VH should work the same way. Also, a test for each one would be nice, take reference to the existing ones.
  17. Patrick Schriner uploaded patch set 5 CR -1 V +1 08/01/24, 20:39

  1. Patrick Schriner uploaded patch set 6 08/01/24, 20:40

  2. core-ci voted on patch set 5 V +1 08/01/24, 20:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62652

  3. core-ci voted on patch set 6 V +1 08/01/24, 21:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62654

  4. Garvin Hicking updated the commit message in patch set 7 V +1 08/01/24, 22:00

  5. Garvin Hicking uploaded patch set 8 08/01/24, 22:05

    Adjust RST
  6. core-ci voted on patch set 7 V -1 08/01/24, 22:08 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62682

  7. core-ci voted on patch set 8 V +1 08/01/24, 22:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62685

  8. Garvin Hicking commented on patch set 8 CR +1 08/01/24, 22:33

    Reply

    Done

    Reply

    Done
  9. Georg Ringer voted on patch set 8 CR +1 V +1 08/02/24, 07:14

  10. Georg Ringer commented on patch set 8 08/02/24, 07:19

    btw IMHO we should change the behaviour in typo3/sysext/core/Resources/Private/Layouts/SystemEmail.html and use the feature there
  11. Georg Ringer commented on patch set 8 08/02/24, 09:07

    Reply

    might be but requires additional work. Once we change it e.g. to ``` <f:image base64="1" src="{f:uri.resource(path: 'EXT:core/Resources/Public/Images/typo3_black.svg')}" alt="TYPO3 Logo" height="41" width="150" /> ``` then this fixes suddenly a lot of issues
  12. Garvin Hicking commented on patch set 8 08/02/24, 09:28

    Reply

    Let's do that in a follow-up and see if this one can get merged first? Did you test if this works well in mail browsers
  13. Markus Klein commented on patch set 8 08/02/24, 11:39

    ImageViewHelper.php:133

    why the empty line?
  14. Patrick Schriner commented on patch set 8 08/02/24, 12:07

    ImageViewHelper.php:133 Reply

    It was in the original patch and there's already an empty line between fileExtension and width. Tbh, it doesn't make much sense because absolute has nothing to do with sizing either... I guess the original idea was to keep it a bit separate from the width-related group
  15. Patrick Schriner uploaded patch set 9 CR +1 V +1 08/02/24, 15:15

  16. core-ci voted on patch set 9 V +1 08/02/24, 15:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62752

  17. Markus Klein commented on patch set 9 08/02/24, 17:22

    ImageViewHelper.php:133 Reply

    Acknowledged
  18. Markus Klein voted on patch set 9 CR +1 08/02/24, 17:22

  19. Garvin Hicking voted on patch set 9 CR +1 V +1 08/02/24, 17:23

  20. Chris Müller voted on patch set 9 CR +1 08/02/24, 19:45

  21. Chris Müller voted on patch set 9 V +1 08/02/24, 20:07

  22. Georg Ringer voted on patch set 9 CR +2 V +2 08/04/24, 07:34

  23. Georg Ringer merged patch set 10 08/04/24, 07:34

  24. Christian Kuhn commented on patch set 10 08/05/24, 09:09

    Reply

    Acknowledged