You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@shindig.apache.org by Darren Bond <db...@globalcad.com> on 2013/10/02 13:46:30 UTC

Auto-Adjust Feature Problem

 Dear All,

Referring to Google's Date & Time gadget as an example, if you click on the 
gadget's 'Settings' link a preferences dialog is displayed. However, the 
lower part of this dialog is cut off and cannot be seen since the gadget 
does not automatically expand to fit the display of this dialog.
http://www.google.com/ig/directory?type=gadgets&url=www.gstatic.com/ig/modul
es/datetime_v3/datetime_v3.xml
www.gstatic.com/ig/modules/datetime_v3/datetime_v3.xml
How can this problem be resolved?

The following test site highlights the issue:-
http://beta.blueg.com/test/personal.htm

Kind regards,

Darren



Re: Auto-Adjust Feature Problem

Posted by Ryan Baxter <rb...@gmail.com>.
To me this is a bug in the gadget not Shindig.  I think it is probably
correct to return a new line, that could be intended for some message
bundles.  If fixing the gadget is not an option than you can look into
doing something on the server to modify the message bundles for the
specific gadget.  It is a little hacky but it is the only solution I
can think of without modifying the gadget.

On Mon, Oct 7, 2013 at 3:36 PM, Darren Bond <db...@globalcad.com> wrote:
> Hi Stanton,
>
>
>
> Thanks. We appear to have found the issue, details as follows:-
>
>
>
> I made experiments with the gadget's copy source code to help myself
> localize the problem and found it is not related to the function which
> adjusts height (it works correctly). The problem is with localization XML
> files and function getString() which obtains gadget settings from
> localization XML files. Localization XML files for this gadget have line
> breaks after opening tag and before closing tag like this:
>
>
>
> <msg name="date_format_pref" desc="Label for choosing the date format">
>
> Date format:
>
> </msg>
>
>
>
> There's a place when function getString() takes parameter from XML file with
> these line breaks included and passes such broken string to another function
> which throws error and script stops working before triggering auto-adjust
> function. When I minimized XML file and got rid of these line breaks
> everything started to work correctly. You can check here (you will probably
> need to refresh pages):
>
>
>
> http://beta.blueg.com/test/personal.htm
>
>
>
> Obviously Google's gadget library and Shindig library have slightly
> different implementations of getString() function so that the gadget works
> on iGoogle and doesn't work on other sites without adding the above fix. Is
> there any workaround you think we can make to the Shindig handling code,
> rather than having to edit the gadget itself?
>
>
>
> Kind regards,
>
>
>
> Darren
>
>
>
>
>
> From: Stanton Sievers [mailto:sieverssj@gmail.com]
> Sent: 03 October 2013 00:28
> To: users@shindig.apache.org; dbond@globalcad.com
> Cc: dev@shindig.apache.org
> Subject: Re: Auto-Adjust Feature Problem
>
>
>
> Hi Darren,
>
> Although the gadget is requiring the "dynamic-height" feature, which is what
> a gadget developer would use to do this, the Google Date & Time gadget
> appears to be using some old means to call adjust height.  Look for
> "_IG_AdjustIFrameHeight" in the gadget and I believe that is the gadget's
> attempt to adjust the iframe height using the "dynamic-height" feature.
>
> A more modern gadget would require the "dynamic-height" feature and use the
> "gadgets.window.adjustHeight()" API to adjust its height.  Better yet, it
> would use the "open-views" feature to open the settings in a new dialog,
> instead of using UI that is contained within the gadget iframe.
>
> If you really wanted to get this working there are some hacks you could try,
> such as defining "_IG_AdjustIFrameHeight" to be the
> "gadgets.window.adjustHeight" function, but I'm not sure how far that would
> really get you.
>
> -Stanton
>
>
>

Re: Auto-Adjust Feature Problem

Posted by Ryan Baxter <rb...@gmail.com>.
To me this is a bug in the gadget not Shindig.  I think it is probably
correct to return a new line, that could be intended for some message
bundles.  If fixing the gadget is not an option than you can look into
doing something on the server to modify the message bundles for the
specific gadget.  It is a little hacky but it is the only solution I
can think of without modifying the gadget.

