You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rave.apache.org by Scott Wilson <sc...@gmail.com> on 2011/11/03 21:19:38 UTC

W3C Widgets min/preferred width and height

I've been playing with Wookie and W3C Widgets in Rave, and one of the issues is that W3C Widgets don't use callbacks to set their iFrame height and width, but instead Widget authors provide a hint for preferred/minimum height/width in metadata attributes. (see RAVE-335 for the user story)

I've got this working very nicely, as you can see here:

http://farm7.static.flickr.com/6091/6309728113_0de24307d4_b.jpg

... but I had to add height and width properties to the core Widget model class in Rave plus corresponding getters, setters and JPA annotations. It doesn't have any effect on OpenSocial gadgets.

I just wanted to check if we think this is an OK way to solve this (at least for now)?

S

Re: W3C Widgets min/preferred width and height

Posted by Scott Wilson <sc...@gmail.com>.
On 4 Nov 2011, at 14:18, Franklin, Matthew B. wrote:

> Sorry to respond late to the discussion.  I have been a little tied up recently.
> 
> 
>> -----Original Message-----
>> From: Scott Wilson [mailto:scott.bradley.wilson@gmail.com]
>> Sent: Thursday, November 03, 2011 4:20 PM
>> To: rave-dev@incubator.apache.org
>> Subject: W3C Widgets min/preferred width and height
>> 
>> I've been playing with Wookie and W3C Widgets in Rave, and one of the
>> issues is that W3C Widgets don't use callbacks to set their iFrame height and
>> width, but instead Widget authors provide a hint for preferred/minimum
>> height/width in metadata attributes. (see RAVE-335 for the user story)
>> 
>> I've got this working very nicely, as you can see here:
>> 
>> http://farm7.static.flickr.com/6091/6309728113_0de24307d4_b.jpg
>> 
>> ... but I had to add height and width properties to the core Widget model class
>> in Rave plus corresponding getters, setters and JPA annotations. It doesn't
>> have any effect on OpenSocial gadgets
> 
> I think having a default height makes a lot of sense for the Widget model object; however, if we keep with the current PageLayout construct, the regions are responsible for controlling the widget's default width.  That's not to say that the widget can't have a preferred or default width, but that the region may override it during rendering.

I had another look at this, and have made it work by using a subclass of Widget in rave-w3c-provider just for rendering purposes. I'd rather not tinker with the core model if at all possible, especially for something that could be widget-type specific.

> 
>> 
>> I just wanted to check if we think this is an OK way to solve this (at least for
>> now)?
>> 
>> S


RE: W3C Widgets min/preferred width and height

Posted by "Franklin, Matthew B." <mf...@mitre.org>.
Sorry to respond late to the discussion.  I have been a little tied up recently.


>-----Original Message-----
>From: Scott Wilson [mailto:scott.bradley.wilson@gmail.com]
>Sent: Thursday, November 03, 2011 4:20 PM
>To: rave-dev@incubator.apache.org
>Subject: W3C Widgets min/preferred width and height
>
>I've been playing with Wookie and W3C Widgets in Rave, and one of the
>issues is that W3C Widgets don't use callbacks to set their iFrame height and
>width, but instead Widget authors provide a hint for preferred/minimum
>height/width in metadata attributes. (see RAVE-335 for the user story)
>
>I've got this working very nicely, as you can see here:
>
>http://farm7.static.flickr.com/6091/6309728113_0de24307d4_b.jpg
>
>... but I had to add height and width properties to the core Widget model class
>in Rave plus corresponding getters, setters and JPA annotations. It doesn't
>have any effect on OpenSocial gadgets

I think having a default height makes a lot of sense for the Widget model object; however, if we keep with the current PageLayout construct, the regions are responsible for controlling the widget's default width.  That's not to say that the widget can't have a preferred or default width, but that the region may override it during rendering.

>
>I just wanted to check if we think this is an OK way to solve this (at least for
>now)?
>
>S

Re: W3C Widgets min/preferred width and height

Posted by Jasha Joachimsthal <j....@onehippo.com>.
On 4 November 2011 11:07, Scott Wilson <sc...@gmail.com>wrote:

> On 4 Nov 2011, at 09:45, Jasha Joachimsthal wrote:
>
> > You change introduced a side effect for the OpenSocial gadgets: if you
> > maximise a gadget and then go back to the home view (the initial view).
> the
> > height is adjusted but the gadget still takes the full width.
>
> OK, for some reason its fine on Chrome and Safari, but not on Firefox and
> Opera.
>

Thanks for reverting :)

Jasha

