[ 
https://issues.apache.org/jira/browse/TAP5-742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dan Adams updated TAP5-742:
---------------------------

        Fix Version/s: 5.2.5
          Description: 
In complex pages, it can be hard to work backwards from a bit of output HTML in 
the browser, back to the component that originated the markup.

This feature adds rendering of comments that provide trace output of which 
component is currently currently:

<!--BEGIN Index:loop (context:Index.tml, line 15)--><li>
      <!--BEGIN Index:pagelink (context:Index.tml, line 16)--><a 
href="/abstractcomponentdemo">Abstract Component Demo</a><!--END 
Index:pagelink-->

Note that the BEGIN comment includes both the complete component id in the page 
and the location of that in the template. With just the component id it can 
still be unclear which component is being referenced without the line number.

For security purposes, this feature cannot be enabled in production mode. In 
non-production mode it can be enabled two ways:
 - Setting the symbol "tapestry.component-render-tracing-enabled" to "true" 
(default: false)
 - Setting the request query parameter "t:component-trace" on the URL to 
"true". This allows enabling for a specific request when you need it in 
development rather than having it on all the time.

Note that rendering comments are based on the component lifecycle. Thus in some 
case where post-render DOM manipulation is performed the markup my not longer 
be in the correct rendering comments.


  was:
In complex pages, it can be hard to work backwards from a bit of output HTML in 
the browser, back to the component that originated the markup.

A special mode could be enabled where components would render a comment before 
and after rendering:

<!-- BEGIN: Index:layout.pagelink -->
<a href="dashboard">Dashboard</a>
<!-- END: Index:layout.pagelink -->

This would bloat and clutter the application (a lot!) but would be useful, on 
occasion.  One possibility would be a special query parameter to enable this on 
a request-by-request basis, i.e., ?t:component-trace=true


    Affects Version/s:     (was: 5.1.0.5)
                       5.2.4

> Add optional component tracing comments to rendered output
> ----------------------------------------------------------
>
>                 Key: TAP5-742
>                 URL: https://issues.apache.org/jira/browse/TAP5-742
>             Project: Tapestry 5
>          Issue Type: New Feature
>          Components: tapestry-core
>    Affects Versions: 5.2.4
>            Reporter: Howard M. Lewis Ship
>            Assignee: Dan Adams
>            Priority: Minor
>             Fix For: 5.2.5
>
>
> In complex pages, it can be hard to work backwards from a bit of output HTML 
> in the browser, back to the component that originated the markup.
> This feature adds rendering of comments that provide trace output of which 
> component is currently currently:
> <!--BEGIN Index:loop (context:Index.tml, line 15)--><li>
>       <!--BEGIN Index:pagelink (context:Index.tml, line 16)--><a 
> href="/abstractcomponentdemo">Abstract Component Demo</a><!--END 
> Index:pagelink-->
> Note that the BEGIN comment includes both the complete component id in the 
> page and the location of that in the template. With just the component id it 
> can still be unclear which component is being referenced without the line 
> number.
> For security purposes, this feature cannot be enabled in production mode. In 
> non-production mode it can be enabled two ways:
>  - Setting the symbol "tapestry.component-render-tracing-enabled" to "true" 
> (default: false)
>  - Setting the request query parameter "t:component-trace" on the URL to 
> "true". This allows enabling for a specific request when you need it in 
> development rather than having it on all the time.
> Note that rendering comments are based on the component lifecycle. Thus in 
> some case where post-render DOM manipulation is performed the markup my not 
> longer be in the correct rendering comments.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to