You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by Mike Pawlowski <mp...@ca.ibm.com> on 2013/08/16 18:27:34 UTC

Shindig preference template feature problem & questions


Hi,

I'm experiencing an issue with the preference templating feature in Shindig
and have a few questions regarding it.

Environment

* Shindig 2.5.0 (final) - Java version
* Using common container (osapi.container)
* Cross-domain deployment
   => i.e. OpenSocial gadget containers hosted from one domain and the
OpenSocial gadget renderer hosted from another domain
   => e.g.
         - Examples application (OS gadget container):
http://localhost:9081/examples/gadgets
         - Shindig application (OS gadget renderer):
http://localhost:9082/rpc, http://localhost:9082/gadgets/ifr, etc.
   => Got working via minor Shindig modification & CORS Java servlet
filters
         - See issue for more details:
https://issues.apache.org/jira/browse/SHINDIG-1927

Problem

Several external 3rd-party gadgets fail to render properly using the common
container (don't think it was an issue for
the deprecated shindig.container in the above environment using Shindig
2.5.0 Beta 6)
e.g.
(1) The Daily Puppy - http://dailypuppy.com/gmod/thedailypuppy.xml
(2) NYTimes.com Top Stories -
http://widgets.nytimes.com/packages/html/igoogle/topstories.xml
(3) YouTube: http://www.gstatic.com/ig/modules/youtube/v3/youtube.xml
(4) Hamster:
http://hosting.gmodules.com/ig/gadgets/file/112581010116074801021/hamster.xml

These gadgets are used as part of our sanity test suites.

See issue for more details
https://issues.apache.org/jira/browse/SHINDIG-1926

Solution (Verified)

Disable preference templating feature by adding
shindig.urlgen.use-templates-default=false to shindig.properties and
rebuilding Shindig
(Recommended by Ryan). By default the common container uses templates for
preferences.

Questions

(1) Is there any documentation on the preference templating feature
describing it's usage & behaviour?
      => e.g. Wiki documents, API doc, specification references, etc.

(2) Are there any third-party (external) gadgets or sample (internal)
gadgets that make use of the "templates" feature?
     => i.e. Examples demonstrating how to use this feature

(3) Will disabling the shindig.urlgen.use-templates-default option
adversely affect the rendering of other gadgets using the common container?

(4) Should Shindig be built by default with the preference templating
feature disabled (i.e. "shindig.urlgen.use-templates-default=false")?
     => e.g. Since, it causes regressions in a number of external 3rd-party
gadgets
     => I'm not sure what the commonality is between these gadgets that
causes rendering issues


Thanks,

Mike

Re: Shindig preference template feature problem & questions

Posted by Stanton Sievers <si...@gmail.com>.
I don't think this is a regression.  Mike, this worked in the old
shindig.container thought, right?

I don't recall why the default is to use templating.  Maybe that should
change.  Templating by default is only useful if the container is able to
replace the templated values, which in the default configuration is not the
case.


On Fri, Aug 16, 2013 at 2:54 PM, Henry Saputra <he...@gmail.com>wrote:

