Where communities thrive


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

    greenkeeper[bot] on steal-2.2.4

    chore(package): update steal to… (compare)

  • Oct 21 18:27
    greenkeeper[bot] labeled #5392
  • Oct 21 18:27
    greenkeeper[bot] opened #5392
  • Oct 21 18:27

    greenkeeper[bot] on core-js-3.3.3

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

  • Oct 18 22:20
    greenkeeper[bot] labeled #5391
  • Oct 18 22:20
    greenkeeper[bot] opened #5391
  • Oct 18 22:20

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

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

  • Oct 18 19:08
    cherifGsoul labeled #5390
  • Oct 18 19:07
    cherifGsoul opened #5390
  • Oct 18 18:45
    greenkeeper[bot] labeled #5389
  • Oct 18 18:45
    greenkeeper[bot] opened #5389
  • Oct 18 18:45

    greenkeeper[bot] on can-observable-bindings-1.3.0

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

  • Oct 18 18:29

    matthewp on master

    Update dist for release (compare)

  • Oct 18 18:29

    matthewp on v6.1.3

    Update dist for release 6.1.3 (compare)

  • Oct 18 17:59

    matthewp on can-observable-array-1.0.2

    (compare)

  • Oct 18 17:59

    matthewp on master

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

  • Oct 18 17:59
    matthewp closed #5388
  • Oct 18 16:46
    greenkeeper[bot] labeled #5388
  • Oct 18 16:46
    greenkeeper[bot] opened #5388
  • Oct 18 16:46

    greenkeeper[bot] on can-observable-array-1.0.2

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

Leath Cooper
@IcculusC
well if you use a DefineMap it doesn't act as expected
Matthew Phillips
@matthewp
right
i forgot why exactly that was
Christopher Oliphant
@RALifeCoach
Also I had to use ViewModel in my component, not viewModel
Leath Cooper
@IcculusC
so maybe the distinction between an instance of Map vs DefineMap and vM vs V
M
Matthew Phillips
@matthewp
maybe we should just warn against using viewModel at all
Leath Cooper
@IcculusC
and a warning if you're using them wrong
also @matthewp good to see those new releases I banged my head against the wall over that expr.hash issue for 3 days before I decided to track it down... then you fix it on the same day lol
Matthew Phillips
@matthewp
ah, sorry
that stuff was broken for a little while
Leath Cooper
@IcculusC
was typing up a detailed issue for you and I went to check the line number and you'd fixed it
Matthew Phillips
@matthewp
I think you're right about viewModel vs ViewModel but I'm not sure what the solution is
can you post an issue in can-component?
Leath Cooper
@IcculusC
nah I was more amused than anything
yeah I'll recreate it and get some details
Christopher Oliphant
@RALifeCoach
Leath and I worked it out
Leath Cooper
@IcculusC
I think if you instantiate an instance of your DefineMap with viewModel it works
but if you just pass the constructor you extended it doesn't
Matthew Phillips
@matthewp
the problem is that can-component doesn't depend on DefineMap so it wouldn't have a way to detect that viewModel is a DefineMap
Christopher Oliphant
@RALifeCoach
But I do have questions regarding getting production ready when using StealJS.
Leath Cooper
@IcculusC
yeah I suppose there's no really good way to do that
without including them so you can do instanceof
and bloat dependencies
Matthew Phillips
@matthewp
yeah
Justin Meyer
@justinbmeyer

@IcculusC

and when I wa susing map I had to create an instance of the view model manually

what do you mean by that?
Christopher Oliphant
@RALifeCoach
I don’t want my production page retrieving 80 small files. Can CanJS and all my JS files be merged for production?
Justin Meyer
@justinbmeyer
generally speaking, one should not be using a single instance for every component
@matthewp that might not be entirely true anymore
we can probably take a good stab at it
Matthew Phillips
@matthewp
Justin Meyer
@justinbmeyer
with types.isConstructor
Leath Cooper
@IcculusC
let MyViewModel =DefineMap.extend({...});

Component.extend({
  tag: 'foo-tag',
  template: '<h3>bar</h3>',
  viewModel: new MyViewModel()
});
vs
  ViewModel: MyViewModel
bump so I can edit
Justin Meyer
@justinbmeyer
yeah, viewModel: new MyViewModel() is going to use only one instance for every foo-tag
Leath Cooper
@IcculusC
yeah, that's what I figured
Matthew Phillips
@matthewp
we can figure out some way to warn, i think it's a good thing to do
Leath Cooper
@IcculusC
which worked in the use case
Justin Meyer
@justinbmeyer
yeah, but if you have multiple foo-tag on the page
it's going to get weird
Leath Cooper
@IcculusC
yeah I figured, but it was just a single form with a single instnace of the view model per visit
I thought that may be the case
but never ran into the multiple instances of foo-tag yet
Christopher Oliphant
@RALifeCoach
Also if I do var map = new MyDefineMap() and there is an error in one of the sub-maps I can view map and see which one has an error. If I define MtDefineMap in the Component with ViewModel, then there is a nondescript error.
Leath Cooper
@IcculusC
would it be a reasonable solution to just put something on the define map like a boolean value that differentiates it from a normal map and check for it if it's passed into viewModel and warn from there?
then the object would have the value if it were a define map but wouldn't require component to include define map as a dependency
Justin Meyer
@justinbmeyer
@halcyonandon I saw your comments about vdom and such, but I'm not sure I understand them. A virtual DOM is any structure that isn't the actual dom, but can effectively represent the actual DOM. In the case of can-simple-dom, our DOM looks pretty similar to the actual DOM apis, but it's much faster. The similarity allows us to have things like jQuery mutate our virtual DOM.
Leath Cooper
@IcculusC
kind of a ghetto workaround but it keeps the bloat down and accomplishes something similar to using instanceof
Justin Meyer
@justinbmeyer
define map like a boolean value that differentiates it from a normal map and check for it if it's passed into viewModel and warn from there?