These are chat archives for canjs/canjs

10th
Jul 2017
Frank Lemanschik
@frank-dspeed
Jul 10 2017 00:03
ah thats a behavier
Eben
@eben-roux
Jul 10 2017 13:39
lol... yeah thanks Frank but I figured as much :)
any idea which behaviour I'm missing or perhaps which behaviour is misbehaving?
Mike 'mitch' Mitchel
@mikemitchel
Jul 10 2017 15:05
morning all. is there a big performance difference between #eq prop1 prop2 in a stache, or making a new prop like isEqualStuff and then doing #if isEqualStuff in the stache?
this is iterating over a list in canjs2.3 to highlight an active item in the list
so really, is it faster to do the logic in a single viewModel prop to get a boolean vs comparing 2 props in the stache?
Gregg Roemhildt
@roemhildtg
Jul 10 2017 15:13
probably not too much difference, here's the helper that's called when you use eq or is
I use #is to do what you're describing
Mike 'mitch' Mitchel
@mikemitchel
Jul 10 2017 15:15
thanks @roemhildtg
Gregg Roemhildt
@roemhildtg
Jul 10 2017 15:16
I think the performance also depends on whether your using {{#each items}} or {{#items}} In this case you'd want to use {{#each items}}
That is if your items might change. Otherwise, if your items won't change you would use {{#items}}
Mike 'mitch' Mitchel
@mikemitchel
Jul 10 2017 15:19
using #each as they do change - it’s a basically a list of files that can grow or shrink depending on the user
Gregg Roemhildt
@roemhildtg
Jul 10 2017 15:20
:+1:
Mike 'mitch' Mitchel
@mikemitchel
Jul 10 2017 15:20
i might also be able to cache the last active item, so that it doesn’t have to figure out it again until a change happens
i’ll test with #is maybe just to see if there is any noticable change
just to satisfy a curiosity
Eben
@eben-roux
Jul 10 2017 15:33
I did an update recently and now the following warning is logged: WARN: DefineMap::attr shouldn't be called
Does this look familiar at all? Could just be something I'm buggering up again...
Gregg Roemhildt
@roemhildtg
Jul 10 2017 15:39
I've seen a lot of those too
Eben
@eben-roux
Jul 10 2017 15:55
Anyone have any idea why my can-connect call would serialize as a parameter string. The funny thing is it still stays a parameter string even with super-map. Even funnier thing is that I have another model that works via super-map. I'm confused :(
Eben
@eben-roux
Jul 10 2017 17:43
mmm... seems as though jQuery decides it needs to be a parameter string... odd
Dovid Bleier
@dbleier
Jul 10 2017 20:05
I have some all-in-one single file components that I need to turn on leakscope. is that possible? And if so, how?
Kevin Phillips
@phillipskevin
Jul 10 2017 20:15
yeah, you can add a leak-scope attribute to the tag
Dovid Bleier
@dbleier
Jul 10 2017 20:19
thanks that did it
this does not seem to be documented in the standard can3 docs
Kevin Phillips
@phillipskevin
Jul 10 2017 21:49
.component files are just handled by done-component
it's not a feature of canjs
Runn Vermel
@runn-vermel
Jul 10 2017 21:59
Hi Guys - i'm trying to do a build, and it's failing, as my build can't find the can-observation/reader/reader.js file - it looks like it was removed in version 3.3.0?
this seems like a backward breaking change, that should go into 4.0.0 instead of just doing a minor
has anyone else run into this?
this file is used by many canjs libraries, such can-connect, can-define, can-map...
Frank Lemanschik
@frank-dspeed
Jul 10 2017 22:17
@phillipskevin but can-component is still valid and is a future of canjs that also works with component files
and any extension
Kevin Phillips
@phillipskevin
Jul 10 2017 22:18
I'm not sure what you mean @frank-dspeed
Frank Lemanschik
@frank-dspeed
Jul 10 2017 22:18
you sayed befor to a user that done-component handels component files
and its not a future of canjs
Kevin Phillips
@phillipskevin
Jul 10 2017 22:19
.component files
Frank Lemanschik
@frank-dspeed
Jul 10 2017 22:19
and i am sure thats not right as can-component is a canjs feature
yes
that works with can-component as this supports anyfile type
even .component
Kevin Phillips
@phillipskevin
Jul 10 2017 22:19
but .component files do not work without done-component
Frank Lemanschik
@frank-dspeed
Jul 10 2017 22:19
i think its also what done-component uses as dependency under the hood
Kevin Phillips
@phillipskevin
Jul 10 2017 22:20
that's all I was saying
Frank Lemanschik
@frank-dspeed
Jul 10 2017 22:21
hmmm ok i watched into the syntax
your right
its only similar but not the same
Kevin Phillips
@phillipskevin
Jul 10 2017 22:21
it gets translated to can-component but the plugin
Frank Lemanschik
@frank-dspeed
Jul 10 2017 22:21
why isn't that the exact same syntax wouldn't that be great?
for reusing that
Kevin Phillips
@phillipskevin
Jul 10 2017 22:22
what?
Frank Lemanschik
@frank-dspeed
Jul 10 2017 22:22
do you think i can open a proposal to make that the same ?
.component files and can-component syntax
i think that would be great
Kevin Phillips
@phillipskevin
Jul 10 2017 22:22
what would be the purpose then?
Frank Lemanschik
@frank-dspeed
Jul 10 2017 22:23
the .component examples can be used in donejs and canjs
so we could make examples that look same
easyer exchange and sharing of code
because its compatible
Kevin Phillips
@phillipskevin
Jul 10 2017 22:23
wouldn't that just be can-component?
Frank Lemanschik
@frank-dspeed
Jul 10 2017 22:23
right we should use that as donejs default
and no done-component
Kevin Phillips
@phillipskevin
Jul 10 2017 22:24
so just deprecate done-component?
Frank Lemanschik
@frank-dspeed
Jul 10 2017 22:24
what is the purpose of a done-component
Kevin Phillips
@phillipskevin
Jul 10 2017 22:24
I think a lot of people like done-component
Frank Lemanschik
@frank-dspeed
Jul 10 2017 22:24
we can convert that
we could do a done-component loader
that detects syntax
and accepts also directly can-component syntax
i think we should put effort into making donejs not diffrent from canjs
it should be only tooling
then more people could understand and use it
Kevin Phillips
@phillipskevin
Jul 10 2017 22:27
do you think done-component is difficult to understand?
Frank Lemanschik
@frank-dspeed
Jul 10 2017 22:27
no it isn't
but some people look into canjs api and done stuff
and if its not the same
its wirred
it makes overall no sense
both syntaxes are similar good to understand i think
Kevin Phillips
@phillipskevin
Jul 10 2017 22:28
ok
Frank Lemanschik
@frank-dspeed
Jul 10 2017 22:29
so you agree a proposal about that could be usefull
does it make sense out of your view?
Kevin Phillips
@phillipskevin
Jul 10 2017 22:29
I agree we should make the documentation easier to find
Frank Lemanschik
@frank-dspeed
Jul 10 2017 22:29
because if not i don't need to do it
the others are more hard :)
Kevin Phillips
@phillipskevin
Jul 10 2017 22:29
but I think done-component is useful
so I don't think getting rid of it is the solution
Frank Lemanschik
@frank-dspeed
Jul 10 2017 22:30
sure i mean we don't deprecate it we make it a loader so it understands even can-component ?
Kevin Phillips
@phillipskevin
Jul 10 2017 22:30
done-component is a stealjs plugin
I don't know what you mean I guess
Frank Lemanschik
@frank-dspeed
Jul 10 2017 22:30
then all are happy
ok
i understood it wrong was my fail
sorry :)
but i aggree i looked into that
on the donejs page is no documentation about done-component
Kevin Phillips
@phillipskevin
Jul 10 2017 22:35
yeah, I agree, that's a problem
but not easy to find
Frank Lemanschik
@frank-dspeed
Jul 10 2017 22:35
not really
only the last part talks about .comonent files
Kevin Phillips
@phillipskevin
Jul 10 2017 22:36
yeah
Frank Lemanschik
@frank-dspeed
Jul 10 2017 22:36
but nothing about done-component
not a single word
the term don't comes up
it needs a extra link
Kevin Phillips
@phillipskevin
Jul 10 2017 22:36
yeah
Frank Lemanschik
@frank-dspeed
Jul 10 2017 22:36
maybe under stealjs
?
or we could add doneJs
as we could document done-autorender
done-component
Kevin Phillips
@phillipskevin
Jul 10 2017 22:37
yeah, I think adding a link in that APIs page is a good idea
maybe just make the .component a link to the done-component readme
Frank Lemanschik
@frank-dspeed
Jul 10 2017 22:38
done-css
and done-serve could be documented there also
no i think we need under API's
a group doneJS
where we put in the done-* modules
so the people understand what donejs does diffrent
and how it does that
it would eliminate the so called black hole issue
that some people get :)
Kevin Phillips
@phillipskevin
Jul 10 2017 22:39
the whole page is DoneJS APIs
Frank Lemanschik
@frank-dspeed
Jul 10 2017 22:40
you can't really say every new user should read and understand all done-packages befor using them
Kevin Phillips
@phillipskevin
Jul 10 2017 22:40
no one is saying that
Frank Lemanschik
@frank-dspeed
Jul 10 2017 22:40
are some done-* apis but i think we need a donejs point
and remove ssr from there
and add that there under done-ssr
Kevin Phillips
@phillipskevin
Jul 10 2017 22:41
ok
submit an issue / PR
Frank Lemanschik
@frank-dspeed
Jul 10 2017 22:41
then all is clean
Kevin Phillips
@phillipskevin
Jul 10 2017 22:41
I gotta run
Frank Lemanschik
@frank-dspeed
Jul 10 2017 22:41
ok thanks for brainstorming
Kevin Phillips
@phillipskevin
Jul 10 2017 22:41
:thumbsup: you too