> Hi Mike, so looks like this is regression from 2.5.0 beta6 release?
>
> - Henry
>
>
> On Fri, Aug 16, 2013 at 9:27 AM, Mike Pawlowski <mp...@ca.ibm.com>
> wrote:
>
> >
> >
> > Hi,
> >
> > I'm experiencing an issue with the preference templating feature in
> Shindig
> > and have a few questions regarding it.
> >
> > Environment
> >
> > * Shindig 2.5.0 (final) - Java version
> > * Using common container (osapi.container)
> > * Cross-domain deployment
> >    => i.e. OpenSocial gadget containers hosted from one domain and the
> > OpenSocial gadget renderer hosted from another domain
> >    => e.g.
> >          - Examples application (OS gadget container):
> > http://localhost:9081/examples/gadgets
> >          - Shindig application (OS gadget renderer):
> > http://localhost:9082/rpc, http://localhost:9082/gadgets/ifr, etc.
> >    => Got working via minor Shindig modification & CORS Java servlet
> > filters
> >          - See issue for more details:
> > https://issues.apache.org/jira/browse/SHINDIG-1927
> >
> > Problem
> >
> > Several external 3rd-party gadgets fail to render properly using the
> common
> > container (don't think it was an issue for
> > the deprecated shindig.container in the above environment using Shindig
> > 2.5.0 Beta 6)
> > e.g.
> > (1) The Daily Puppy - http://dailypuppy.com/gmod/thedailypuppy.xml
> > (2) NYTimes.com Top Stories -
> > http://widgets.nytimes.com/packages/html/igoogle/topstories.xml
> > (3) YouTube: http://www.gstatic.com/ig/modules/youtube/v3/youtube.xml
> > (4) Hamster:
> >
> >
> http://hosting.gmodules.com/ig/gadgets/file/112581010116074801021/hamster.xml
> >
> > These gadgets are used as part of our sanity test suites.
> >
> > See issue for more details
> > https://issues.apache.org/jira/browse/SHINDIG-1926
> >
> > Solution (Verified)
> >
> > Disable preference templating feature by adding
> > shindig.urlgen.use-templates-default=false to shindig.properties and
> > rebuilding Shindig
> > (Recommended by Ryan). By default the common container uses templates for
> > preferences.
> >
> > Questions
> >
> > (1) Is there any documentation on the preference templating feature
> > describing it's usage & behaviour?
> >       => e.g. Wiki documents, API doc, specification references, etc.
> >
> > (2) Are there any third-party (external) gadgets or sample (internal)
> > gadgets that make use of the "templates" feature?
> >      => i.e. Examples demonstrating how to use this feature
> >
> > (3) Will disabling the shindig.urlgen.use-templates-default option
> > adversely affect the rendering of other gadgets using the common
> container?
> >
> > (4) Should Shindig be built by default with the preference templating
> > feature disabled (i.e. "shindig.urlgen.use-templates-default=false")?
> >      => e.g. Since, it causes regressions in a number of external
> 3rd-party
> > gadgets
> >      => I'm not sure what the commonality is between these gadgets that
> > causes rendering issues
> >
> >
> > Thanks,
> >
> > Mike
> >
>

Re: Problem with CSS3

Posted by Ryan Baxter <rb...@gmail.com>.
You can actually do this from the gadget [1].  The exclude URLs
property will exclude certain URLs from being rewritten.
[1] http://opensocial.github.io/spec/2.5/Core-Gadget.xml#rfc.section.5