On Mon, Oct 7, 2013 at 3:36 PM, Darren Bond <db...@globalcad.com> wrote:
> Hi Stanton,
>
>
>
> Thanks. We appear to have found the issue, details as follows:-
>
>
>
> I made experiments with the gadget's copy source code to help myself
> localize the problem and found it is not related to the function which
> adjusts height (it works correctly). The problem is with localization XML
> files and function getString() which obtains gadget settings from
> localization XML files. Localization XML files for this gadget have line
> breaks after opening tag and before closing tag like this:
>
>
>
> <msg name="date_format_pref" desc="Label for choosing the date format">
>
> Date format:
>
> </msg>
>
>
>
> There's a place when function getString() takes parameter from XML file with
> these line breaks included and passes such broken string to another function
> which throws error and script stops working before triggering auto-adjust
> function. When I minimized XML file and got rid of these line breaks
> everything started to work correctly. You can check here (you will probably
> need to refresh pages):
>
>
>
> http://beta.blueg.com/test/personal.htm
>
>
>
> Obviously Google's gadget library and Shindig library have slightly
> different implementations of getString() function so that the gadget works
> on iGoogle and doesn't work on other sites without adding the above fix. Is
> there any workaround you think we can make to the Shindig handling code,
> rather than having to edit the gadget itself?
>
>
>
> Kind regards,
>
>
>
> Darren
>
>
>
>
>
> From: Stanton Sievers [mailto:sieverssj@gmail.com]
> Sent: 03 October 2013 00:28
> To: users@shindig.apache.org; dbond@globalcad.com
> Cc: dev@shindig.apache.org
> Subject: Re: Auto-Adjust Feature Problem
>
>
>
> Hi Darren,
>
> Although the gadget is requiring the "dynamic-height" feature, which is what
> a gadget developer would use to do this, the Google Date & Time gadget
> appears to be using some old means to call adjust height.  Look for
> "_IG_AdjustIFrameHeight" in the gadget and I believe that is the gadget's
> attempt to adjust the iframe height using the "dynamic-height" feature.
>
> A more modern gadget would require the "dynamic-height" feature and use the
> "gadgets.window.adjustHeight()" API to adjust its height.  Better yet, it
> would use the "open-views" feature to open the settings in a new dialog,
> instead of using UI that is contained within the gadget iframe.
>
> If you really wanted to get this working there are some hacks you could try,
> such as defining "_IG_AdjustIFrameHeight" to be the
> "gadgets.window.adjustHeight" function, but I'm not sure how far that would
> really get you.
>
> -Stanton
>
>
>

RE: Auto-Adjust Feature Problem

Posted by Darren Bond <db...@globalcad.com>.
Hi Stanton,

 

Thanks. We appear to have found the issue, details as follows:-

 

I made experiments with the gadget's copy source code to help myself
localize the problem and found it is not related to the function which
adjusts height (it works correctly). The problem is with localization XML
files and function getString() which obtains gadget settings from
localization XML files. Localization XML files for this gadget have line
breaks after opening tag and before closing tag like this:

 

<msg name="date_format_pref" desc="Label for choosing the date format">

Date format:

</msg>

 

There's a place when function getString() takes parameter from XML file with
these line breaks included and passes such broken string to another function
which throws error and script stops working before triggering auto-adjust
function. When I minimized XML file and got rid of these line breaks
everything started to work correctly. You can check here (you will probably
need to refresh pages):

 

http://beta.blueg.com/test/personal.htm

 

Obviously Google's gadget library and Shindig library have slightly
different implementations of getString() function so that the gadget works
on iGoogle and doesn't work on other sites without adding the above fix. Is
there any workaround you think we can make to the Shindig handling code,
rather than having to edit the gadget itself?

 

Kind regards,

 

Darren

 

 

From: Stanton Sievers [mailto:sieverssj@gmail.com] 
Sent: 03 October 2013 00:28
To: users@shindig.apache.org; dbond@globalcad.com
Cc: dev@shindig.apache.org
Subject: Re: Auto-Adjust Feature Problem

 

Hi Darren,

Although the gadget is requiring the "dynamic-height" feature, which is what
a gadget developer would use to do this, the Google Date & Time gadget
appears to be using some old means to call adjust height.  Look for
"_IG_AdjustIFrameHeight" in the gadget and I believe that is the gadget's
attempt to adjust the iframe height using the "dynamic-height" feature.

A more modern gadget would require the "dynamic-height" feature and use the
"gadgets.window.adjustHeight()" API to adjust its height.  Better yet, it
would use the "open-views" feature to open the settings in a new dialog,
instead of using UI that is contained within the gadget iframe.

If you really wanted to get this working there are some hacks you could try,
such as defining "_IG_AdjustIFrameHeight" to be the
"gadgets.window.adjustHeight" function, but I'm not sure how far that would
really get you.

-Stanton

 


RE: Auto-Adjust Feature Problem

Posted by Darren Bond <db...@globalcad.com>.
Hi Stanton,

 

Thanks. We appear to have found the issue, details as follows:-

 

I made experiments with the gadget's copy source code to help myself
localize the problem and found it is not related to the function which
adjusts height (it works correctly). The problem is with localization XML
files and function getString() which obtains gadget settings from
localization XML files. Localization XML files for this gadget have line
breaks after opening tag and before closing tag like this:

 

<msg name="date_format_pref" desc="Label for choosing the date format">

Date format:

</msg>

 

There's a place when function getString() takes parameter from XML file with
these line breaks included and passes such broken string to another function
which throws error and script stops working before triggering auto-adjust
function. When I minimized XML file and got rid of these line breaks
everything started to work correctly. You can check here (you will probably
need to refresh pages):

 

