>-----Original Message----- >From: Jasha Joachimsthal [mailto:[email protected]] >Sent: Friday, March 23, 2012 8:16 AM >To: [email protected] >Subject: Re: iframe height of opensocial gadgets > >@Matt: dynamic height is supported in native gadgets, but Dennis is >creating an iframe gadget where the iframe inside the gadget needs the full >height.
Not sure what you mean by full height. Maybe I am missing something but it sounds like the gadgets have a height attribute that is not currently being respected by rave, which is overriding it with 250px. We do want to support letting the gadget define a default height other than 250px. -Matt > > >On 23 March 2012 12:49, Franklin, Matthew B. <[email protected]> wrote: > >> >-----Original Message----- >> >From: Dennis van der Laan [mailto:[email protected]] >> >Sent: Friday, March 23, 2012 6:43 AM >> >To: [email protected] >> >Subject: Re: iframe height of opensocial gadgets >> > >> >Hi Jasha, >> > >> >On 23-3-2012 11:16, Jasha Joachimsthal wrote: >> >> On 22 March 2012 22:28, Dennis van der Laan <[email protected]> >> >wrote: >> >> >> >>> My first question is that I noticed gadgets which have a 'height' >> >>> argument in the gadget moduleprefs, are not resized to that height. >The >> >>> iframe created for those gadgets have a 'default' height of 250px. I >> >>> tried to search for the code where the iframe is created or the height >> >>> is set, but I was unable to find it. Can anybody confirm that the >> height >> >>> of the gadget iframe is not resized, based on the 'height' argument in >> >>> the ModulePrefs, or is the gadget module incorrect? >> >>> >> >>> >> >> The dynamic-height cannot detect how much height the iframe needs. >You >> >> should be able to let the iframe content notify the container to resize >> the >> >> iframe with rpc relay calls. As an example the gadget definition in [1] >> >> registers the rpc and calls the adjustHeight. The content of the iframe >> is >> >> rendered with [2]. The iframe content does an rpc call to the >> adjustHeight. >> >> As you may see, we've injected the Shindig host there, but at least in >> the >> >> gadget it can be replaced with >> gadgets.rpc.getOrigin(window.location.href) >> >> (haven't checked for the iframe content). >> >> >> >> [1] >> >> https://github.com/OpenConext/OpenConext-teams/blob/master/coin- >> >teams-war/src/main/webapp/WEB-INF/jsp/teams.jsp >> >> [2] >> >> https://github.com/OpenConext/OpenConext-teams/blob/master/coin- >> >teams-war/src/main/webapp/WEB-INF/tags/genericpage.tag >> >> >> >> >> >For most of our gadgets, we indeed use dynamic height, by letting the >> >gadget call gadgets.window.adjustHeight(). The rpc-call by which an >> >iframe can control the gadgets height is new to me, so thanks for this >> >example! >> >Unfortunately, we also want to use off-the-shelf gadgets from third >> >parties and they do not use these constructs. I guess providing a >> >'height' attribute in the ModulePrefs element is optional for a platform >> >to support, but because google at least supports it, most iframe-based >> >gadgets just provide a static height in their gadget definition. >> >As I mentioned, Rave (or Shindig?) currently generates iframes with a >> >default height of 250px, which is hardcoded in the html (not by using >> >CSS). Can you point me to the code where this iframe is generated? Maybe >> >I can provide a patch for supporting the 'height' attribute. >> >> Sounds like a bug. I thought we had support for the height property of >> OpenSocial gadgets, so not sure why it isn't working. If you want to look >> through rave_opensocial.js, find where the issue is and provide a patch, >> that would be great! A jira ticket will need to be created for this issue. >> >> > >> >-- >> >Dennis van der Laan, MSc >> >Centre for Information Technology >> >University of Groningen >> >>