On Wed, Aug 21, 2013 at 11:12 AM, Evgeny Bogdanov
<ev...@epfl.ch> wrote:
> Ryan,
>
> Which one should I disable? (shindig.properties)
> I m not sure which one relates to CSS.
>
> # TODO: This needs to be moved to container configuration.
> shindig.content-rewrite.only-allow-excludes=false
> shindig.content-rewrite.include-urls=.*
> shindig.content-rewrite.exclude-urls=
> shindig.content-rewrite.include-tags=body,embed,img,input,link,script,style
> shindig.content-rewrite.expires=86400
> shindig.content-rewrite.enable-split-js-concat=true
> shindig.content-rewrite.enable-single-resource-concat=false
>
>
> On 21.08.13 02:25, Ryan Baxter wrote:
>>
>> If you disable content rewriting does the problem go away?
>>
>> On Tue, Aug 20, 2013 at 9:39 AM, Evgeny Bogdanov
>> <ev...@epfl.ch> wrote:
>>>
>>> Via a link:
>>>          <link rel="stylesheet" type="text/css"
>>> href="../../../../../libs/font-awesome/less/font-awesome.css">
>>>
>>> This is the widget:
>>>
>>> http://go-lab.gw.utwente.nl/sources/tools/hypothesis/src/main/webapp/hypothesis0.7_buoyancy.xml
>>>
>>> and this is what we get when the widget is rendered:
>>> <link
>>>
>>> href="//shindig.epfl.ch:80/gadgets/concat?container=default&amp;gadget=http%3A%2F%2Fgo-lab.gw.utwente.nl%2Fsources%2Ftools%2Fhypothesis%2Fsrc%2Fmain%2Fwebapp%2Fhypothesis0.7_buoyancy.xml&amp;debug=0&amp;nocache=1&amp;type=css&amp;1=http%3A%2F%2Fgo-lab.gw.utwente.nl%2Fsources%2Ftools%2Fhypothesis%2Fsrc%2Fmain%2Fwebapp%2Fcss%2Fhypothesis0.7.css&amp;2=http%3A%2F%2Fgo-lab.gw.utwente.nl%2Fsources%2Flibs%2Fbootstrap%2Fcss%2Fbootstrap.min.css&amp;3=http%3A%2F%2Fgo-lab.gw.utwente.nl%2Fsources%2Flibs%2Ffont-awesome%2Fless%2Ffont-awesome.css"
>>> rel="stylesheet" type="text/css">
>>>
>>>
>>> On 20.08.13 15:28, Stanton Sievers wrote:
>>>>
>>>> Hi Evgeny,
>>>>
>>>> How are you including the CSS in your gadget? Is it a style type link or
>>>> is
>>>> it internal? If a link, is your link being rewritten through the shindig
>>>> proxy at runtime?
>>>>
>>>> Thanks,
>>>> -Stanton
>>>> On Aug 20, 2013 8:36 AM, "Evgeny Bogdanov" <ev...@epfl.ch>
>>>> wrote:
>>>>
>>>>> Hi
>>>>>
>>>>> we have some problems with the CSS3 in our widgets on Shindig-2.5.0.
>>>>> For example, we use the following code in CSS files:
>>>>>
>>>>> /* FONT AWESOME CORE
>>>>>    * -------------------------- */
>>>>> [class^="icon-"],
>>>>> [class*=" icon-"] {
>>>>>     font-family: FontAwesome;
>>>>>     font-weight: normal;
>>>>>     font-style: normal;
>>>>>     text-decoration: inherit;
>>>>>     -webkit-font-smoothing: antialiased;
>>>>>     *margin-right: .3em;
>>>>> }
>>>>> [class^="icon-"]:before,
>>>>> [class*=" icon-"]:before {
>>>>>     text-decoration: inherit;
>>>>>     display: inline-block;
>>>>>     speak: none;
>>>>> }
>>>>>
>>>>> However, these lines are removed by shindig from css files that gadget
>>>>> uses.
>>>>> How can I tell shindig not to remove them?
>>>>>
>>>>> Thank you in advance,
>>>>> Evgeny
>>>>>
>>
>

Re: Problem with CSS3

Posted by Evgeny Bogdanov <ev...@epfl.ch>.
Ryan,

Which one should I disable? (shindig.properties)
I m not sure which one relates to CSS.

# TODO: This needs to be moved to container configuration.
shindig.content-rewrite.only-allow-excludes=false
shindig.content-rewrite.include-urls=.*
shindig.content-rewrite.exclude-urls=
shindig.content-rewrite.include-tags=body,embed,img,input,link,script,style
shindig.content-rewrite.expires=86400
shindig.content-rewrite.enable-split-js-concat=true
shindig.content-rewrite.enable-single-resource-concat=false

