Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(23)

Issue 1760044: gadgets.util.getContainer() helper method (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 9 months ago by johnfargo
Modified:
15 years, 2 months ago
Reviewers:
zhoresh, dev-remailer, Tim Wintle
Base URL:
http://svn.apache.org/repos/asf/shindig/trunk/
Visibility:
Public.

Description

In several instances, I've seen gadgets getting their container ID for one reason or another. Given this seems inevitable anyway, it seems prudent to offer a standard helper method for such functionality. Comments welcome.

Patch Set 1 #

Patch Set 2 : Default to "default" #

Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -4 lines) Patch
features/src/main/javascript/features/core.util/util.js View 1 2 chunks +13 lines, -4 lines 0 comments Download

Messages

Total messages: 8
johnfargo
15 years, 9 months ago (2010-07-13 17:17:18 UTC) #1
johnfargo
Default to "default"
15 years, 9 months ago (2010-07-13 17:51:40 UTC) #2
zhoresh
lgtm, (Do we have any tests for this?) The new function is part of the ...
15 years, 9 months ago (2010-07-13 18:01:53 UTC) #3
fargo
Regrettably the utiltest.js harness still is pretty spare. Re: adding the API, I'm a little ...
15 years, 9 months ago (2010-07-13 18:05:23 UTC) #4
zhoresh
Well if it won't be documented somewhere it probably won't be used... but I see ...
15 years, 9 months ago (2010-07-13 18:21:24 UTC) #5
Tim Wintle
While I think this is a fairly common use case, I'm negative on adding the ...
15 years, 9 months ago (2010-07-13 19:14:47 UTC) #6
fargo
On Tue, Jul 13, 2010 at 12:14 PM, <timwintle@gmail.com> wrote: > While I think this ...
15 years, 9 months ago (2010-07-13 19:54:26 UTC) #7
johnfargo
15 years, 2 months ago (2011-01-25 04:10:05 UTC) #8
FYI I'm tossing this CL.

On 2010/07/13 19:54:26, fargo wrote:
> On Tue, Jul 13, 2010 at 12:14 PM, <mailto:timwintle@gmail.com> wrote:
> 
> > While I think this is a fairly common use case, I'm negative on adding
> > the method.
> >
> > Adding ~50 bytes to gadgets.core so developers can call
> >
> > {{{
> > gadgets.util.getContainer()
> > }}}
> >
> > instead of
> > {{{
> > gadgets.util.getUrlParameters().container
> > }}}
> >
> > doesn't seem worth it to me - especially considering that if there are
> > any extra url parameters the user might want to access in the future
> > it's more methods to add (and provide legacy support for).
> >
> > If documentation is the issue, then documenting "getUrlParameters()"
> > would be easier IMO.
> >
> > (not sure if I've missed some discussion on this)
> >
> 
> Nope, this thread _is_ the discussion, so I'm happy for your input ;)
> 
> The value I see isn't necessarily in avoiding .container, it's instead:
> A) the other two: synd || "default"
> B) the flexibility to change the URL scheme later or on a per-installation
> basis. For instance, the security token often contains the container ID --
> using it would save bytes. A container ID could also be injected by the
> server, or the param could be renamed.
> 
> It's all really just a hedge though ;)
> 
> --j
> 
> 
> >
> > Tim
> >
> >
> > http://codereview.appspot.com/1760044/show
> >
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b