You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by "John Hjelmstad (JIRA)" <ji...@apache.org> on 2008/01/31 03:31:38 UTC

[jira] Created: (SHINDIG-42) Add support for "views" (multiple sections)

Add support for "views" (multiple <Content> sections)
-----------------------------------------------------

                 Key: SHINDIG-42
                 URL: https://issues.apache.org/jira/browse/SHINDIG-42
             Project: Shindig
          Issue Type: New Feature
          Components: Gadgets Server - Java
            Reporter: John Hjelmstad
            Assignee: John Hjelmstad


The OpenSocial API has deprecated Surfaces in favor of Views, now defined as a core Gadgets feature. They are represented in Gadget XML by repeating the <Content> section and adding a "view" attribute to it. The default view ID is "default" if unspecified. Multiple views IDs may be attached to a given <Content> section by using a comma delimited list in the view attribute's value.

Example:
<Content view="foo">
foo content
</Content>
<Content view="bar">
bar content
</Content>
<Content view="x,y,z">
content for views x, y, and z
</Content>
<Content>
...standard default content...
</Content>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Created: (SHINDIG-42) Add support for "views" (multiple sections)

Posted by Kevin Brown <et...@google.com>.
+1 on concatenating together all content sections that match the current
view, but ONLY IF it is added to the spec officially. Since multiple content
sections are such a new part of the spec anyway, I suspect that getting this
change made now is still possible, but Shindig isn't the only stakeholder in
the gadget spec.

On Jan 30, 2008 7:48 PM, John Hjelmstad <fa...@google.com> wrote:

> Great question. Your expectation contains nearly the semantics I'd suggest
> and have implemented with one modification: the DEFAULT doesn't show up
> when
> view="bar". <Content> without view, or with view="" is equivalent to
> view="default". This facilitates shared code between the default content
> block and other views. Without it, the default block would have to stand
> on
> its own, while at the same time always being included in the alternate
> specified views.
>
> For a while I was a proponent of precluding repeated view definitions
> altogether, but this mechanism is an elegant way to accommodate shared
> code
> IMO. Thoughts?
>
> John
>
> On Wed, Jan 30, 2008 at 7:12 PM, Arne Roomann-Kurrik <ku...@google.com>
> wrote:
>
> > What happens when multiple content sections specify the same view?
> >
> > <Content view="bar"> BAR </Content>
> > <Content view="foo, bar"> FOO+BAR </Content>
> > <Content> DEFAULT </Content>
> >
> > If the current view is "bar", what is the expected result?  (I would
> > expect
> > "BAR FOO+BAR DEFAULT", but wanted to get clarification)
> >
>

Re: [jira] Created: (SHINDIG-42) Add support for "views" (multiple sections)

Posted by Kevin Brown <et...@google.com>.
On Jan 30, 2008 8:23 PM, <ih...@gmail.com> wrote:

> On Wed, Jan 30, 2008 at 7:48 PM, John Hjelmstad <fa...@google.com> wrote:
>
> > ... This facilitates shared code between the default content
> > block and other views. Without it, the default block would have to stand
> > on
> > its own, while at the same time always being included in the alternate
> > specified views.
> >
>
> Do you expect to switch views dynamically, sharing "live" JavaScript
> variables? Or is the code inclusion you are talking about equivalent to
> doing a bunch of #includes, then creating <n> separate "actual" gadgets,
> where each one is initialized completely independently from the other?


It's just a preprocessor -- nothing happens at run time.

>
>
> Ihab
>
> --
> Ihab A.B. Awad, Palo Alto, CA
>

Re: [jira] Created: (SHINDIG-42) Add support for "views" (multiple sections)

Posted by ih...@gmail.com.
On Wed, Jan 30, 2008 at 7:48 PM, John Hjelmstad <fa...@google.com> wrote:

> ... This facilitates shared code between the default content
> block and other views. Without it, the default block would have to stand
> on
> its own, while at the same time always being included in the alternate
> specified views.
>

Do you expect to switch views dynamically, sharing "live" JavaScript
variables? Or is the code inclusion you are talking about equivalent to
doing a bunch of #includes, then creating <n> separate "actual" gadgets,
where each one is initialized completely independently from the other?

Ihab

-- 
Ihab A.B. Awad, Palo Alto, CA

