You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Raul Montes (JIRA)" <ji...@apache.org> on 2009/11/23 23:23:39 UTC

[jira] Created: (TAP5-935) Per-script combining configuration

Per-script combining configuration
----------------------------------

                 Key: TAP5-935
                 URL: https://issues.apache.org/jira/browse/TAP5-935
             Project: Tapestry 5
          Issue Type: Improvement
          Components: tapestry-core
    Affects Versions: 5.1.0.5
            Reporter: Raul Montes


Some libraries (like TinyMCE for example) requires to be loaded from its own script tag because they look into its own src to find out the path of other related resources (like themes, languages, images, etc., in TinyMCE case). But if the initializing script of tinyMCE is combined into the virtual asset, it can't figured out its own path and thus fails to load other required resources.

Because of this problem, I had to disable this great feature, but I think it could be solved if we can set whether a script should be combined or not.

I put TinyMCE as an example because this library made me disable combined scripts, but the same teqnique is also used by many other libraries as well (as the not modified version of scriptaculous itself) or even in cases when dynamic javascript file generation is needed.

Regards.

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


[jira] Commented: (TAP5-935) Per-script combining configuration

Posted by "Raul Montes (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-935?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12781755#action_12781755 ] 

Raul Montes commented on TAP5-935:
----------------------------------

One possible solution could be to just add two extra methods to RenderSupport (and one to DocumentLinker) to receive scripts assets/stringURLs that won't be combined (something like RenderSupport#addUncombinableScript(Asset script) ) and store them on a separate List<String> in DocumentLinker.

I'm not sure of what to do with duplicated scripts across this methods. It should go to just the uncombined list I suppose (because if a combinable script is uncombined, it hurts less than combining an uncombinable script).

> Per-script combining configuration
> ----------------------------------
>
>                 Key: TAP5-935
>                 URL: https://issues.apache.org/jira/browse/TAP5-935
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Raul Montes
>
> Some libraries (like TinyMCE for example) requires to be loaded from its own script tag because they look into its own src to find out the path of other related resources (like themes, languages, images, etc., in TinyMCE case). But if the initializing script of tinyMCE is combined into the virtual asset, it can't figured out its own path and thus fails to load other required resources.
> Because of this problem, I had to disable this great feature, but I think it could be solved if we can set whether a script should be combined or not.
> I put TinyMCE as an example because this library made me disable combined scripts, but the same teqnique is also used by many other libraries as well (as the not modified version of scriptaculous itself) or even in cases when dynamic javascript file generation is needed.
> Regards.

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


[jira] Closed: (TAP5-935) Per-script combining configuration

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-935?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAP5-935.
-------------------------------------

    Resolution: Invalid

Or, no longer valid.  Tapestry 5.2 now uses explicit configuration to define "stacks" of related JavaScript that may be assembled into a single virtual asset.  Other JavaScript libraries will be loaded individually, using their own <script> tags, which should keep TinyMCE and friends happy.

> Per-script combining configuration
> ----------------------------------
>
>                 Key: TAP5-935
>                 URL: https://issues.apache.org/jira/browse/TAP5-935
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Raul Montes
>
> Some libraries (like TinyMCE for example) requires to be loaded from its own script tag because they look into its own src to find out the path of other related resources (like themes, languages, images, etc., in TinyMCE case). But if the initializing script of tinyMCE is combined into the virtual asset, it can't figured out its own path and thus fails to load other required resources.
> Because of this problem, I had to disable this great feature, but I think it could be solved if we can set whether a script should be combined or not.
> I put TinyMCE as an example because this library made me disable combined scripts, but the same teqnique is also used by many other libraries as well (as the not modified version of scriptaculous itself) or even in cases when dynamic javascript file generation is needed.
> Regards.

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


[jira] Commented: (TAP5-935) Per-script combining configuration

Posted by "Raul Montes (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-935?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12781755#action_12781755 ] 

Raul Montes commented on TAP5-935:
----------------------------------

One possible solution could be to just add two extra methods to RenderSupport (and one to DocumentLinker) to receive scripts assets/stringURLs that won't be combined (something like RenderSupport#addUncombinableScript(Asset script) ) and store them on a separate List<String> in DocumentLinker.

I'm not sure of what to do with duplicated scripts across this methods. It should go to just the uncombined list I suppose (because if a combinable script is uncombined, it hurts less than combining an uncombinable script).

> Per-script combining configuration
> ----------------------------------
>
>                 Key: TAP5-935
>                 URL: https://issues.apache.org/jira/browse/TAP5-935
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Raul Montes
>
> Some libraries (like TinyMCE for example) requires to be loaded from its own script tag because they look into its own src to find out the path of other related resources (like themes, languages, images, etc., in TinyMCE case). But if the initializing script of tinyMCE is combined into the virtual asset, it can't figured out its own path and thus fails to load other required resources.
> Because of this problem, I had to disable this great feature, but I think it could be solved if we can set whether a script should be combined or not.
> I put TinyMCE as an example because this library made me disable combined scripts, but the same teqnique is also used by many other libraries as well (as the not modified version of scriptaculous itself) or even in cases when dynamic javascript file generation is needed.
> Regards.

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


[jira] Closed: (TAP5-935) Per-script combining configuration

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-935?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAP5-935.
-------------------------------------

    Resolution: Invalid

Or, no longer valid.  Tapestry 5.2 now uses explicit configuration to define "stacks" of related JavaScript that may be assembled into a single virtual asset.  Other JavaScript libraries will be loaded individually, using their own <script> tags, which should keep TinyMCE and friends happy.

> Per-script combining configuration
> ----------------------------------
>
>                 Key: TAP5-935
>                 URL: https://issues.apache.org/jira/browse/TAP5-935
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Raul Montes
>
> Some libraries (like TinyMCE for example) requires to be loaded from its own script tag because they look into its own src to find out the path of other related resources (like themes, languages, images, etc., in TinyMCE case). But if the initializing script of tinyMCE is combined into the virtual asset, it can't figured out its own path and thus fails to load other required resources.
> Because of this problem, I had to disable this great feature, but I think it could be solved if we can set whether a script should be combined or not.
> I put TinyMCE as an example because this library made me disable combined scripts, but the same teqnique is also used by many other libraries as well (as the not modified version of scriptaculous itself) or even in cases when dynamic javascript file generation is needed.
> Regards.

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