On 21.08.13 02:25, Ryan Baxter wrote:
> If you disable content rewriting does the problem go away?
>
> On Tue, Aug 20, 2013 at 9:39 AM, Evgeny Bogdanov
> <ev...@epfl.ch> wrote:
>> Via a link:
>>          <link rel="stylesheet" type="text/css"
>> href="../../../../../libs/font-awesome/less/font-awesome.css">
>>
>> This is the widget:
>> http://go-lab.gw.utwente.nl/sources/tools/hypothesis/src/main/webapp/hypothesis0.7_buoyancy.xml
>>
>> and this is what we get when the widget is rendered:
>> <link
>> href="//shindig.epfl.ch:80/gadgets/concat?container=default&amp;gadget=http%3A%2F%2Fgo-lab.gw.utwente.nl%2Fsources%2Ftools%2Fhypothesis%2Fsrc%2Fmain%2Fwebapp%2Fhypothesis0.7_buoyancy.xml&amp;debug=0&amp;nocache=1&amp;type=css&amp;1=http%3A%2F%2Fgo-lab.gw.utwente.nl%2Fsources%2Ftools%2Fhypothesis%2Fsrc%2Fmain%2Fwebapp%2Fcss%2Fhypothesis0.7.css&amp;2=http%3A%2F%2Fgo-lab.gw.utwente.nl%2Fsources%2Flibs%2Fbootstrap%2Fcss%2Fbootstrap.min.css&amp;3=http%3A%2F%2Fgo-lab.gw.utwente.nl%2Fsources%2Flibs%2Ffont-awesome%2Fless%2Ffont-awesome.css"
>> rel="stylesheet" type="text/css">
>>
>>
>> On 20.08.13 15:28, Stanton Sievers wrote:
>>> Hi Evgeny,
>>>
>>> How are you including the CSS in your gadget? Is it a style type link or
>>> is
>>> it internal? If a link, is your link being rewritten through the shindig
>>> proxy at runtime?
>>>
>>> Thanks,
>>> -Stanton
>>> On Aug 20, 2013 8:36 AM, "Evgeny Bogdanov" <ev...@epfl.ch>
>>> wrote:
>>>
>>>> Hi
>>>>
>>>> we have some problems with the CSS3 in our widgets on Shindig-2.5.0.
>>>> For example, we use the following code in CSS files:
>>>>
>>>> /* FONT AWESOME CORE
>>>>    * -------------------------- */
>>>> [class^="icon-"],
>>>> [class*=" icon-"] {
>>>>     font-family: FontAwesome;
>>>>     font-weight: normal;
>>>>     font-style: normal;
>>>>     text-decoration: inherit;
>>>>     -webkit-font-smoothing: antialiased;
>>>>     *margin-right: .3em;
>>>> }
>>>> [class^="icon-"]:before,
>>>> [class*=" icon-"]:before {
>>>>     text-decoration: inherit;
>>>>     display: inline-block;
>>>>     speak: none;
>>>> }
>>>>
>>>> However, these lines are removed by shindig from css files that gadget
>>>> uses.
>>>> How can I tell shindig not to remove them?
>>>>
>>>> Thank you in advance,
>>>> Evgeny
>>>>
>


Re: Problem with CSS3

Posted by Ryan Baxter <rb...@apache.org>.
If you disable content rewriting does the problem go away?

On Tue, Aug 20, 2013 at 9:39 AM, Evgeny Bogdanov
<ev...@epfl.ch> wrote:
> Via a link:
>         <link rel="stylesheet" type="text/css"
> href="../../../../../libs/font-awesome/less/font-awesome.css">
>
> This is the widget:
> http://go-lab.gw.utwente.nl/sources/tools/hypothesis/src/main/webapp/hypothesis0.7_buoyancy.xml
>
> and this is what we get when the widget is rendered:
> <link
> href="//shindig.epfl.ch:80/gadgets/concat?container=default&amp;gadget=http%3A%2F%2Fgo-lab.gw.utwente.nl%2Fsources%2Ftools%2Fhypothesis%2Fsrc%2Fmain%2Fwebapp%2Fhypothesis0.7_buoyancy.xml&amp;debug=0&amp;nocache=1&amp;type=css&amp;1=http%3A%2F%2Fgo-lab.gw.utwente.nl%2Fsources%2Ftools%2Fhypothesis%2Fsrc%2Fmain%2Fwebapp%2Fcss%2Fhypothesis0.7.css&amp;2=http%3A%2F%2Fgo-lab.gw.utwente.nl%2Fsources%2Flibs%2Fbootstrap%2Fcss%2Fbootstrap.min.css&amp;3=http%3A%2F%2Fgo-lab.gw.utwente.nl%2Fsources%2Flibs%2Ffont-awesome%2Fless%2Ffont-awesome.css"
> rel="stylesheet" type="text/css">
>
>
> On 20.08.13 15:28, Stanton Sievers wrote:
>>
>> Hi Evgeny,
>>
>> How are you including the CSS in your gadget? Is it a style type link or
>> is
>> it internal? If a link, is your link being rewritten through the shindig
>> proxy at runtime?
>>
>> Thanks,
>> -Stanton
>> On Aug 20, 2013 8:36 AM, "Evgeny Bogdanov" <ev...@epfl.ch>
>> wrote:
>>
>>> Hi
>>>
>>> we have some problems with the CSS3 in our widgets on Shindig-2.5.0.
>>> For example, we use the following code in CSS files:
>>>
>>> /* FONT AWESOME CORE
>>>   * -------------------------- */
>>> [class^="icon-"],
>>> [class*=" icon-"] {
>>>    font-family: FontAwesome;
>>>    font-weight: normal;
>>>    font-style: normal;
>>>    text-decoration: inherit;
>>>    -webkit-font-smoothing: antialiased;
>>>    *margin-right: .3em;
>>> }
>>> [class^="icon-"]:before,
>>> [class*=" icon-"]:before {
>>>    text-decoration: inherit;
>>>    display: inline-block;
>>>    speak: none;
>>> }
>>>
>>> However, these lines are removed by shindig from css files that gadget
>>> uses.
>>> How can I tell shindig not to remove them?
>>>
>>> Thank you in advance,
>>> Evgeny
>>>
>

