[xwiki-devs] [Proposal] Modification of URL format for the webjars type
Hi devs, Seems I forgot a use case when introducing the new webjars URL format in http://jira.xwiki.org/browse/XWIKI-10881 and we need to add the wiki somewhere in the URL to serve some webjar resource located in a different subwiki (this is http://jira.xwiki.org/browse/XWIKI-12884). I’m proposing this updated wrbjars URL format (updated from http://extensions.xwiki.org/xwiki/bin/view/Extension/WebJars+Integration#HUR...): http://<server>/<context path>/webjars/<path/to/resource>[?version=<version>&evaluate=true|false&wiki=<wiki name>] Specifically I’ve added the optional wiki query string parameter. This means also updating the url() Script Service API to use that new parameter when the resource is not on the current wiki. WDYT? Thanks -Vincent
+1 Thanks, Eduard On Tue, Dec 8, 2015 at 4:34 PM, vincent@massol.net <vincent@massol.net> wrote:
Hi devs,
Seems I forgot a use case when introducing the new webjars URL format in http://jira.xwiki.org/browse/XWIKI-10881 and we need to add the wiki somewhere in the URL to serve some webjar resource located in a different subwiki (this is http://jira.xwiki.org/browse/XWIKI-12884).
I’m proposing this updated wrbjars URL format (updated from http://extensions.xwiki.org/xwiki/bin/view/Extension/WebJars+Integration#HUR... ):
http://<server>/<context path>/webjars/<path/to/resource>[?version=<version>&evaluate=true|false&wiki=<wiki name>]
Specifically I’ve added the optional wiki query string parameter. This means also updating the url() Script Service API to use that new parameter when the resource is not on the current wiki.
WDYT?
Thanks -Vincent
_______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
+1 On Tue, Dec 8, 2015 at 3:34 PM, vincent@massol.net <vincent@massol.net> wrote:
Hi devs,
Seems I forgot a use case when introducing the new webjars URL format in http://jira.xwiki.org/browse/XWIKI-10881 and we need to add the wiki somewhere in the URL to serve some webjar resource located in a different subwiki (this is http://jira.xwiki.org/browse/XWIKI-12884).
I’m proposing this updated wrbjars URL format (updated from http://extensions.xwiki.org/xwiki/bin/view/Extension/WebJars+Integration#HUR...):
http://<server>/<context path>/webjars/<path/to/resource>[?version=<version>&evaluate=true|false&wiki=<wiki name>]
Specifically I’ve added the optional wiki query string parameter. This means also updating the url() Script Service API to use that new parameter when the resource is not on the current wiki.
WDYT?
Thanks -Vincent
_______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
+1 Thanks, Marius On Tue, Dec 8, 2015 at 4:34 PM, vincent@massol.net <vincent@massol.net> wrote:
Hi devs,
Seems I forgot a use case when introducing the new webjars URL format in http://jira.xwiki.org/browse/XWIKI-10881 and we need to add the wiki somewhere in the URL to serve some webjar resource located in a different subwiki (this is http://jira.xwiki.org/browse/XWIKI-12884).
I’m proposing this updated wrbjars URL format (updated from http://extensions.xwiki.org/xwiki/bin/view/Extension/WebJars+Integration#HUR... ):
http://<server>/<context path>/webjars/<path/to/resource>[?version=<version>&evaluate=true|false&wiki=<wiki name>]
Specifically I’ve added the optional wiki query string parameter. This means also updating the url() Script Service API to use that new parameter when the resource is not on the current wiki.
WDYT?
Thanks -Vincent
_______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
Unfortunately I didn't realize that putting the wiki in the query string prevents us from using relative paths in WebJar resource. For instance a CSS file cannot use an image located in the same WebJar using a relative path, if the CSS is loaded from a WebJar installed on a subwiki. We need to find a better solution. On Tue, Dec 8, 2015 at 8:19 PM, Marius Dumitru Florea < mariusdumitru.florea@xwiki.com> wrote:
+1
Thanks, Marius
On Tue, Dec 8, 2015 at 4:34 PM, vincent@massol.net <vincent@massol.net> wrote:
Hi devs,
Seems I forgot a use case when introducing the new webjars URL format in http://jira.xwiki.org/browse/XWIKI-10881 and we need to add the wiki somewhere in the URL to serve some webjar resource located in a different subwiki (this is http://jira.xwiki.org/browse/XWIKI-12884).
I’m proposing this updated wrbjars URL format (updated from http://extensions.xwiki.org/xwiki/bin/view/Extension/WebJars+Integration#HUR... ):
http://<server>/<context path>/webjars/<path/to/resource>[?version=<version>&evaluate=true|false&wiki=<wiki name>]
Specifically I’ve added the optional wiki query string parameter. This means also updating the url() Script Service API to use that new parameter when the resource is not on the current wiki.
WDYT?
Thanks -Vincent
_______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
Yes we introduced a regression since the main issue that leaded to move webjar support to its dedicated resource handler was relative path. On Thu, Mar 31, 2016 at 2:44 PM, Marius Dumitru Florea <mariusdumitru.florea@xwiki.com> wrote:
Unfortunately I didn't realize that putting the wiki in the query string prevents us from using relative paths in WebJar resource. For instance a CSS file cannot use an image located in the same WebJar using a relative path, if the CSS is loaded from a WebJar installed on a subwiki. We need to find a better solution.
On Tue, Dec 8, 2015 at 8:19 PM, Marius Dumitru Florea < mariusdumitru.florea@xwiki.com> wrote:
+1
Thanks, Marius
On Tue, Dec 8, 2015 at 4:34 PM, vincent@massol.net <vincent@massol.net> wrote:
Hi devs,
Seems I forgot a use case when introducing the new webjars URL format in http://jira.xwiki.org/browse/XWIKI-10881 and we need to add the wiki somewhere in the URL to serve some webjar resource located in a different subwiki (this is http://jira.xwiki.org/browse/XWIKI-12884).
I’m proposing this updated wrbjars URL format (updated from http://extensions.xwiki.org/xwiki/bin/view/Extension/WebJars+Integration#HUR... ):
http://<server>/<context path>/webjars/<path/to/resource>[?version=<version>&evaluate=true|false&wiki=<wiki name>]
Specifically I’ve added the optional wiki query string parameter. This means also updating the url() Script Service API to use that new parameter when the resource is not on the current wiki.
WDYT?
Thanks -Vincent
_______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
Implemented as part of http://jira.xwiki.org/browse/XWIKI-12884 Thanks -Vincent On 8 Dec 2015 at 15:34:37, vincent@massol.net (vincent@massol.net(mailto:vincent@massol.net)) wrote:
Hi devs,
Seems I forgot a use case when introducing the new webjars URL format in http://jira.xwiki.org/browse/XWIKI-10881 and we need to add the wiki somewhere in the URL to serve some webjar resource located in a different subwiki (this is http://jira.xwiki.org/browse/XWIKI-12884).
I’m proposing this updated wrbjars URL format (updated from http://extensions.xwiki.org/xwiki/bin/view/Extension/WebJars+Integration#HUR...):
http:////webjars/[?version=&evaluate=true|false&wiki=]
Specifically I’ve added the optional wiki query string parameter. This means also updating the url() Script Service API to use that new parameter when the resource is not on the current wiki.
WDYT?
Thanks -Vincent
participants (4)
-
Eduard Moraru -
Marius Dumitru Florea -
Thomas Mortagne -
vincent@massol.net