mozilla / remote-newtab

Remotely-hosted New Tab Page
https://mozilla.github.io/remote-newtab/src/
Mozilla Public License 2.0
15 stars 7 forks source link

page should request prefs when needed #192

Closed oyiptong closed 8 years ago

oyiptong commented 8 years ago

at some point during initialization, the page should request prefs from chrome by sending a REQUEST_PREFS message.

The message doesn't need to have a parameter, all the prefs are going to be sent back to content

k88hudson commented 8 years ago

There is an action called "getPrefs", it's just commented out becasue the WebIDL implementation was broken atm:

https://github.com/mozilla/remote-newtab/blob/master/src/components/Base/Base.js#L16

k88hudson commented 8 years ago

This is it here: https://github.com/mozilla/remote-newtab/blob/master/src/actions/PrefsActions.js#L6

The naming is a bit weird since it was a synchronous programmatic api, there wasn't really a point to having a request and response

marcoscaceres commented 8 years ago

My understanding from what I've read in my email is that we are not going to use the WebIDL stuff (in favor WebChannel.jsm)... or is that only for some things? I can go and fix prefs WebIDL code if it's broken if we still want it.

oyiptong commented 8 years ago

Hey @marcoscaceres. I think the code is still in transition. @k88hudson has some shims for testing and until the messaging code is ready, the plan is to use those.

The result is the same; the actions are sent to the reducers

marcoscaceres commented 8 years ago

@k88hudson @oyiptong, ok, np. Just let me know what you want me to do next... I'm currently working 3.5 hours/day for the next week or so while I recover (and get off the various :pill: :pill: :pill: :pill: :pill: :pill:s ).