Re: Problem with CSS3

Posted by Evgeny Bogdanov <ev...@epfl.ch>.
Via a link:
         <link rel="stylesheet" type="text/css" 
href="../../../../../libs/font-awesome/less/font-awesome.css">

This is the widget:
http://go-lab.gw.utwente.nl/sources/tools/hypothesis/src/main/webapp/hypothesis0.7_buoyancy.xml

and this is what we get when the widget is rendered:
<link 
href="//shindig.epfl.ch:80/gadgets/concat?container=default&amp;gadget=http%3A%2F%2Fgo-lab.gw.utwente.nl%2Fsources%2Ftools%2Fhypothesis%2Fsrc%2Fmain%2Fwebapp%2Fhypothesis0.7_buoyancy.xml&amp;debug=0&amp;nocache=1&amp;type=css&amp;1=http%3A%2F%2Fgo-lab.gw.utwente.nl%2Fsources%2Ftools%2Fhypothesis%2Fsrc%2Fmain%2Fwebapp%2Fcss%2Fhypothesis0.7.css&amp;2=http%3A%2F%2Fgo-lab.gw.utwente.nl%2Fsources%2Flibs%2Fbootstrap%2Fcss%2Fbootstrap.min.css&amp;3=http%3A%2F%2Fgo-lab.gw.utwente.nl%2Fsources%2Flibs%2Ffont-awesome%2Fless%2Ffont-awesome.css" 
rel="stylesheet" type="text/css">

On 20.08.13 15:28, Stanton Sievers wrote:
> Hi Evgeny,
>
> How are you including the CSS in your gadget? Is it a style type link or is
> it internal? If a link, is your link being rewritten through the shindig
> proxy at runtime?
>
> Thanks,
> -Stanton
> On Aug 20, 2013 8:36 AM, "Evgeny Bogdanov" <ev...@epfl.ch> wrote:
>
>> Hi
>>
>> we have some problems with the CSS3 in our widgets on Shindig-2.5.0.
>> For example, we use the following code in CSS files:
>>
>> /* FONT AWESOME CORE
>>   * -------------------------- */
>> [class^="icon-"],
>> [class*=" icon-"] {
>>    font-family: FontAwesome;
>>    font-weight: normal;
>>    font-style: normal;
>>    text-decoration: inherit;
>>    -webkit-font-smoothing: antialiased;
>>    *margin-right: .3em;
>> }
>> [class^="icon-"]:before,
>> [class*=" icon-"]:before {
>>    text-decoration: inherit;
>>    display: inline-block;
>>    speak: none;
>> }
>>
>> However, these lines are removed by shindig from css files that gadget
>> uses.
>> How can I tell shindig not to remove them?
>>
>> Thank you in advance,
>> Evgeny
>>


Re: Problem with CSS3

Posted by Stanton Sievers <ss...@apache.org>.
Hi Evgeny,

How are you including the CSS in your gadget? Is it a style type link or is
it internal? If a link, is your link being rewritten through the shindig
proxy at runtime?

Thanks,
-Stanton
On Aug 20, 2013 8:36 AM, "Evgeny Bogdanov" <ev...@epfl.ch> wrote:

