Hi All,
I think the problem here is that we're trying to shoehorn the idea of
Content and the idea of a View into the same element - these are
actually separate concepts and should probably be different elements.
One thing, for example, that we haven't discussed yet, is how varying
views need to have different heights and widths. In the current spec,
height and width are part of ModulePrefs. This is a hold-over the
original iGoogle way of doing things, where a module had only one view
and one content section. A better way would be to have a View element,
that specified the height and width, as well as the content that
should be rendered in that view.
Here's a new suggested structure:
<Content id="mainContent">...</Content>
<View name="profile" alignment="left" height="500" width="30">
<ContentArea contentId="mainContent"/>
</View>
- The Content element has the following attribute added:
-"id". Optional. A string which uniquely names that content.
- A new optional "View" element is added. It has the following
attributes:
- "name". Required. ("profile"|"home"|"canvas"). The view surface
on which to display the content.
- "alignment". Optional. ("left"|"middle"|"right"). Indicates to
the container the preferred column to render the gadget on (if
applicable).
- "height" and "width". Optional. Int. Indicates to the container
the preferred height and width to render the gadget with.
- The View element can contain one or more ContentArea elements.
- The ContentArea element contains one attribute:
- "contentId". Required. A string that matches the id attribute
from of the defined "Content" elements, and indicates which content to
display in the View.
This would be backward compatible. So an iGoogle-style gadget (with
height and width in ModulePrefs, one Content area with no id or view
attributes, and no View elements) would render in the default view
(probably "home" for MySpace) with the height specified in
ModulePrefs.
What do you think?
Thanks,
Henry Stapp
hstapp at myspace
On Mar 4, 10:20 pm, "Kevin Brown" <
e...@google.com> wrote:
> I think we should put this discussion to some of the larger gadget
> developers out there who have been looking for solutions along these lines.
> There are > 100 people subscribed to this list, so if you are a developer we
> would appreciate your help in determining the best course of action here.
>
>
>
>
>
> On Tue, Mar 4, 2008 at 8:26 PM, Evan Gilbert <
uid...@google.com> wrote:
> > Does the concatenation enhancement help for more than sharing JS and CSS
> > includes?
>
> > If this is the only use case we're addressing, I still have a preference
> > for finding a more limited solution for JS/CSS sharing. If we're looking at
> > ways to combine content sections together, we should compare this approach
> > with other options - for example we could have a substitution variable that
> > refers to the entire contents of another content section.
>
> > Evan
>
> > On Tue, Mar 4, 2008 at 2:01 AM, Kevin Brown <
e...@google.com> wrote:
>
> > > Does anyone else have any feedback on this issue? Several launches are
> > > pending, and resolving this sooner rather than later would be ideal. Here is
> > > my proposed modification to the spec:
>
> > > Remove this paragraph: "Multiple Content sections may be specified in
> > > gadget XML. Each is labeled with one or more *view* identifiers, which
> > > allow the gadget to behave or appear differently depending on the context in
> > > which it's rendered. This context is provided by the gadget container."
>
> > > Add the following section between "Process" items 2 and 3, or possibly
> > > as a sub-section of item 2:
>
> > > ============================
>
> > > Process <Content> elements as defined in the canonical xsd, applying the
> > > following rules to the optional "view" attribute:
>
> > > 1. Process "view" as a comma-separated list of names. Whitespace between
> > > names MUST be ignored. Referred to hereafter as *view names.
> > > *a. If no "view" attribute is present, the assumed value MUST be
> > > "default".
>
> > > 2. Select the view name that most closely matches the view that you are
> > > currently displaying to your end user. If more than one view uses the same
> > > name:
> > > a. If any "type" attribute is "url", the specification is malformed,
> > > the server SHOULD display an error message.
> > > b. If all "type" attributes are "html", the CDATA of the matching
> > > elements MUST be concatenated together in the same order as declared.
> > > c. Any attributes on the element other than "view" and "href" MUST
> > > cascade through other elements, with the last declared value being the value
> > > used for all future work.
> > > d. If none of the declared view names match the requested view, the
> > > server MUST first look for a view named "default" and repeat this process.
> > > If no match is found for "default", the server SHOULD display an error
> > > message.
>
> > > =============================
>
> > > Getting resolution on this is very important to orkut and hi5, and I'm
> > > sure to other containers as well. If any containers have objections, please
> > > speak up now.
>
> --
> ~Kevin- Hide quoted text -
>
> - Show quoted text -