These are chat archives for canjs/canjs

29th
Dec 2017
batwork
@batwork
Dec 29 2017 16:42
I'm trying to use your youtube playlist-editor recipe. for some reason the signin button isn't working, it launches the auth window but then doesn't return anything. http://www.saistudy.com/b.html
Do I need to set a 'redirect uri' in my application settings @ google api?
Chasen Le Hara
@chasenlehara
Dec 29 2017 16:47
@batwork Did you register your own app with Google?
If so, I would try using the key in the guide, just to see if it’s a problem with the code or the api key.
Also, if you’ve implemented this part:
init: function() {
    var self = this;

    self.on("googleAuth", function(ev, googleAuth) {
      self.signedIn = googleAuth.isSignedIn.get();
      googleAuth.isSignedIn.listen(function(isSignedIn) {
        self.signedIn = isSignedIn;
      });
    });
  },
…then you can see if those callbacks get fired, if the arguments look right, etc.
DaveO
@DaveO-Home
Dec 29 2017 17:09
@phillipskevin @frank-dspeed - per our discussion on Nov 30, ES6 and can-component(can-map) and two-way binding not working. I ran into the same problem when I added the Rollup Bundler to my acceptance-tests demo. I'm using can/view/stache, see helpers.setJobTypeSelector in the demo. The Rollup prod build won't build but a test build will allow the app to run. You can see the problem on the tools page with the dropdown. I upgraded to stache@3.14.6 to make it at least compile-see setup.js under rollup....
batwork
@batwork
Dec 29 2017 17:12
@chasenlehara Yes I did register my app with Google. If the API credentials are not valid, then an error is logged. The problem here is that no error is logged, it successfully asks the user to login to their google account and grant my site permissions to modify their Youtube, but then nothing is returned. The code is copied exact from https://jsbin.com/havavonaji/1/edit and can be inspected.
Also, can't use original credentials as my domain isn't whitelisted.
Chasen Le Hara
@chasenlehara
Dec 29 2017 17:17
Ok, if the code is the same and it works with the guide’s credentials, then it must be something with how your app is set up
Sorry I am not familiar with how we set up the Google credentials for that tutorial :/
Gregg Roemhildt
@roemhildtg
Dec 29 2017 17:24
Is there an easy way to create a clone of an instance of an extended definemap?
I was thinking something like this?
            const Constructor = obj.constructor ? obj.constructor : DefineMap;
            this.clone = new Constructor(obj);
Basically, I want to find out what type of Definemap obj is, and create a new object with obj's properties
Chasen Le Hara
@chasenlehara
Dec 29 2017 17:31
Sounds similar to what we do for https://canjs.com/doc/can-connect-cloneable.html
I don’t think you’d want to take the same approach as that code, just similar concept.
Chasen Le Hara
@chasenlehara
Dec 29 2017 17:40
I think using constructor is reasonable; not sure if you’d want to pass obj or obj.get()
Gregg Roemhildt
@roemhildtg
Dec 29 2017 17:40
obj.get might work.