> Hi
>
> we have some problems with the CSS3 in our widgets on Shindig-2.5.0.
> For example, we use the following code in CSS files:
>
> /* FONT AWESOME CORE
>  * -------------------------- */
> [class^="icon-"],
> [class*=" icon-"] {
>   font-family: FontAwesome;
>   font-weight: normal;
>   font-style: normal;
>   text-decoration: inherit;
>   -webkit-font-smoothing: antialiased;
>   *margin-right: .3em;
> }
> [class^="icon-"]:before,
> [class*=" icon-"]:before {
>   text-decoration: inherit;
>   display: inline-block;
>   speak: none;
> }
>
> However, these lines are removed by shindig from css files that gadget
> uses.
> How can I tell shindig not to remove them?
>
> Thank you in advance,
> Evgeny
>

Problem with CSS3

Posted by Evgeny Bogdanov <ev...@epfl.ch>.
Hi

we have some problems with the CSS3 in our widgets on Shindig-2.5.0.
For example, we use the following code in CSS files:

/* FONT AWESOME CORE
  * -------------------------- */
[class^="icon-"],
[class*=" icon-"] {
   font-family: FontAwesome;
   font-weight: normal;
   font-style: normal;
   text-decoration: inherit;
   -webkit-font-smoothing: antialiased;
   *margin-right: .3em;
}
[class^="icon-"]:before,
[class*=" icon-"]:before {
   text-decoration: inherit;
   display: inline-block;
   speak: none;
}

However, these lines are removed by shindig from css files that gadget uses.
How can I tell shindig not to remove them?

Thank you in advance,
Evgeny

Re: Shindig preference template feature problem & questions

Posted by Henry Saputra <he...@gmail.com>.
Hi Mike, so looks like this is regression from 2.5.0 beta6 release?

- Henry


On Fri, Aug 16, 2013 at 9:27 AM, Mike Pawlowski <mp...@ca.ibm.com> wrote:

>
>
> Hi,
>
> I'm experiencing an issue with the preference templating feature in Shindig
> and have a few questions regarding it.
>
> Environment
>
> * Shindig 2.5.0 (final) - Java version
> * Using common container (osapi.container)
> * Cross-domain deployment
>    => i.e. OpenSocial gadget containers hosted from one domain and the
> OpenSocial gadget renderer hosted from another domain
>    => e.g.
>          - Examples application (OS gadget container):
> http://localhost:9081/examples/gadgets
>          - Shindig application (OS gadget renderer):
> http://localhost:9082/rpc, http://localhost:9082/gadgets/ifr, etc.
>    => Got working via minor Shindig modification & CORS Java servlet
> filters
>          - See issue for more details:
> https://issues.apache.org/jira/browse/SHINDIG-1927
>
> Problem
>
> Several external 3rd-party gadgets fail to render properly using the common
> container (don't think it was an issue for
> the deprecated shindig.container in the above environment using Shindig
> 2.5.0 Beta 6)
> e.g.
> (1) The Daily Puppy - http://dailypuppy.com/gmod/thedailypuppy.xml
> (2) NYTimes.com Top Stories -
> http://widgets.nytimes.com/packages/html/igoogle/topstories.xml
> (3) YouTube: http://www.gstatic.com/ig/modules/youtube/v3/youtube.xml
> (4) Hamster:
>
> http://hosting.gmodules.com/ig/gadgets/file/112581010116074801021/hamster.xml
>
> These gadgets are used as part of our sanity test suites.
>
> See issue for more details
> https://issues.apache.org/jira/browse/SHINDIG-1926
>
> Solution (Verified)
>
> Disable preference templating feature by adding
> shindig.urlgen.use-templates-default=false to shindig.properties and
> rebuilding Shindig
> (Recommended by Ryan). By default the common container uses templates for
> preferences.
>
> Questions
>
> (1) Is there any documentation on the preference templating feature
> describing it's usage & behaviour?
>       => e.g. Wiki documents, API doc, specification references, etc.
>
> (2) Are there any third-party (external) gadgets or sample (internal)
> gadgets that make use of the "templates" feature?
>      => i.e. Examples demonstrating how to use this feature
>
> (3) Will disabling the shindig.urlgen.use-templates-default option
> adversely affect the rendering of other gadgets using the common container?
>
> (4) Should Shindig be built by default with the preference templating
> feature disabled (i.e. "shindig.urlgen.use-templates-default=false")?
>      => e.g. Since, it causes regressions in a number of external 3rd-party
> gadgets
>      => I'm not sure what the commonality is between these gadgets that
> causes rendering issues
>
>
> Thanks,
>
> Mike
>