Re: W3C Widgets min/preferred width and height

Posted by Scott Wilson <sc...@gmail.com>.
On 4 Nov 2011, at 09:45, Jasha Joachimsthal wrote:

> You change introduced a side effect for the OpenSocial gadgets: if you
> maximise a gadget and then go back to the home view (the initial view). the
> height is adjusted but the gadget still takes the full width.

OK, for some reason its fine on Chrome and Safari, but not on Firefox and Opera.

> 
> Jasha Joachimsthal
> 
> Europe - Amsterdam - Oosteinde 11, 1017 WT Amsterdam - +31(0)20 522 4466
> US - Boston - 1 Broadway, Cambridge, MA 02142 - +1 877 414 4776 (toll free)
> 
> www.onehippo.com
> 
> 
> On 3 November 2011 21:19, Scott Wilson <sc...@gmail.com>wrote:
> 
>> I've been playing with Wookie and W3C Widgets in Rave, and one of the
>> issues is that W3C Widgets don't use callbacks to set their iFrame height
>> and width, but instead Widget authors provide a hint for preferred/minimum
>> height/width in metadata attributes. (see RAVE-335 for the user story)
>> 
>> I've got this working very nicely, as you can see here:
>> 
>> http://farm7.static.flickr.com/6091/6309728113_0de24307d4_b.jpg
>> 
>> ... but I had to add height and width properties to the core Widget model
>> class in Rave plus corresponding getters, setters and JPA annotations. It
>> doesn't have any effect on OpenSocial gadgets.
>> 
>> I just wanted to check if we think this is an OK way to solve this (at
>> least for now)?
>> 
>> S


Re: W3C Widgets min/preferred width and height

Posted by Scott Wilson <sc...@gmail.com>.
On 4 Nov 2011, at 09:45, Jasha Joachimsthal wrote:

> You change introduced a side effect for the OpenSocial gadgets: if you
> maximise a gadget and then go back to the home view (the initial view). the
> height is adjusted but the gadget still takes the full width.

D'oh sorry about that, I'll take a look at it now

> 
> Jasha Joachimsthal
> 
> Europe - Amsterdam - Oosteinde 11, 1017 WT Amsterdam - +31(0)20 522 4466
> US - Boston - 1 Broadway, Cambridge, MA 02142 - +1 877 414 4776 (toll free)
> 
> www.onehippo.com
> 
> 
> On 3 November 2011 21:19, Scott Wilson <sc...@gmail.com>wrote:
> 
>> I've been playing with Wookie and W3C Widgets in Rave, and one of the
>> issues is that W3C Widgets don't use callbacks to set their iFrame height
>> and width, but instead Widget authors provide a hint for preferred/minimum
>> height/width in metadata attributes. (see RAVE-335 for the user story)
>> 
>> I've got this working very nicely, as you can see here:
>> 
>> http://farm7.static.flickr.com/6091/6309728113_0de24307d4_b.jpg
>> 
>> ... but I had to add height and width properties to the core Widget model
>> class in Rave plus corresponding getters, setters and JPA annotations. It
>> doesn't have any effect on OpenSocial gadgets.
>> 
>> I just wanted to check if we think this is an OK way to solve this (at
>> least for now)?
>> 
>> S


Re: W3C Widgets min/preferred width and height

Posted by Jasha Joachimsthal <j....@onehippo.com>.
You change introduced a side effect for the OpenSocial gadgets: if you
maximise a gadget and then go back to the home view (the initial view). the
height is adjusted but the gadget still takes the full width.

Jasha Joachimsthal

Europe - Amsterdam - Oosteinde 11, 1017 WT Amsterdam - +31(0)20 522 4466
US - Boston - 1 Broadway, Cambridge, MA 02142 - +1 877 414 4776 (toll free)

www.onehippo.com


On 3 November 2011 21:19, Scott Wilson <sc...@gmail.com>wrote:

> I've been playing with Wookie and W3C Widgets in Rave, and one of the
> issues is that W3C Widgets don't use callbacks to set their iFrame height
> and width, but instead Widget authors provide a hint for preferred/minimum
> height/width in metadata attributes. (see RAVE-335 for the user story)
>
> I've got this working very nicely, as you can see here:
>
> http://farm7.static.flickr.com/6091/6309728113_0de24307d4_b.jpg
>
> ... but I had to add height and width properties to the core Widget model
> class in Rave plus corresponding getters, setters and JPA annotations. It
> doesn't have any effect on OpenSocial gadgets.
>
> I just wanted to check if we think this is an OK way to solve this (at
> least for now)?
>
> S