Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 15 21:43

    phillipskevin on master

    Update dist for release (compare)

  • Oct 15 21:43

    phillipskevin on v6.1.1

    Update dist for release 6.1.1 (compare)

  • Oct 15 21:34

    phillipskevin on can-observable-mixin-1.0.2

    (compare)

  • Oct 15 21:34

    phillipskevin on master

    fix(package): update can-observ… Merge branch 'master' into gree… Merge pull request #5382 from c… (compare)

  • Oct 15 21:34
    phillipskevin closed #5382
  • Oct 15 21:34

    phillipskevin on can-make-map-1.2.2

    (compare)

  • Oct 15 21:34

    phillipskevin on master

    fix(package): update can-make-m… Merge pull request #5380 from c… (compare)

  • Oct 15 21:34
    phillipskevin closed #5380
  • Oct 15 20:30
    phillipskevin synchronize #5382
  • Oct 15 20:30

    phillipskevin on can-observable-mixin-1.0.2

    fix(package): update can-observ… fix(package): update can-simple… Merge pull request #5372 from c… and 2 more (compare)

  • Oct 15 20:30
    phillipskevin opened #5382
  • Oct 15 20:28

    phillipskevin on can-simple-map-4.3.3

    (compare)

  • Oct 15 20:28

    phillipskevin on master

    fix(package): update can-simple… Merge pull request #5378 from c… (compare)

  • Oct 15 20:28
    phillipskevin closed #5378
  • Oct 15 20:26

    phillipskevin on can-observable-mixin-1.0.1

    (compare)

  • Oct 15 20:26

    phillipskevin on master

    fix(package): update can-observ… Merge pull request #5372 from c… (compare)

  • Oct 15 20:26
    phillipskevin closed #5372
  • Oct 15 20:25

    phillipskevin on update-make-map

    (compare)

  • Oct 15 20:25
    phillipskevin closed #5381
  • Oct 15 20:21
    phillipskevin opened #5381
Matthew Phillips
@matthewp
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
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 -
```