http://beta.blueg.com/test/personal.htm

 

Obviously Google's gadget library and Shindig library have slightly
different implementations of getString() function so that the gadget works
on iGoogle and doesn't work on other sites without adding the above fix. Is
there any workaround you think we can make to the Shindig handling code,
rather than having to edit the gadget itself?

 

Kind regards,

 

Darren

 

 

From: Stanton Sievers [mailto:sieverssj@gmail.com] 
Sent: 03 October 2013 00:28
To: users@shindig.apache.org; dbond@globalcad.com
Cc: dev@shindig.apache.org
Subject: Re: Auto-Adjust Feature Problem

 

Hi Darren,

Although the gadget is requiring the "dynamic-height" feature, which is what
a gadget developer would use to do this, the Google Date & Time gadget
appears to be using some old means to call adjust height.  Look for
"_IG_AdjustIFrameHeight" in the gadget and I believe that is the gadget's
attempt to adjust the iframe height using the "dynamic-height" feature.

A more modern gadget would require the "dynamic-height" feature and use the
"gadgets.window.adjustHeight()" API to adjust its height.  Better yet, it
would use the "open-views" feature to open the settings in a new dialog,
instead of using UI that is contained within the gadget iframe.

If you really wanted to get this working there are some hacks you could try,
such as defining "_IG_AdjustIFrameHeight" to be the
"gadgets.window.adjustHeight" function, but I'm not sure how far that would
really get you.

-Stanton

 


Re: Auto-Adjust Feature Problem

Posted by Stanton Sievers <si...@gmail.com>.
Hi Darren,

Although the gadget is requiring the "dynamic-height" feature, which is
what a gadget developer would use to do this, the Google Date & Time gadget
appears to be using some old means to call adjust height.  Look for
"_IG_AdjustIFrameHeight"
in the gadget and I believe that is the gadget's attempt to adjust the
iframe height using the "dynamic-height" feature.

A more modern gadget would require the "dynamic-height" feature and use the
"gadgets.window.adjustHeight()" API to adjust its height.  Better yet, it
would use the "open-views" feature to open the settings in a new dialog,
instead of using UI that is contained within the gadget iframe.

If you really wanted to get this working there are some hacks you could
try, such as defining "_IG_AdjustIFrameHeight" to be the
"gadgets.window.adjustHeight" function, but I'm not sure how far that would
really get you.

-Stanton



On Wed, Oct 2, 2013 at 7:46 AM, Darren Bond <db...@globalcad.com> wrote:

>  Dear All,
>
> Referring to Google's Date & Time gadget as an example, if you click on the
> gadget's 'Settings' link a preferences dialog is displayed. However, the
> lower part of this dialog is cut off and cannot be seen since the gadget
> does not automatically expand to fit the display of this dialog.
>
> http://www.google.com/ig/directory?type=gadgets&url=www.gstatic.com/ig/modul
> es/datetime_v3/datetime_v3.xml
> www.gstatic.com/ig/modules/datetime_v3/datetime_v3.xml
> How can this problem be resolved?
>
> The following test site highlights the issue:-
> http://beta.blueg.com/test/personal.htm
>
> Kind regards,
>
> Darren
>
>
>

Re: Auto-Adjust Feature Problem

Posted by Stanton Sievers <si...@gmail.com>.
Hi Darren,

Although the gadget is requiring the "dynamic-height" feature, which is
what a gadget developer would use to do this, the Google Date & Time gadget
appears to be using some old means to call adjust height.  Look for
"_IG_AdjustIFrameHeight"
in the gadget and I believe that is the gadget's attempt to adjust the
iframe height using the "dynamic-height" feature.

A more modern gadget would require the "dynamic-height" feature and use the
"gadgets.window.adjustHeight()" API to adjust its height.  Better yet, it
would use the "open-views" feature to open the settings in a new dialog,
instead of using UI that is contained within the gadget iframe.

If you really wanted to get this working there are some hacks you could
try, such as defining "_IG_AdjustIFrameHeight" to be the
"gadgets.window.adjustHeight" function, but I'm not sure how far that would
really get you.

-Stanton



On Wed, Oct 2, 2013 at 7:46 AM, Darren Bond <db...@globalcad.com> wrote:

>  Dear All,
>
> Referring to Google's Date & Time gadget as an example, if you click on the
> gadget's 'Settings' link a preferences dialog is displayed. However, the
> lower part of this dialog is cut off and cannot be seen since the gadget
> does not automatically expand to fit the display of this dialog.
>
> http://www.google.com/ig/directory?type=gadgets&url=www.gstatic.com/ig/modul
> es/datetime_v3/datetime_v3.xml
> www.gstatic.com/ig/modules/datetime_v3/datetime_v3.xml
> How can this problem be resolved?
>
> The following test site highlights the issue:-
> http://beta.blueg.com/test/personal.htm
>
> Kind regards,
>
> Darren
>
>
>