You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by Henry Saputra <hs...@apache.org> on 2012/04/03 21:01:06 UTC
Review Request: Fix the actions-contributions feature param by wrapping it
with tag to avoid DOM parser error to follow OpenSocial 2.0 specs
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4626/
-----------------------------------------------------------
Review request for shindig and Dan Dumont.
Summary
-------
>From the discussion in OpenSocial list and Google group: https://groups.google.com/forum/?fromgroups#!topic/opensocial-and-gadgets-spec/qX45Po_Dqfo we are missing the <actions> tag to wrap <action> tag for the actions-contributions feature param.
To make sure Shindig follow OpenSocial specs and to follow the spirit of Shindig to be following closer the OpenSocial specs, we need to change the sample gadget and code handler to follow OpenSocial 2.0 spec.
So instead of :
<Require feature="actions">
<Param name="action-contributions"><![CDATA[
<actions>
<action id="org-samplevoip-chatwithperson" dataType="opensocial.Person" label="Chat" tooltip="Chat" />
<action id="org-samplevoip-callbyperson" dataType="opensocial.Person" label="Call" tooltip="Call" />
<action id="org-samplevoip-globalcall" path="container/navigationLinks" label="VOIP Call" tooltip="Call using VOIP" />
</actions>
]]></Param>
</Require>
it will be:
<Require feature="actions">
<Param name="action-contributions"><![CDATA[
<action id="org-samplevoip-chatwithperson" dataType="opensocial.Person" label="Chat" tooltip="Chat" />
<action id="org-samplevoip-callbyperson" dataType="opensocial.Person" label="Call" tooltip="Call" />
<action id="org-samplevoip-globalcall" path="container/navigationLinks" label="VOIP Call" tooltip="Call using VOIP" />
]]></Param>
</Require>
Also change from text/xml to application/xml since text/xml seems to be deprecated (http://tools.ietf.org/html/draft-murata-kohn-lilley-xml-03)
Diffs
-----
trunk/content/samplecontainer/examples/conservcontainer/sample-actions-voip.xml 1309085
trunk/features/src/main/javascript/features/actions/actions_container.js 1309085
Diff: https://reviews.apache.org/r/4626/diff
Testing
-------
Run the sample app in common container
Thanks,
Henry
Re: Review Request: Fix the actions-contributions feature param by wrapping
it with tag to avoid DOM parser error to follow OpenSocial 2.0
specs
Posted by Henry Saputra <hs...@apache.org>.
> On 2012-04-04 13:05:21, Dan Dumont wrote:
> > trunk/features/src/main/javascript/features/actions/actions_container.js, line 509
> > <https://reviews.apache.org/r/4626/diff/1/?file=98749#file98749line509>
> >
> > This impl will easily break when/if we extend the actions tag to have attributes.
> > I think that I might prefer that we parse this dom structure and insert the actions element after, either in the dom before we jsonify it, or in the json after it's been converted to json. It looks like if you do the latter, the change is quite simple.
When the time come we support <actions> tag and the attributes this code will be removed. The Apache Shindig 2.5.0 release will follow OpenSocial 2.0 and if time permit some of the OpenSocial 2.5.0.
Parsing the content w/o <actions> tag wrapped the <action> tag will cause the DOM parser to fail, hence the correction before calling the DOM Parsing logic.
I could add regex to handle parameters in the <actions> tag but its just not necessary. Validation of gadget XML to have all the tags should be done by gadget management app such as Apache Rave. The only thing runtime code like Shindig needs to do is to make sure its not choke in execution and handle error gracefully.
- Henry
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4626/#review6679
-----------------------------------------------------------
On 2012-04-03 19:01:06, Henry Saputra wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/4626/
> -----------------------------------------------------------
>
> (Updated 2012-04-03 19:01:06)
>
>
> Review request for shindig and Dan Dumont.
>
>
> Summary
> -------
>
> From the discussion in OpenSocial list and Google group: https://groups.google.com/forum/?fromgroups#!topic/opensocial-and-gadgets-spec/qX45Po_Dqfo we are missing the <actions> tag to wrap <action> tag for the actions-contributions feature param.
>
> To make sure Shindig follow OpenSocial specs and to follow the spirit of Shindig to be following closer the OpenSocial specs, we need to change the sample gadget and code handler to follow OpenSocial 2.0 spec.
>
> So instead of :
>
> <Require feature="actions">
> <Param name="action-contributions"><![CDATA[
> <actions>
> <action id="org-samplevoip-chatwithperson" dataType="opensocial.Person" label="Chat" tooltip="Chat" />
> <action id="org-samplevoip-callbyperson" dataType="opensocial.Person" label="Call" tooltip="Call" />
> <action id="org-samplevoip-globalcall" path="container/navigationLinks" label="VOIP Call" tooltip="Call using VOIP" />
> </actions>
> ]]></Param>
> </Require>
>
> it will be:
>
> <Require feature="actions">
> <Param name="action-contributions"><![CDATA[
> <action id="org-samplevoip-chatwithperson" dataType="opensocial.Person" label="Chat" tooltip="Chat" />
> <action id="org-samplevoip-callbyperson" dataType="opensocial.Person" label="Call" tooltip="Call" />
> <action id="org-samplevoip-globalcall" path="container/navigationLinks" label="VOIP Call" tooltip="Call using VOIP" />
> ]]></Param>
> </Require>
>
> Also change from text/xml to application/xml since text/xml seems to be deprecated (http://tools.ietf.org/html/draft-murata-kohn-lilley-xml-03)
>
>
> Diffs
> -----
>
> trunk/content/samplecontainer/examples/conservcontainer/sample-actions-voip.xml 1309085
> trunk/features/src/main/javascript/features/actions/actions_container.js 1309085
>
> Diff: https://reviews.apache.org/r/4626/diff
>
>
> Testing
> -------
>
> Run the sample app in common container
>
>
> Thanks,
>
> Henry
>
>
Re: Review Request: Fix the actions-contributions feature param by wrapping
it with tag to avoid DOM parser error to follow OpenSocial 2.0
specs
Posted by Dan Dumont <dd...@us.ibm.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4626/#review6679
-----------------------------------------------------------
trunk/features/src/main/javascript/features/actions/actions_container.js
<https://reviews.apache.org/r/4626/#comment14476>
This impl will easily break when/if we extend the actions tag to have attributes.
I think that I might prefer that we parse this dom structure and insert the actions element after, either in the dom before we jsonify it, or in the json after it's been converted to json. It looks like if you do the latter, the change is quite simple.
- Dan
On 2012-04-03 19:01:06, Henry Saputra wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/4626/
> -----------------------------------------------------------
>
> (Updated 2012-04-03 19:01:06)
>
>
> Review request for shindig and Dan Dumont.
>
>
> Summary
> -------
>
> From the discussion in OpenSocial list and Google group: https://groups.google.com/forum/?fromgroups#!topic/opensocial-and-gadgets-spec/qX45Po_Dqfo we are missing the <actions> tag to wrap <action> tag for the actions-contributions feature param.
>
> To make sure Shindig follow OpenSocial specs and to follow the spirit of Shindig to be following closer the OpenSocial specs, we need to change the sample gadget and code handler to follow OpenSocial 2.0 spec.
>
> So instead of :
>
> <Require feature="actions">
> <Param name="action-contributions"><![CDATA[
> <actions>
> <action id="org-samplevoip-chatwithperson" dataType="opensocial.Person" label="Chat" tooltip="Chat" />
> <action id="org-samplevoip-callbyperson" dataType="opensocial.Person" label="Call" tooltip="Call" />
> <action id="org-samplevoip-globalcall" path="container/navigationLinks" label="VOIP Call" tooltip="Call using VOIP" />
> </actions>
> ]]></Param>
> </Require>
>
> it will be:
>
> <Require feature="actions">
> <Param name="action-contributions"><![CDATA[
> <action id="org-samplevoip-chatwithperson" dataType="opensocial.Person" label="Chat" tooltip="Chat" />
> <action id="org-samplevoip-callbyperson" dataType="opensocial.Person" label="Call" tooltip="Call" />
> <action id="org-samplevoip-globalcall" path="container/navigationLinks" label="VOIP Call" tooltip="Call using VOIP" />
> ]]></Param>
> </Require>
>
> Also change from text/xml to application/xml since text/xml seems to be deprecated (http://tools.ietf.org/html/draft-murata-kohn-lilley-xml-03)
>
>
> Diffs
> -----
>
> trunk/content/samplecontainer/examples/conservcontainer/sample-actions-voip.xml 1309085
> trunk/features/src/main/javascript/features/actions/actions_container.js 1309085
>
> Diff: https://reviews.apache.org/r/4626/diff
>
>
> Testing
> -------
>
> Run the sample app in common container
>
>
> Thanks,
>
> Henry
>
>
Re: Review Request: Fix the actions-contributions feature param by wrapping
it with tag to avoid DOM parser error to follow OpenSocial 2.0
specs
Posted by Dan Dumont <dd...@us.ibm.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4626/#review6677
-----------------------------------------------------------
If we do this we need to fix the implementation to cope with either scenario. We can't just change the examples to not work. The impl has never supported no actions element parent, which is why i believe the spec has always been wrong.
- Dan
On 2012-04-03 19:01:06, Henry Saputra wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/4626/
> -----------------------------------------------------------
>
> (Updated 2012-04-03 19:01:06)
>
>
> Review request for shindig and Dan Dumont.
>
>
> Summary
> -------
>
> From the discussion in OpenSocial list and Google group: https://groups.google.com/forum/?fromgroups#!topic/opensocial-and-gadgets-spec/qX45Po_Dqfo we are missing the <actions> tag to wrap <action> tag for the actions-contributions feature param.
>
> To make sure Shindig follow OpenSocial specs and to follow the spirit of Shindig to be following closer the OpenSocial specs, we need to change the sample gadget and code handler to follow OpenSocial 2.0 spec.
>
> So instead of :
>
> <Require feature="actions">
> <Param name="action-contributions"><![CDATA[
> <actions>
> <action id="org-samplevoip-chatwithperson" dataType="opensocial.Person" label="Chat" tooltip="Chat" />
> <action id="org-samplevoip-callbyperson" dataType="opensocial.Person" label="Call" tooltip="Call" />
> <action id="org-samplevoip-globalcall" path="container/navigationLinks" label="VOIP Call" tooltip="Call using VOIP" />
> </actions>
> ]]></Param>
> </Require>
>
> it will be:
>
> <Require feature="actions">
> <Param name="action-contributions"><![CDATA[
> <action id="org-samplevoip-chatwithperson" dataType="opensocial.Person" label="Chat" tooltip="Chat" />
> <action id="org-samplevoip-callbyperson" dataType="opensocial.Person" label="Call" tooltip="Call" />
> <action id="org-samplevoip-globalcall" path="container/navigationLinks" label="VOIP Call" tooltip="Call using VOIP" />
> ]]></Param>
> </Require>
>
> Also change from text/xml to application/xml since text/xml seems to be deprecated (http://tools.ietf.org/html/draft-murata-kohn-lilley-xml-03)
>
>
> Diffs
> -----
>
> trunk/content/samplecontainer/examples/conservcontainer/sample-actions-voip.xml 1309085
> trunk/features/src/main/javascript/features/actions/actions_container.js 1309085
>
> Diff: https://reviews.apache.org/r/4626/diff
>
>
> Testing
> -------
>
> Run the sample app in common container
>
>
> Thanks,
>
> Henry
>
>
Re: Review Request: Fix the actions-contributions feature param by wrapping
it with tag to avoid DOM parser error to follow OpenSocial 2.0
specs
Posted by Dan Dumont <dd...@us.ibm.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4626/#review6678
-----------------------------------------------------------
Sorry, I only read the comments, I didn't realize the patch had attempted this. Will review patch now.
- Dan
On 2012-04-03 19:01:06, Henry Saputra wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/4626/
> -----------------------------------------------------------
>
> (Updated 2012-04-03 19:01:06)
>
>
> Review request for shindig and Dan Dumont.
>
>
> Summary
> -------
>
> From the discussion in OpenSocial list and Google group: https://groups.google.com/forum/?fromgroups#!topic/opensocial-and-gadgets-spec/qX45Po_Dqfo we are missing the <actions> tag to wrap <action> tag for the actions-contributions feature param.
>
> To make sure Shindig follow OpenSocial specs and to follow the spirit of Shindig to be following closer the OpenSocial specs, we need to change the sample gadget and code handler to follow OpenSocial 2.0 spec.
>
> So instead of :
>
> <Require feature="actions">
> <Param name="action-contributions"><![CDATA[
> <actions>
> <action id="org-samplevoip-chatwithperson" dataType="opensocial.Person" label="Chat" tooltip="Chat" />
> <action id="org-samplevoip-callbyperson" dataType="opensocial.Person" label="Call" tooltip="Call" />
> <action id="org-samplevoip-globalcall" path="container/navigationLinks" label="VOIP Call" tooltip="Call using VOIP" />
> </actions>
> ]]></Param>
> </Require>
>
> it will be:
>
> <Require feature="actions">
> <Param name="action-contributions"><![CDATA[
> <action id="org-samplevoip-chatwithperson" dataType="opensocial.Person" label="Chat" tooltip="Chat" />
> <action id="org-samplevoip-callbyperson" dataType="opensocial.Person" label="Call" tooltip="Call" />
> <action id="org-samplevoip-globalcall" path="container/navigationLinks" label="VOIP Call" tooltip="Call using VOIP" />
> ]]></Param>
> </Require>
>
> Also change from text/xml to application/xml since text/xml seems to be deprecated (http://tools.ietf.org/html/draft-murata-kohn-lilley-xml-03)
>
>
> Diffs
> -----
>
> trunk/content/samplecontainer/examples/conservcontainer/sample-actions-voip.xml 1309085
> trunk/features/src/main/javascript/features/actions/actions_container.js 1309085
>
> Diff: https://reviews.apache.org/r/4626/diff
>
>
> Testing
> -------
>
> Run the sample app in common container
>
>
> Thanks,
>
> Henry
>
>
Re: Review Request: Fix the actions-contributions feature param by wrapping
it with tag to avoid DOM parser error to follow OpenSocial 2.0
specs
Posted by Dan Dumont <dd...@us.ibm.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4626/#review6682
-----------------------------------------------------------
Ship it!
LGTM then based on comments.
- Dan
On 2012-04-03 19:01:06, Henry Saputra wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/4626/
> -----------------------------------------------------------
>
> (Updated 2012-04-03 19:01:06)
>
>
> Review request for shindig and Dan Dumont.
>
>
> Summary
> -------
>
> From the discussion in OpenSocial list and Google group: https://groups.google.com/forum/?fromgroups#!topic/opensocial-and-gadgets-spec/qX45Po_Dqfo we are missing the <actions> tag to wrap <action> tag for the actions-contributions feature param.
>
> To make sure Shindig follow OpenSocial specs and to follow the spirit of Shindig to be following closer the OpenSocial specs, we need to change the sample gadget and code handler to follow OpenSocial 2.0 spec.
>
> So instead of :
>
> <Require feature="actions">
> <Param name="action-contributions"><![CDATA[
> <actions>
> <action id="org-samplevoip-chatwithperson" dataType="opensocial.Person" label="Chat" tooltip="Chat" />
> <action id="org-samplevoip-callbyperson" dataType="opensocial.Person" label="Call" tooltip="Call" />
> <action id="org-samplevoip-globalcall" path="container/navigationLinks" label="VOIP Call" tooltip="Call using VOIP" />
> </actions>
> ]]></Param>
> </Require>
>
> it will be:
>
> <Require feature="actions">
> <Param name="action-contributions"><![CDATA[
> <action id="org-samplevoip-chatwithperson" dataType="opensocial.Person" label="Chat" tooltip="Chat" />
> <action id="org-samplevoip-callbyperson" dataType="opensocial.Person" label="Call" tooltip="Call" />
> <action id="org-samplevoip-globalcall" path="container/navigationLinks" label="VOIP Call" tooltip="Call using VOIP" />
> ]]></Param>
> </Require>
>
> Also change from text/xml to application/xml since text/xml seems to be deprecated (http://tools.ietf.org/html/draft-murata-kohn-lilley-xml-03)
>
>
> Diffs
> -----
>
> trunk/content/samplecontainer/examples/conservcontainer/sample-actions-voip.xml 1309085
> trunk/features/src/main/javascript/features/actions/actions_container.js 1309085
>
> Diff: https://reviews.apache.org/r/4626/diff
>
>
> Testing
> -------
>
> Run the sample app in common container
>
>
> Thanks,
>
> Henry
>
>
Re: Review Request: Fix the actions-contributions feature param by wrapping
it with tag to avoid DOM parser error to follow OpenSocial 2.0
specs
Posted by Dan Dumont <dd...@us.ibm.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4626/#review8613
-----------------------------------------------------------
Hey Henry, what's the status of this review? Committed? Not needed?
- Dan Dumont
On April 3, 2012, 7:01 p.m., Henry Saputra wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/4626/
> -----------------------------------------------------------
>
> (Updated April 3, 2012, 7:01 p.m.)
>
>
> Review request for shindig and Dan Dumont.
>
>
> Description
> -------
>
> From the discussion in OpenSocial list and Google group: https://groups.google.com/forum/?fromgroups#!topic/opensocial-and-gadgets-spec/qX45Po_Dqfo we are missing the <actions> tag to wrap <action> tag for the actions-contributions feature param.
>
> To make sure Shindig follow OpenSocial specs and to follow the spirit of Shindig to be following closer the OpenSocial specs, we need to change the sample gadget and code handler to follow OpenSocial 2.0 spec.
>
> So instead of :
>
> <Require feature="actions">
> <Param name="action-contributions"><![CDATA[
> <actions>
> <action id="org-samplevoip-chatwithperson" dataType="opensocial.Person" label="Chat" tooltip="Chat" />
> <action id="org-samplevoip-callbyperson" dataType="opensocial.Person" label="Call" tooltip="Call" />
> <action id="org-samplevoip-globalcall" path="container/navigationLinks" label="VOIP Call" tooltip="Call using VOIP" />
> </actions>
> ]]></Param>
> </Require>
>
> it will be:
>
> <Require feature="actions">
> <Param name="action-contributions"><![CDATA[
> <action id="org-samplevoip-chatwithperson" dataType="opensocial.Person" label="Chat" tooltip="Chat" />
> <action id="org-samplevoip-callbyperson" dataType="opensocial.Person" label="Call" tooltip="Call" />
> <action id="org-samplevoip-globalcall" path="container/navigationLinks" label="VOIP Call" tooltip="Call using VOIP" />
> ]]></Param>
> </Require>
>
> Also change from text/xml to application/xml since text/xml seems to be deprecated (http://tools.ietf.org/html/draft-murata-kohn-lilley-xml-03)
>
>
> Diffs
> -----
>
> trunk/content/samplecontainer/examples/conservcontainer/sample-actions-voip.xml 1309085
> trunk/features/src/main/javascript/features/actions/actions_container.js 1309085
>
> Diff: https://reviews.apache.org/r/4626/diff/
>
>
> Testing
> -------
>
> Run the sample app in common container
>
>
> Thanks,
>
> Henry Saputra
>
>