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
Nico R.
@nriesco

I guess this is really easy, but I got stucked. I’m getting a list of elements using the classical:

   cardPromise: {
      get: function() {
        return Card.getList({ active: true });
      }
    },

The thing is that I’m sorting the “Cards” in the API server but when I change the order (order is actually a property of a Card element) the actual position of the element is not changed or re-sorted until I reload the page. I would like to add some sorting so if that value changes it will sort the Card elements again. I read this: https://v2.canjs.com/docs/can.List.plugins.sort.html but just couldn’t apply it to my promise-scheme.

in the model I tried this:

Story.List = can.List.extend({
  Map: Story,
  comparator: 'order'
}, {});

and this:

Story.List = can.List.extend({
  Map: Story
}, {}).attr("comparator", 'order’);
Nico R.
@nriesco
that was the closest I got to the example syntax shown in https://v2.canjs.com/docs/can.List.plugins.sort.html
var people = new can.List([
    {name: "Alexis", num: 4, age: 88},
    {name: "Brian", num: 2, age: 31},
    {name: "Mihael", num: 3, age: 25},
    {name: "Curtis", num: 5, age: 15},
    {name: "David", num: 6, age: 55},
  ]).attr("comparator","num”);
Matthew Phillips
@matthewp
@justinbmeyer We should stop encouraging people to use it then.
Frank Lemanschik
@frank-dspeed
@matthewp cant we simply stop all this pre stuff is pre realy needed
cant the api's be defined and hold stable
its only interface related most time
i think its often totally clear what a component aka module takes and this can be defined as the modules api version
then no changes to the api version needed most times for long long time
and the code versions can be treated in a totall indipenedent way
I know this concepts from realy big applcations like Linux Distributions
there we keep api/abi versions seperated for every module aka application aka package :)
Thomas Sieverding
@Bajix
@frank-dspeed you around?
Matthew Phillips
@matthewp
Hey @pYr0x did you work on an issue to make can-component work with regular elements?
Justin Meyer
@justinbmeyer
@matthewp encourage what people to use what? devs publish alpha, users use pre?
Matthew Phillips
@matthewp
we could do it a couple of ways
one is release in order, alpha, beta, etc.
create a new one when making a breaking change
or we could tell people that when using a prerelease version, always pin to a specific version and don't use the ^ range
or ~ or anything else
I think either are reasonable as long as we are clear about it
Julian
@pYr0x
@matthewp no i didn't
Julian
@pYr0x
@matthewp you talk about that issue canjs/can-component#10 ?
Matthew Phillips
@matthewp
@pYr0x this one: canjs/can-stache#15
Julian
@pYr0x
oh yes. i working on that
or justin made it and i make the code cleaning and refacotrying and tests
Frank Lemanschik
@frank-dspeed
@Bajix sorry
was not looking here into the chat why did you not use skype directly
Thomas Sieverding
@Bajix
@frank-dspeed I’ve just been distracted. I’ll follow up with you
Frank Lemanschik
@frank-dspeed
@Bajix sure no problem take your time i am around next hours
Gregg Roemhildt
@roemhildtg
Hey everyone, I was wondering about potential template performance costs. Is there any major costs to using partial templates vs rendering one big template? For example, if I have split up a page into multiple partials, or have a table where each row is a partial versus putting all of that into one single file template. Does that make sense?
We can also assume that all of the partial template files will eventually be bundled using steal so there won't be any network performance issue in loading the extra partial tempates
Thomas Sieverding
@Bajix
What's wrong with this set algebra? I want it to be included if both sets have the same prop values, otherwise excluded. So something such as { a: 5, b: 3 } shouldn't match { a: 5 }
function( aVal, bVal, a, b, prop, algebra ) {
  if (a[prop] === b[prop]) {
    if (aVal === b[prop]) {
      return {
        intersection: aVal
      };
    }
  }

  return {
    difference: aVal
  };
}
I want to omit results matching a=5 & b=3 from sets with a=5
Sunil George
@georgesunil81
I have a quick question regarding CanJS models. I need to merge the responses from to or more API calls and return them as a single response. Specifically, once I get the response from API-A, I want to parse the response and make a call to API-B for each of the response-records from API-A. I was thinking of using parsemodels for this. Anyone has any ideas or come across this need? Please let me know.
Gira Minus
@gKreator
Canjs 3?
Sunil George
@georgesunil81
Canjs 2.3.24
Gira Minus
@gKreator
honestly the best thing to do instead of having a possibility of 100 ajax calls happening... just have your api spit out the model pre factored
/api/a/?include_api_b=1
Sunil George
@georgesunil81
@gKreator that is the issue. I have no control over the backend. They are fine with 100 calls happening though (I made sure that they know that).
So now, I am trying to figure out how to do it in CanJS
Let me know if you have any ideas?
Gira Minus
@gKreator
yeah happens
pretty much just write your own callback for the findAll function and have all your ajax calls there... just be careful with all the deffered methods
Sunil George
@georgesunil81
Ah @gKreator, thanks for the link, it looks like it will allow merging across APi calls.
Chasen Le Hara
@chasenlehara
@Bajix, did you figure out the set algebra?
Thomas Sieverding
@Bajix
No, it didn’t seem like difference was working
Chasen Le Hara
@chasenlehara
cc @justinbmeyer
Matthew Phillips
@matthewp
@roemhildtg Don't know the performance diff, probably very little.