Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 22 21:54

    phillipskevin on master

    Update dist for release (compare)

  • Jan 22 21:54

    phillipskevin on v6.3.0

    Update dist for release 6.3.0 (compare)

  • Jan 22 21:49
    greenkeeper[bot] closed #5457
  • Jan 22 21:49

    greenkeeper[bot] on can-dom-mutate-2.0.8

    (compare)

  • Jan 22 21:49

    phillipskevin on master

    pinning can-dom-mutate dependen… (compare)

  • Jan 22 21:46

    greenkeeper[bot] on @octokit

    (compare)

  • Jan 22 21:41

    greenkeeper[bot] on @octokit

    chore(package): update @octokit… (compare)

  • Jan 22 21:34

    phillipskevin on update-deps

    (compare)

  • Jan 22 21:32

    phillipskevin on master

    Update major packages to sync c… Update to latest patch releases… Fix steal imports to be inexact and 6 more (compare)

  • Jan 22 21:32
    phillipskevin closed #5451
  • Jan 22 21:02
    bmomberger-bitovi synchronize #5451
  • Jan 22 21:02

    bmomberger-bitovi on update-deps

    Update can-control to latest (compare)

  • Jan 21 14:21
    frank-dspeed commented #5460
  • Jan 21 14:13
    frank-dspeed commented #5460
  • Jan 21 14:12
    frank-dspeed commented #5460
  • Jan 21 14:10
    frank-dspeed commented #5460
  • Jan 21 13:37
    jvkdev starred canjs/canjs
  • Jan 21 13:36
    justinbmeyer commented #5460
  • Jan 21 06:45
    frank-dspeed commented #5460
  • Jan 21 06:42
    frank-dspeed edited #5460
Sunil George
@georgesunil81
```
WARN: can/view/stache/mustache_core.js: Unable to find key or helper "client.firstName".
Although the client.firstName shows up on screen, then why is the warning message thrown?
Also, how can I prevent these stache warning messages from showing up in the logs!?
Matthew Phillips
@matthewp
there's a can.dev.logLevel you can set
set it to 2 I think to turn those off
Sunil George
@georgesunil81
Thanks @matthewp for your inputs. I will check on the logLevel property.
Any idea why these warning messages would come up in the first place. Is it because the key is not set on scope when the stache is rendered, but is then later and that is why is shows up on screen?!
Christopher Oliphant
@RALifeCoach
I have created a simple connect (in 3.0) for performing a get. The connect code is:
connect([
    require('can-connect/data/url/url'),
    require('can-connect/constructor/constructor'),
    require('can-connect/can/map/map')
], {
    Map: Players,
    url: config.playersUrl
});
playersUrl is playersUrl: '/modules/page.players-redesign/player-bio/data/players.json’
When I run the code and check the network request, it is asking for "http://localhost:8090/modules/page.players-redesign/player-bio/null?"
can I issue a get on a json file? does a get have to have id data provided?
Here is my get:
           Players.get({}).then($.proxy((data)=>{
                console.log(data);
                this.onPlayersData(data);
            })).catch((err)=>console.log(err));
Matthew Phillips
@matthewp
@georgesunil81 that's exactly why you get the warnings
if you give them an initial value the warnings will go away
Sunil George
@georgesunil81
Thanks so much @matthewp. Will do.
Another hopefully quick question - I am trying to use jquery to scroll to the bottom of my div like below -
$("#message-thread-panel").animate({ scrollTop: $('#message-thread-panel').prop("scrollHeight")}, 1);
Sunil George
@georgesunil81
The div is inside a stache file that gets populated by scope variables (which in turn get populated via API calls). The problem I am facing is that the scroll sometime works and sometimes it does not. It seems that I need to execute the jquery statement only when the div is completed population. How do I wait for the stache variables to update the view and then execute the above jquery statement?
Matthew Phillips
@matthewp
Listen to the change in the events
if it's a list something like '{viewModel list} length': function() { ... }
where list is the viewModel's list property
whatever the name of that property is
this will execute when the length changes
so you can do your animation there
probably best in a requestAnimationFrame
Sunil George
@georgesunil81
Thanks @matthewp . I guess the '{viewModel list} length': function() { ... } would get called once the stache is rendered completely with all the list items. If that is the case, the animation method will indeed get the correct div height (which depends on the number of list items).
Christopher Oliphant
@RALifeCoach
Any comments on my issue?
Christopher Oliphant
@RALifeCoach
@Bajix @cherifGsoul @matthewp Any help is much appreciated.
Mohamed Cherif Bouchelaghem
@cherifGsoul
@RALifeCoach use can-fixture
Christopher Oliphant
@RALifeCoach
Is there a 3.0 version of can-fixture?
Mohamed Cherif Bouchelaghem
@cherifGsoul
yes
the docs show how to use it with a json file
Christopher Oliphant
@RALifeCoach
const Players = Map.extend({
    define: {
        header: {
            Type: Object
        },
        plrs: {
            Type: Object
        }
    }
});

connect([
    require('can-connect/data/url/url'),
    require('can-connect/constructor/constructor'),
    require('can-connect/can/map/map')
], {
    Map: Players,
    url: '/players'
});

fixture("GET /players", config.playersUrl);

export default Players;
Here is what I tried, but the results are the same.
Mohamed Cherif Bouchelaghem
@cherifGsoul
Christopher Oliphant
@RALifeCoach
Is it expecting an ‘id’ for a get?
Christopher Oliphant
@RALifeCoach
I tried your suggestion and it didn’t work. I then added {id: ‘id’} in the get command. Now it is working.
That means I will have to have can-fixture into Production?
Leath Cooper
@IcculusC
when someone is available can I get a second set of eyes on something, I think I discovered and fixed a bug in can-stache-bindings
Leath Cooper
@IcculusC

it looks like when a function is called from a binding like

<button type="button" ($click)="clickHandler()">Click Me</button>

it doesn't differentiate a Helper expression type (from can-stache/src/expression) from a Call expression type and tries to call a function which exists on the Helper, but not the Call

Christopher Oliphant
@RALifeCoach
This message was deleted
Christopher Oliphant
@RALifeCoach
I am figuring out can-connect - it is working quite nicely
Christopher Oliphant
@RALifeCoach
I have a viewModel defined as a DefineMap that I then include in a component. How do I reference/update the elements in the viewModel? In 2.3 I used this.viewModel.attr(). What do I do in 3.0?
Christopher Oliphant
@RALifeCoach
@cherifGsoul @matthewp @Bajix ^^
Mohamed Cherif Bouchelaghem
@cherifGsoul
@RALifeCoach in 3.0 view models are attrless
this.viewModel.yourProp
Leath Cooper
@IcculusC
@cherifGsoul could you possibly run the tests on can-stache-bindings@3.0.0-pre.5 and tell me if you see them passing?
pretty sure it's fubar