Review main Merged

92650[FEATURE] Introduce Fluid `render.text/richtText` ViewHelpers

Matthias Vogel CR +2 V +2 Hard +407 −65 updated 08/11/26, 14:16

Commit message

The `<f:render.text>` and `<f:render.richText>` ViewHelpers
have been introduced as dedicated rendering components for
record-backed text fields.

They provide a standardized approach for outputting text content
in Fluid templates, complementing the existing `<f:format.html>`
and `<f:format.nl2br>` ViewHelpers by operating in the context
of the full record rather than on isolated field values.

This ensures consistent field output behavior and establishes
a unified rendering surface that can be built upon in future
versions.

Review

  • Code review CR +2 Done
    • Oliver Hader +2
    • Oli Bartsch +1
  • Verified V +2 Done
    • Oliver Hader +2
    • Oli Bartsch +1
    • core-ci +1 CI

Issues 1

Files 16

Review log 4466

Show 2441 earlier messages
  1. Matthias Vogel uploaded patch set 1 02/03/26, 19:50

  2. Matthias Vogel marked it work in progress 02/03/26, 19:50

  3. core-ci voted on patch set 1 V +1 02/03/26, 20:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94938

  4. Matthias Vogel uploaded patch set 2 V +1 02/03/26, 20:07

  5. core-ci voted on patch set 2 V -1 02/03/26, 20:16 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94941

  6. Matthias Vogel rebased onto patch set 3 V -1 02/04/26, 06:39

  7. core-ci voted on patch set 3 V +1 02/04/26, 06:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94970

  8. Matthias Vogel rebased onto patch set 4 V +1 02/04/26, 08:15

  9. core-ci voted on patch set 4 V +1 02/04/26, 08:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94975

  10. Matthias Vogel rebased onto patch set 5 V +1 02/04/26, 09:28

  11. Matthias Vogel uploaded patch set 6 02/04/26, 09:39

  12. core-ci voted on patch set 6 V -1 02/04/26, 09:54 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94987

  13. core-ci voted on patch set 5 V +1 02/04/26, 10:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94983

  14. Matthias Vogel rebased onto patch set 7 V -1 02/04/26, 13:21

  15. core-ci voted on patch set 7 V -1 02/04/26, 13:38 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95025

  16. Matthias Vogel rebased onto patch set 8 V -1 02/04/26, 13:52

  17. Matthias Vogel rebased onto patch set 9 02/04/26, 13:56

  18. Matthias Vogel rebased onto patch set 10 02/04/26, 14:15

  19. core-ci voted on patch set 8 V -1 02/04/26, 14:16 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95030

  20. core-ci voted on patch set 9 V -1 02/04/26, 14:20 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95034

  21. core-ci voted on patch set 10 V -1 02/04/26, 14:31 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95039

  22. Matthias Vogel rebased onto patch set 11 V -1 02/04/26, 14:37

  23. core-ci voted on patch set 11 V -1 02/04/26, 14:53 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95043

  24. Matthias Vogel rebased onto patch set 12 V -1 02/04/26, 15:30

  25. core-ci voted on patch set 12 V -1 02/04/26, 16:04 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95062

  26. Matthias Vogel rebased onto patch set 13 V -1 02/04/26, 16:24

  27. core-ci voted on patch set 13 V -1 02/04/26, 16:40 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95070

  28. Matthias Vogel uploaded patch set 14 V -1 02/05/26, 08:20

  29. core-ci voted on patch set 14 V +1 02/05/26, 08:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95110

  30. Matthias Vogel uploaded patch set 15 V +1 02/05/26, 09:34

  31. core-ci voted on patch set 15 V -1 02/05/26, 09:47 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95116

  32. Simon Praetorius commented on patch set 15 02/05/26, 11:25

    Feature-108868-IntroduceFluidRenderRichTextViewHelper.rst:60

    I think the most important aspect (why do we do this?) is missing here: These new ViewHelpers not only receive an arbitrary string, but also its context. Introducing these APIs (in the form of ViewHelpers) will allow us to render things differently based on where they come from in future iterations. For example, based on the used RTE editor (or its configuration), the rendering might be different in the frontend. I think it's also important to explain when these new ViewHelpers should be used and when not (=> everytime there is a record, it makes sense).

    Feature-108868-IntroduceFluidRenderTextViewHelper.rst:15

    ```suggestion to render record fields containing plain text content. ```

    RichTextViewHelper.php:43

    Let's leave this out in the first iteration. Then we still have the possibility to establish a better, more generic API once it becomes necessary.

    TextViewHelper.php:28

    Should already be done based on `ViewHelperInterface`

    TextViewHelper.php:29

    Let's make both VH final

    TextViewHelper.php:31

    We should consider setting `$escapeOutput = false`, even though it's functionally not necessary because of `UnsafeHTML`. This will avoid an unnecessary `EscapingNode` and thus reduces code to be executed (both uncached and cached).

    TextViewHelper.php:42

    maybe `convertNewlines`?

    TextViewHelper.php:52

    Can we clarify the use case here? I think it's ok to give extensions a little wiggle-room here, we just should explain why we need this.

    TextViewHelper.php:58

    With recent Fluid changes, this should always be a string.

    TextViewHelper.php:66

    What should `??` cover here? Undefined fields will still lead to an exception.

    CaminoTextmediaTeaser.fluid.html:15

    There is still a check for `textHtml` in `Textmediateaser.fluid.html`.

    Intro.fluid.html:29

    `<p>` is missing now. Is that a problem?
  33. Matthias Vogel uploaded patch set 16 V -1 02/05/26, 13:25

  34. Matthias Vogel commented on patch set 16 02/05/26, 13:25

    This change is ready for review.

    Feature-108868-IntroduceFluidRenderRichTextViewHelper.rst:60 Reply

    Done

    Feature-108868-IntroduceFluidRenderTextViewHelper.rst:15 Reply

    Done

    RichTextViewHelper.php:43 Reply

    Done

    TextViewHelper.php:28 Reply

    Done

    TextViewHelper.php:29 Reply

    Done

    TextViewHelper.php:31 Reply

    Done

    TextViewHelper.php:42 Reply

    Done

    TextViewHelper.php:52 Reply

    Done

    TextViewHelper.php:58 Reply

    Done

    TextViewHelper.php:66 Reply

    some times we get null instead of empty string. If the database is Nullable.

    CaminoTextmediaTeaser.fluid.html:15 Reply

    Done

    Intro.fluid.html:29 Reply

    The text is only richText, it was never `textHTML: 0`.
  35. core-ci voted on patch set 16 V +1 02/05/26, 13:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95148

  36. Simon Praetorius uploaded patch set 17 V +1 02/05/26, 14:36

  37. Matthias Vogel uploaded patch set 18 02/05/26, 14:51

  38. Simon Praetorius voted on patch set 18 CR +1 V +1 02/05/26, 14:55

  39. core-ci voted on patch set 18 V +1 02/05/26, 15:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95166

  40. Georg Ringer commented on patch set 18 V -1 02/05/26, 15:42

    TextViewHelper.php:66

    should we also du a trim to avoid false line breaks?

    TextViewHelper.php:72

    we don't use the global namespace

    page.tsconfig:145

    skip this change
  41. Georg Ringer commented on patch set 18 02/05/26, 15:46

    CaminoAuthor.fluid.html:26

    is is not needed to render it with the new viewhelpers?

    _hero.css:41

    unrelated change
  1. Matthias Vogel commented on patch set 18 02/05/26, 16:02

    TextViewHelper.php:66 Reply

    if you want a newline at the beginning you should get one. the f:format.nl2br is also without trim. And I want to be comaptible with it.

    page.tsconfig:145 Reply

    Done

    page.tsconfig:145 Reply

    Done

    page.tsconfig:145 Reply

    Done

    CaminoAuthor.fluid.html:24

    ```suggestion <f:if condition="{bodytext}"> ```

    CaminoAuthor.fluid.html:26 Reply

    good catch 👍

    CaminoAuthor.fluid.html:26 Reply

    good catch 👍
  2. Matthias Vogel uploaded patch set 19 CR +1 V +1 02/05/26, 16:03

  3. Matthias Vogel commented on patch set 18 02/05/26, 16:04

    CaminoAuthor.fluid.html:24 Reply

    Done

    CaminoAuthor.fluid.html:26 Reply

    Done
  4. core-ci voted on patch set 19 V +1 02/05/26, 16:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95179

  5. Oli Bartsch commented on patch set 19 02/05/26, 17:45

    RichTextViewHelper.php:66

    I think we don't need the factory here since text has usually no "special" resolving

    RichTextViewHelper.php:69

    Let's check for string here to: 1. Do not run the below code 2. Prevent TypeError's

    TextViewHelper.php:72

    comment: We need to manually escape the output here to pass it to UnsafeHTMLString.
  6. Oli Bartsch commented on patch set 19 02/05/26, 17:45

    _hero.css:41 Reply

    This is an unnecessary property which leads to unintended side effects in preview like modules.
  7. Benni Mack commented on patch set 19 02/05/26, 18:02

    tbh, I don't understand as a regular / outsider when to use this VH and when to use <f:format.html>...
  8. Matthias Vogel uploaded patch set 20 V +1 02/05/26, 20:06

  9. core-ci voted on patch set 20 V -1 02/05/26, 20:18 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95207

  10. Matthias Vogel uploaded patch set 21 V -1 02/05/26, 20:25

  11. Matthias Vogel commented on patch set 21 02/05/26, 20:26

    RichTextViewHelper.php:66 Reply

    Done

    RichTextViewHelper.php:69 Reply

    Done

    TextViewHelper.php:72 Reply

    Done

    TextViewHelper.php:72 Reply

    Done
  12. core-ci voted on patch set 21 V +1 02/05/26, 20:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95209

  13. Oli Bartsch uploaded patch set 22 V +1 02/05/26, 21:20

  14. Oli Bartsch voted on patch set 22 CR +1 V +1 02/05/26, 21:21

  15. core-ci voted on patch set 22 V -1 02/05/26, 21:28 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95215

  16. Oliver Hader voted on patch set 22 CR +2 V +2 02/05/26, 21:45

  17. Simon Praetorius commented on patch set 22 02/05/26, 21:46

    Feature-108868-IntroduceFluidRenderRichTextViewHelper.rst:22

    This one needs to be clarified. I'm confused. Also, from my understanding, the ViewHelper does not decouple it, rather the opposite. But maybe I'm thinking of another coupling here. :-/

    Feature-108868-IntroduceFluidRenderRichTextViewHelper.rst:69

    Here as well, I don't get this coupling.
  18. core-ci voted on patch set 22 V +1 02/05/26, 21:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95215

  19. Oliver Hader commented on patch set 22 02/05/26, 21:51

    Feature-108868-IntroduceFluidRenderRichTextViewHelper.rst:22 Reply

    Acknowledged

    Feature-108868-IntroduceFluidRenderRichTextViewHelper.rst:69 Reply

    Acknowledged
  20. Oliver Hader merged patch set 23 02/05/26, 21:52

  21. Garvin Hicking commented on patch set 23 02/05/26, 22:05

    Feature-108868-IntroduceFluidRenderRichTextViewHelper.rst:41

    I think this is wrong markup
  22. Simon Schaufelberger commented on patch set 23 02/05/26, 22:25

    Feature-108868-IntroduceFluidRenderRichTextViewHelper.rst:41 Reply

    Yes, this must be a string

    Feature-108868-IntroduceFluidRenderTextViewHelper.rst:39

    Field must be a string
  23. Markus Klein commented on patch set 23 02/06/26, 07:00

    Feature-108868-IntroduceFluidRenderTextViewHelper.rst:73

    I do not get, what this sentence wants to tell me. "needs to be displayed as intended"? I hope things are displayed as intended. "output is processed in the same order as it is rendered"? I'm not sure what this is referring to. How can this be not the case, currently? Maybe an example helps?

    Feature-108868-IntroduceFluidRenderTextViewHelper.rst:94

    Why does it make things more flexible? I can't deduce this from this rst, sorry.
  24. Matthias Vogel commented on patch set 23 02/10/26, 21:17

    Feature-108868-IntroduceFluidRenderRichTextViewHelper.rst:41 Reply

    Done

    Feature-108868-IntroduceFluidRenderTextViewHelper.rst:39 Reply

    Done

    Feature-108868-IntroduceFluidRenderTextViewHelper.rst:73 Reply

    Done

    Feature-108868-IntroduceFluidRenderTextViewHelper.rst:94 Reply

    Done
  25. Markus Klein commented on patch set 23 08/11/26, 14:16