Review Board 1.7.22


Updates to language/pref handling in the common container code.

Review Request #1011 - Created July 5, 2011 and submitted

Dan Dumont
Reviewers
shindig
shindig
Previously, the common container code did not register the RPC handler for setprefs.  It was completely up to the container to register for the rpc handler and to supply the render calls with the persisted preference data.  This patch surfaces some simple hooks that a container may provide for persisting and retrieving persisted preferences.

This patch also changes the behavior of the common container code to ask for gadget metadata with the navigator's language settings.  There are also 2 simple hooks to allow the container to override this default behavior.

One change of particular note: a gadget site id is now a string, and is set-able by the container via the site element's id attribute.   This is to allow a container to persist an instance of a gadget instance (and thus a gadget instance's preferences).

Link to common container spec changes: http://code.google.com/p/opensocial-resources/issues/detail?id=1193
Tested in a private container.
Updated tests to test language callbacks.
Review request changed
Updated (July 6, 2011, 12:54 p.m.)
  • Previously, the common container code did not register the RPC handler for setprefs.  It was completely up to the container to register for the rpc handler and to supply the render calls with the persisted preference data.  This patch surfaces some simple hooks that a container may provide for persisting and retrieving persisted preferences.
    
    This patch also changes the behavior of the common container code to ask for gadget metadata with the navigator's language settings.  There are also 2 simple hooks to allow the container to override this default behavior.
    
    One change of particular note: a gadget site id is now a string, and is set-able by the container via the site element's id attribute.   This is to allow a container to persist an instance of a gadget instance (and thus a gadget instance's preferences).

    Previously, the common container code did not register the RPC handler for setprefs.  It was completely up to the container to register for the rpc handler and to supply the render calls with the persisted preference data.  This patch surfaces some simple hooks that a container may provide for persisting and retrieving persisted preferences.
    
    This patch also changes the behavior of the common container code to ask for gadget metadata with the navigator's language settings.  There are also 2 simple hooks to allow the container to override this default behavior.
    
    One change of particular note: a gadget site id is now a string, and is set-able by the container via the site element's id attribute.   This is to allow a container to persist an instance of a gadget instance (and thus a gadget instance's preferences).
    
    Link to common container spec changes: http://code.google.com/p/opensocial-resources/issues/detail?id=1193
Added link to spec change issue.
Ship it!
Posted (July 6, 2011, 1:20 p.m.)
LGTM
Ship it!
Posted (July 14, 2011, 6:53 p.m.)
LGTM.  Patch applied.  Thanks, Dan.