Review main Merged

47226[TASK] Fluidification of TypoScriptTemplateModuleController

Michael Oehlhof CR +2 V +2 Hard +222 −113 updated 08/03/16, 11:56

Commit message

Moved all HTML code from the PHP code to an own Fluid template.

Review

  • Code review CR +2
    • Andreas Kienast +2
    • Anja Leichsenring +1
  • Verified V +2
    • Andreas Kienast +2
    • Anja Leichsenring +1
    • TYPO3com +1 CI

Issues 1

Files 5

Review log 5661

Show 36 earlier messages
  1. Michael Oehlhof uploaded patch set 1 03/13/16, 07:08

  2. Andreas Kienast commented on patch set 1 CR -1 03/13/16, 10:55

    on it
  3. Andreas Kienast uploaded patch set 2 03/13/16, 10:59

  4. Andreas Kienast commented on patch set 2 03/13/16, 11:00

    I removed some unnecessary htmlspecialchars which broke the URLs. Also, I reformatted the code to be PSR-2 compliant.
  5. Andreas Kienast commented on patch set 2 03/13/16, 11:00

    PageZeroTableRow.html:3

    What's the purpose of this?
  6. Michael Oehlhof commented on patch set 2 03/13/16, 11:10

    PageZeroTableRow.html:3 Reply

    We have to ask the original author for that. I've only moved the existing HTML code to the fluid templates and partials.
  7. Andreas Kienast commented on patch set 2 03/13/16, 11:23

    Ah, it indents the rows if there are templates in subpages
  8. Andreas Kienast uploaded patch set 3 03/13/16, 12:03

  9. Andreas Kienast commented on patch set 3 03/13/16, 12:04

    I replaced that spacer indentation with tree lines. It's still no perfect but imho better.
  10. Andreas Kienast voted on patch set 3 CR +1 V +1 03/17/16, 08:44

  11. Frans Saris commented on patch set 3 03/17/16, 09:13

    TypoScriptTemplateModuleController.php:244

    why not use <f:translate in fluid template here?
  12. Frans Saris voted on patch set 3 V +1 03/17/16, 09:50

  13. Ruud Silvrants commented on patch set 3 CR -1 03/17/16, 10:10

    Looking at the translations
  14. Andreas Kienast voted on patch set 3 CR 0 V 0 03/17/16, 10:33

  15. Ruud Silvrants uploaded patch set 4 03/17/16, 11:22

  16. Andreas Kienast uploaded patch set 5 03/17/16, 11:48

  17. Andreas Kienast commented on patch set 5 CR +1 V +1 03/17/16, 11:49

    I've re-added the indentation with whitespaces. The treeline-based solution didn't work well.
  18. Frans Saris commented on patch set 5 V -1 03/17/16, 12:21

    The buttons "Click here to create extension template" etc don't work in the "No template" view
  19. Ruud Silvrants uploaded patch set 6 03/17/16, 12:50

  20. Ruud Silvrants commented on patch set 6 CR -1 V -1 03/17/16, 15:41

    Templates gets rendered two times, looking at it
  21. Ruud Silvrants commented on patch set 6 03/17/16, 16:02

    TypoScriptTemplateModuleController.php:472

    Template is rendered here, but also in main. The dependencies need to be checked because this output is used at TypoScriptTemplateInformationModuleFunctionController (line 338) and TypoScriptTemplateConstantEditorModuleFunctionController (line 187).
  22. Michael Oehlhof commented on patch set 6 03/17/16, 21:55

    I cherry picked patch set 6, but I don't get the template twice.
  23. Frans Saris commented on patch set 6 03/18/16, 06:29

    It is renderend twice not displayed twice. To test add a f:debug to the notemplate template
  24. Michael Oehlhof uploaded patch set 7 03/18/16, 21:16

  25. Michael Oehlhof commented on patch set 7 CR -1 03/19/16, 09:17

    Will move the NoTemplate template to partials
  26. Michael Oehlhof uploaded patch set 8 03/19/16, 09:28

  27. Andreas Kienast voted on patch set 8 CR +1 V +1 03/21/16, 09:30

  28. Frank Nägler commented on patch set 8 CR -1 03/21/16, 09:45

    on it
  29. Frank Nägler uploaded patch set 9 03/21/16, 09:56

  30. Frank Nägler commented on patch set 9 CR -1 03/21/16, 10:00

    first, thanks for your patch ;) I fixed some PSR-2 errors and warnings. Then I don't understand the noTemplate return stuff. Also I think we should wait with merging this patch until 8.0 is released to be sure not break anything we don't see yet.

    TypoScriptTemplateModuleController.php:492

    don't get this...
  31. Michael Oehlhof commented on patch set 9 03/21/16, 11:39

    TypoScriptTemplateModuleController.php:492 Reply

    This empty return string has to stay because the function is called via BaseScriptClass.php line 356 in function extObjContent(). When the last subitem of https://forge.typo3.org/issues/75030 gets in we can remove the usage of the variable typoscriptTemplateModuleContent of the view from the code and the view.
  32. Frank Nägler commented on patch set 9 CR 0 03/21/16, 12:33

    ah, I think I know what you mean. Thx Michael. But I would still wait until 8.0 is released.
  33. Michael Oehlhof uploaded patch set 10 04/25/16, 17:19

  34. Thorsten Griebenow commented on patch set 10 CR -1 05/06/16, 13:40

    I found a non-closing span-tag.

    PageZeroTableRow.html:3

    Missing closing span-tag
  35. Michael Oehlhof uploaded patch set 11 05/07/16, 18:02

  36. Thorsten Griebenow voted on patch set 11 CR +1 05/09/16, 04:25

  1. Michael Oehlhof uploaded patch set 12 05/29/16, 22:29

  2. Michael Oehlhof commented on patch set 12 05/29/16, 22:31

    Remove merge conflict and fix error with missing variable initialization.
  3. Thorsten Griebenow voted on patch set 12 CR +1 05/30/16, 04:59

  4. Michael Oehlhof uploaded patch set 13 06/07/16, 20:22

  5. Michael Oehlhof commented on patch set 12 06/07/16, 20:22

    Fixed merge conflict.
  6. Claus Due commented on patch set 13 07/10/16, 08:42

    Question: * How have you taken care of the now removed InfoBox template? Sorry if I missed this somewhere! Other comments inline :)

    TypoScriptTemplateModuleController.php:106

    We should make this protected; if access is required from the outside, then add a getter. If the intention is to replace the View from the outside then we should probably discuss this in a bit more detail - in terms of Fluid integration the main API should be the RenderingContext (so that is what we should aim to give access to manipulate/replace).

    TypoScriptTemplateModuleController.php:207

    This instance should be created probably in the constructor (but I'd like a second opinion since I'm not completely sure what the long term goals regarding instance creation is - constructor arg deps?) At any rate: we should allow some control over this instance; or take it all away. Right now the View might as well not be a class property at all, since it gets created here and then rendered immediately after.

    TypoScriptTemplateModuleController.php:468

    Is this E_NOTICE safe? I'm not sure this array is always defined...

    TypoScriptTemplateModuleController.php:648

    These two blocks have multiple duplicated lines in common that can safely be moved outside the condition.

    TypoScriptTemplateModuleController.php:696

    This method can be expressed as follows: <pre> $view = GeneralUtility::makeInstance(StandaloneView::class); $view->getTemplatePaths()-> fillDefaultsByPackageName($extensionName); // reads TS configured paths - vital for overlays! $view->getTemplatePaths()->setControllerAction($templateName); return $view; </pre> Which should absolutely be done this way in order to allow third parties the normal Fluid strategies of overlaying template paths. But do see above regarding what could be done in order to allow devs even better access to the RenderingContext and all it's delicious bits.

    NoTemplate.html:4

    Extension name parameter is not required afaik. If you initialise the View correctly then this should be present in the RenderingContext (and won't even have to be replaced in overridden templates *unless* the overriding dev intentionally wants the LLL from another extension than tstemplate).

    NoTemplate.html:13

    Alternatively: `{content.selector -> f:or(alternative: '<input type="hidden" name="createStandard" value="" />')}`

    PageZeroTableRow.html:5

    Does *every* variable here contain HTML potentially? You should only be using `f:format.raw` if the variable contains HTML (and even so you should be careful that the HTML can be trusted).

    Main.html:3

    Alternatively: `<f:render partial="{partialName}" optional="1" arguments="{content: content}" />`. Condition is not required when optional rendering is in play (output will be empty, no error will happen).

    PageZero.html:1

    Same here - you probably don't need the extensionName as it gets filled into RenderingContext if View is created correctly.

    PageZero.html:16

    I would move this to a section in this template (for performance reasons). You can add an f:section and use f:render in this template even if you don't wrap the existing template code in an f:section.
  7. Claus Due uploaded patch set 14 07/10/16, 10:00

  8. Claus Due commented on patch set 13 07/10/16, 10:01

    Addressed reviewed issues and rebased onto master to get all new Fluid features.
  9. TYPO3com voted on patch set 14 V +1 07/10/16, 10:08 Completed build in 07m 27s on Sun, 10 Jul, 12:08 PM Test Summary: 18428 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-670

  10. Claus Due uploaded patch set 15 07/10/16, 10:09

  11. Claus Due uploaded patch set 16 07/10/16, 10:10

  12. Claus Due commented on patch set 16 07/10/16, 10:10

    Refactored hook object resolving to a protected method.
  13. Claus Due uploaded patch set 17 07/10/16, 10:11

  14. TYPO3com voted on patch set 15 V +1 07/10/16, 10:17 Completed build in 07m 25s on Sun, 10 Jul, 12:17 PM Test Summary: 18428 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-671

  15. TYPO3com voted on patch set 16 V +1 07/10/16, 10:20 Completed build in 09m 46s on Sun, 10 Jul, 12:20 PM Test Summary: 18428 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-672

  16. TYPO3com voted on patch set 17 V +1 07/10/16, 10:24 Completed build in 12m 51s on Sun, 10 Jul, 12:24 PM Test Summary: 18428 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-673

  17. Benni Mack commented on patch set 17 07/11/16, 09:36

    TypoScriptTemplateModuleController.php:628

    renaming a public method is (unfortunately) breaking. Either we keep it as "renderList" with the new functionality or add a RST file (I'm for the first option :))
  18. Claus Due commented on patch set 17 07/12/16, 11:28

    > renaming a public method is (unfortunately) breaking I'm not sure that would've been my choice to do either - but it does seem the original method is still in place ;)
  19. Claus Due commented on patch set 17 07/12/16, 11:29

    Strike that, must've been an old patch set. I agree, let's rename this one back!
  20. Claus Due uploaded patch set 18 07/12/16, 11:31

  21. TYPO3com voted on patch set 18 V +1 07/12/16, 11:42 Completed build in 10m 58s on Tue, 12 Jul, 01:42 PM Test Summary: 18450 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-854

  22. Anja Leichsenring voted on patch set 18 CR +1 V +1 08/01/16, 12:58

  23. Claus Due commented on patch set 18 08/03/16, 11:24

    This one should be ready to merge - and does not break things ;)
  24. Andreas Kienast commented on patch set 18 CR +2 V +2 08/03/16, 11:56

    bring it on
  25. Gerrit merged patch set 18 08/03/16, 11:56