Feature #45345

Easy to use comments for fluid that won't show in output

Added by Stefan Neufeind over 2 years ago. Updated over 2 years ago.

Status:Needs Feedback Start date:2013-02-10
Priority:Should have Due date:
Assigned To:- % Done:

0%

Category:-
Target version:-
Has patch:

Description

Proposal from Michael Knoll:
Use <!--- ... ---> (three minus instead of the usual two).

http://mimi.kaktusteam.de/blog-posts/2012/02/fluid-comments/

History

#1 Updated by Andreas Wolf over 2 years ago

  • Status changed from New to Needs Feedback

Isn't this what the CommentViewHelper in the Fluid core is for? Or do you want to simplify it even more?

#2 Updated by Christian Kuhn over 2 years ago

This can be done with the f:comment viewhelper.

Furthermore, I don't have a good feeling with a magic like "hey, let's add a dash to the usual comment and make it magic". Thats imho against the concepts of fluid. I guess Sebastian Kurfuerst will have a similar view.

So: Imho we should close this issue as won't have. Furthermore a patch like that should go to FLOW.fluid first. In case the fluid bosses from FLOW implement something like that, we will backport after that.

#3 Updated by Martin Sonnenholzer over 2 years ago

I'm with Stefan. Michael Knoll's commenting solution is more intuitiv. Also Highlighting in IDEs works better with that. It would make coding a little bit easier and comments more readable and usable in my opinion

#4 Updated by Martin Sonnenholzer over 2 years ago

I'm with Stefan. Michael Knoll's commenting solution is more intuitiv. Also Highlighting in IDEs works better with that. It would make coding a little bit easier and comments more readable and usable in my opinion

#5 Updated by Marc Bastian Heinrichs over 2 years ago

I'm with Christian. We have a solution and it's against the concepts and to much magic.

#6 Updated by Ingo Renner over 2 years ago

I would actually support the new comment notation since I think it's easier and faster to type. Also I guess highlighting in IDEs should work out of the box with these.

I can't see any magic here. If you think it's magic, it simply needs documentation.

How about simply going the official route, adding the proposed syntax to TYPO3.Fluid and then have them come to TYPO3.CMS via back port? At the end of the day, we should strive to make things easier for everyone.

#7 Updated by Stefan Neufeind over 2 years ago

Thank you for the valuable input so far and the comments in various directions. Actually I'm not sure which is the best route to take. From the technical side <f:comment> would suffice, while the proposed short variant should make writing/reading templates a bit easier probably and we would have IDE-support out of the box (for normal IDEs).

By the way, I just found out why another dev in a project (at a customer in the past, not invented here [tm]) didn't use the comment-VH: It does not exist in LTS :-) (Yes, it could easily be added yourself).

And I also looked up the issue/discussion when the comment-VH was added (to 4.6 as a new feature):
http://forge.typo3.org/issues/13592

#8 Updated by Kay Strobach over 2 years ago

i voted for the issue, but i would like to see a more complex comment prefix / postfix to avoid possible not solvedable problems with non html fileformats :D

e.g.

<!--//-- ... --//-->
<!--##-- ... --##-->
<!--**-- ... --**-->
<!--.- ... -.-->
<!--!- ... -!-->

#9 Updated by Christian Kuhn over 2 years ago

The proposed syntax is invalid with other output formats like json or xml ... imho we should move this issue to TYPO3.Flow and see what the designers this of that. I'm still -1 for this approach.

#10 Updated by Christian Kuhn over 2 years ago

  • Project changed from Fluid to TYPO3.Fluid
  • Category deleted (Fluid: Core)

Also available in: Atom PDF