Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 01:04
    greenkeeper[bot] commented #5392
  • 01:04

    greenkeeper[bot] on core-js-3.5.0

    chore(package): update core-js … (compare)

  • Dec 11 18:34
    greenkeeper[bot] labeled #5444
  • Dec 11 18:34
    greenkeeper[bot] opened #5444
  • Dec 11 18:34

    greenkeeper[bot] on can-observable-mixin-1.0.7

    fix(package): update can-observ… (compare)

  • Dec 11 18:30

    cherifGsoul on update-infrastructure-page

    (compare)

  • Dec 11 18:30

    cherifGsoul on master

    Update infrastructure page with… (compare)

  • Dec 11 18:30
    cherifGsoul closed #5441
  • Dec 11 18:30
    cherifGsoul closed #5417
  • Dec 10 17:40
    cherifGsoul review_requested #5443
  • Dec 10 16:47
    cherifGsoul review_requested #5441
  • Dec 10 16:35
    cherifGsoul synchronize #5441
  • Dec 10 16:35

    cherifGsoul on update-infrastructure-page

    Fix typos (compare)

  • Dec 10 10:01
    jkeruzec starred canjs/canjs
  • Dec 09 18:59
    cherifGsoul review_requested #5443
  • Dec 09 18:59
    cherifGsoul opened #5443
  • Dec 09 18:51

    cherifGsoul on document-inserted-removed-can6

    Add inserted/removed events to … (compare)

  • Dec 09 15:38
    greenkeeper[bot] labeled #5442
  • Dec 09 15:38
    greenkeeper[bot] opened #5442
  • Dec 09 15:38

    greenkeeper[bot] on can-view-live-5.0.1

    fix(package): update can-view-l… (compare)

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
Christopher Oliphant
@RALifeCoach
@cherifGsoul I am missing something. Do I define the viewModel as a Map or DefineMap?
I have it as a Map and this.viewmodel.myProp = ‘some value’ isn’t working
Mohamed Cherif Bouchelaghem
@cherifGsoul
@RALifeCoach sorry I see your previous questions new
can-fixture yes is for testing and developing purpose to work on the frontend part withourt the API/server
Christopher Oliphant
@RALifeCoach
I was able to replace can-fixture with getData in can-connect
Mohamed Cherif Bouchelaghem
@cherifGsoul
ok
can-fixture is just to simulate ajax/api calls
Christopher Oliphant
@RALifeCoach
But I can’t get the viewModel updated from a component event unless I define my viewModel as a Map and then use this.viewModel.attr(‘prop’, ‘some value)
When I convert from a Map to a DefineMap, I can’t update it at all
Leath Cooper
@IcculusC
This message was deleted
Mohamed Cherif Bouchelaghem
@cherifGsoul
@RALifeCoach do use to 2.x Map with define plugin?
Leath Cooper
@IcculusC
I'm using DefineMap myself, and it works great, but I am using the this.viewModel.foo = "bar"; setters
Sunil George
@georgesunil81
A quick question - if I add some HTML dynamically to the DOM, I wanted to have the inline stache keys to resolve to values, is that possible? For example, if I do something like -
```
Mohamed Cherif Bouchelaghem
@cherifGsoul
@IcculusC if you are sure you can you open an issue?
Leath Cooper
@IcculusC
I'm not 100% sure
Christopher Oliphant
@RALifeCoach
I am using can-map installed via npm - that should be 3.0
Leath Cooper
@IcculusC
I mean it seems ridiculous... it's failing 5 tests and it's completely broken