-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Global channel subscription #97
Conversation
… to global channels. (#96)
|
||
The result of the function is the channel id of the newly created | ||
channel because we might need to use it right away. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use the @param
notation to explain each parameter's type, default value and usage
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok!
LGTM out of context, and it can be merged, but I have two observations
|
…ed to check whether widget should be initialized or not. (#96)
@@ -302,6 +310,9 @@ define ['cs!mozaic_module', 'cs!pubsub'], (Module) -> | |||
|
|||
$el.addClass("widget-#{name}") | |||
|
|||
# We need to translate global channels into their true uid here | |||
params.channels = channels_utils.translateGlobalChannels(params.channels) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@skidding and @topliceanu - I had to move translation here, because widget_starter waits for the channels to be initialized (have data) before initializing the widget. Therefore, the widget will never know that it had GLOBAL channels in the first place! The only one to know will be widget_starter, which seems reasonable - it's the intermediate layer between asking for a widget to be initialized and the widget initialization.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! gg for making optional effort :)
#96