Re: [jira] Created: (SHINDIG-42) Add support for "views" (multiple sections)

Posted by Dan Peterson <dp...@google.com>.
Hey folks,

This discussion has identified a hole in the gadgets spec that will quickly
be remedied. Multiple views have only recently been codified for
parsing/rendering in gadgets, and it looks like there is still some
definition to be done with regards to viewing these multiple views.

-Dan

On Wed, Jan 30, 2008 at 7:48 PM, John Hjelmstad <fa...@google.com> wrote:

> Great question. Your expectation contains nearly the semantics I'd suggest
> and have implemented with one modification: the DEFAULT doesn't show up
> when
> view="bar". <Content> without view, or with view="" is equivalent to
> view="default". This facilitates shared code between the default content
> block and other views. Without it, the default block would have to stand
> on
> its own, while at the same time always being included in the alternate
> specified views.
>
> For a while I was a proponent of precluding repeated view definitions
> altogether, but this mechanism is an elegant way to accommodate shared
> code
> IMO. Thoughts?
>
> John
>
> On Wed, Jan 30, 2008 at 7:12 PM, Arne Roomann-Kurrik <ku...@google.com>
> wrote:
>
> > What happens when multiple content sections specify the same view?
> >
> > <Content view="bar"> BAR </Content>
> > <Content view="foo, bar"> FOO+BAR </Content>
> > <Content> DEFAULT </Content>
> >
> > If the current view is "bar", what is the expected result?  (I would
> > expect
> > "BAR FOO+BAR DEFAULT", but wanted to get clarification)
> >
>

Re: [jira] Created: (SHINDIG-42) Add support for "views" (multiple sections)

Posted by John Hjelmstad <fa...@google.com>.
Great question. Your expectation contains nearly the semantics I'd suggest
and have implemented with one modification: the DEFAULT doesn't show up when
view="bar". <Content> without view, or with view="" is equivalent to
view="default". This facilitates shared code between the default content
block and other views. Without it, the default block would have to stand on
its own, while at the same time always being included in the alternate
specified views.

For a while I was a proponent of precluding repeated view definitions
altogether, but this mechanism is an elegant way to accommodate shared code
IMO. Thoughts?

John

On Wed, Jan 30, 2008 at 7:12 PM, Arne Roomann-Kurrik <ku...@google.com>
wrote:

> What happens when multiple content sections specify the same view?
>
> <Content view="bar"> BAR </Content>
> <Content view="foo, bar"> FOO+BAR </Content>
> <Content> DEFAULT </Content>
>
> If the current view is "bar", what is the expected result?  (I would
> expect
> "BAR FOO+BAR DEFAULT", but wanted to get clarification)
>

Re: [jira] Created: (SHINDIG-42) Add support for "views" (multiple sections)

Posted by Arne Roomann-Kurrik <ku...@google.com>.
What happens when multiple content sections specify the same view?

<Content view="bar"> BAR </Content>
<Content view="foo, bar"> FOO+BAR </Content>
<Content> DEFAULT </Content>

If the current view is "bar", what is the expected result?  (I would expect
"BAR FOO+BAR DEFAULT", but wanted to get clarification)

[jira] Resolved: (SHINDIG-42) Add support for "views" (multiple sections)

Posted by "Kevin Brown (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-42?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Brown resolved SHINDIG-42.
--------------------------------

    Resolution: Fixed

Committed as of Friday 02/01/2008

> Add support for "views" (multiple <Content> sections)
> -----------------------------------------------------
>
>                 Key: SHINDIG-42
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-42
>             Project: Shindig
>          Issue Type: New Feature
>          Components: Gadgets Server - Java
>            Reporter: John Hjelmstad
>            Assignee: John Hjelmstad
>
> The OpenSocial API has deprecated Surfaces in favor of Views, now defined as a core Gadgets feature. They are represented in Gadget XML by repeating the <Content> section and adding a "view" attribute to it. The default view ID is "default" if unspecified. Multiple views IDs may be attached to a given <Content> section by using a comma delimited list in the view attribute's value.
> Example:
> <Content view="foo">
> foo content
> </Content>
> <Content view="bar">
> bar content
> </Content>
> <Content view="x,y,z">
> content for views x, y, and z
> </Content>
> <Content>
> ...standard default content...
> </Content>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.