These are chat archives for canjs/canjs

8th
Feb 2018
Frank Lemanschik
@frank-dspeed
Feb 08 2018 03:42
hmmm i am wondering i planned to build a jquery can wrapper
as jquery only dispatches events and select elements
this functionality is already complet in canjs
it would even be possible to create something like can-ui a jquery-ui replacment using canjs methods
you can always do stuff like on:click="myHelperOrFunction(scope.element)"
to do something directly on this element and for your current expand all you can use also on:click="expendAll()"
sorry expand :)
Gregg Roemhildt
@roemhildtg
Feb 08 2018 14:11
How can I set the body class in donejs (canjs 4)? I've tried:
<body class:from="activeComponentProps.bodyClass"> and <body class="{{activeComponentProps.bodyClass}}">
Gregg Roemhildt
@roemhildtg
Feb 08 2018 14:18
I do see a warning: can-stache/expressions/helper.js: Unable to find helper "activeComponentProps.bodyClass". but I think thats because activeComponentProps is loaded async and not available right away.
Frank Lemanschik
@frank-dspeed
Feb 08 2018 18:49
@roemhildtg when your using can 4
this is a bug
Kevin Phillips
@phillipskevin
Feb 08 2018 19:07
what is the bug?
Frank Lemanschik
@frank-dspeed
Feb 08 2018 19:07
that it shows that it shows warnings
issue is open and you responded already
Kevin Phillips
@phillipskevin
Feb 08 2018 19:08
in some cases that warning is a false positive
but that wouldn't cause the class not to be set
Frank Lemanschik
@frank-dspeed
Feb 08 2018 19:08
in near all my log get flooded
i verifyed it with ported bitballs also
it renders it has values
its technical working i investigated days
Kevin Phillips
@phillipskevin
Feb 08 2018 19:08
in @roemhildtg's case, it sounds like it doesn't
Frank Lemanschik
@frank-dspeed
Feb 08 2018 19:09
oh thats wrong it renders
i talked with him
we have the same issue we discussed it befor here in the channel
Gregg Roemhildt
@roemhildtg
Feb 08 2018 19:09
Oh sorry guys. Was off site for a while
Frank Lemanschik
@frank-dspeed
Feb 08 2018 19:09
then i told him to open that issue
or i am mixing it up?
@roemhildtg does it render?
Gregg Roemhildt
@roemhildtg
Feb 08 2018 19:10
The "class" doesn't render for some reason
Frank Lemanschik
@frank-dspeed
Feb 08 2018 19:10
oh ok
then this is a mixup from me!
Gregg Roemhildt
@roemhildtg
Feb 08 2018 19:10
I worked around the issue though, so its no longer an issue for me
Frank Lemanschik
@frank-dspeed
Feb 08 2018 19:10
ah perfect :+1:
i have good news the new streaming value prop will solve a lot of stuff
Gregg Roemhildt
@roemhildtg
Feb 08 2018 19:11
Yeah, I need to start looking into that
Frank Lemanschik
@frank-dspeed
Feb 08 2018 19:11
i think that is a good step forward
Gregg Roemhildt
@roemhildtg
Feb 08 2018 19:11
I do a ton of stuff with getters and promises that could probably be switched to value now
Frank Lemanschik
@frank-dspeed
Feb 08 2018 19:11
as that allows to do less logic in stache
Gregg Roemhildt
@roemhildtg
Feb 08 2018 19:11
First I need to convert all my value/Value's to Default/default
Frank Lemanschik
@frank-dspeed
Feb 08 2018 19:11
ya and you don't need to pass around so much values
it abstract this magic side effect dispatch event stuff
where no one knows why and how a component upgrades
because of the way can-define binds live values
i am so happy about this change
its not really 100% what i wanted but canjs is on a good way
:)
@phillipskevin by the way i solved the freezing errors and the link not working errors because of the event delegation :)
it was because it was not liking how i binded some stuff and defined values
Kevin Phillips
@phillipskevin
Feb 08 2018 19:15
that's good to hear
Frank Lemanschik
@frank-dspeed
Feb 08 2018 19:15
but cur.match still exist
and it happens if you hit something thats not a html element
and that happens because <html> is not a htmlElement
and if you ask for a example simply do a page that fills for example 8 rows and click under the 8 rows
and its done-ssr related
it don't happens when using development or production html
Kevin Phillips
@phillipskevin
Feb 08 2018 19:18
ok
Frank Lemanschik
@frank-dspeed
Feb 08 2018 19:18
you probally can solve it via binding only to body?
not to html?
the event delegation part?
are you familar with that event delegations stuff because else i can look into that
but if you already know that then you can do it more fast
and you could improve the false positiv warnings that are blocking the console because i have lists with a lot of propertys
Kevin Phillips
@phillipskevin
Feb 08 2018 19:54
Matthew is working on the false positives right now
I don't really have time to look into the event delegation issue
today
this is the issue you're talking about, right? canjs/can-dom-events#41
Frank Lemanschik
@frank-dspeed
Feb 08 2018 20:34
right
ah don't hurry it renders
the false positiv issue is more importent at present
as long as all renders at last i am happy :) for the moment
also my new can-connect makes me happy i only need to solve my production bundle edge case issue :)
Matthew Phillips
@matthewp
Feb 08 2018 21:08
canjs/can-stache#463
might fix the false positives (fixes at least one i found)
Frank Lemanschik
@frank-dspeed
Feb 08 2018 21:11
@matthewp Warning: the @steal module is not fully supported in optimized builds
Warning: the @loader module is not fully supported in optimized builds
does that mean that this @loader sugar don't works anymore?
or did it even work befor :) because i have newly implamented some functions with that
since then mys production build is broken but development loads utlra fast and well
or does that errors simply mean i need to explicit load and bundle steal.js inside the app?
Matthew Phillips
@matthewp
Feb 08 2018 21:27
@frank-dspeed let's take this discussion to #stealjs/steal if you don't mind
Frank Lemanschik
@frank-dspeed
Feb 08 2018 21:27
@matthewp it don't worked
it fixed nothing in my case was testing git
applications
├─┬ can-component@4.0.1
│ ├── can-stache@4.0.2  deduped (git+https://github.com/canjs/can-stache.git#e4c71d5bddd9fd511b0e4b64671b25bea54c2b5f)
│ └─┬ can-stache-bindings@4.0.5
│   └── can-stache@4.0.2  deduped (git+https://github.com/canjs/can-stache.git#e4c71d5bddd9fd511b0e4b64671b25bea54c2b5f)
├─┬ can-connect@2.0.1
│ └── can-stache@4.0.2  deduped (git+https://github.com/canjs/can-stache.git#e4c71d5bddd9fd511b0e4b64671b25bea54c2b5f)
├── can-stache@4.0.2  (git+https://github.com/canjs/can-stache.git#e4c71d5bddd9fd511b0e4b64671b25bea54c2b5f)
├─┬ can-stache-converters@4.0.1
│ └── can-stache@4.0.2  deduped (git+https://github.com/canjs/can-stache.git#e4c71d5bddd9fd511b0e4b64671b25bea54c2b5f)
├─┬ can-stache-route-helpers@0.1.3
│ └── can-stache@4.0.2  deduped (git+https://github.com/canjs/can-stache.git#e4c71d5bddd9fd511b0e4b64671b25bea54c2b5f)
├─┬ done-autorender@2.0.0-pre.12
│ └── can-stache@4.0.2  deduped (git+https://github.com/canjs/can-stache.git#e4c71d5bddd9fd511b0e4b64671b25bea54c2b5f)
├─┬ done-component@2.0.0-pre.1
│ └── can-stache@4.0.2  deduped (git+https://github.com/canjs/can-stache.git#e4c71d5bddd9fd511b0e4b64671b25bea54c2b5f)
└─┬ steal-stache@4.0.1
  └── can-stache@4.0.2  deduped (git+https://github.com/canjs/can-stache.git#e4c71d5bddd9fd511b0e4b64671b25bea54c2b5f)
dotted and undotted false positives all over
Matthew Phillips
@matthewp
Feb 08 2018 21:28
If you could create a jsbin and add to that issue we could debug it
That's how I fixed the bug I fixed
Frank Lemanschik
@frank-dspeed
Feb 08 2018 21:29
no
i tested your fix
thats what i am reporting i tested the fix you published 5 min ago
Matthew Phillips
@matthewp
Feb 08 2018 21:29
I understand
It doesn't fix your issue
Frank Lemanschik
@frank-dspeed
Feb 08 2018 21:29
i have prepared a bitball version using sqllite
if you want to reproduce that fast you can use my pr look into bitballs pr
add sqllite
it can be installed and started directly
npm install && donejs develop
you get false positives that are rendering correct
Matthew Phillips
@matthewp
Feb 08 2018 21:30
this one? donejs/bitballs#278
Frank Lemanschik
@frank-dspeed
Feb 08 2018 21:31
right
use that
Matthew Phillips
@matthewp
Feb 08 2018 21:31
k
Frank Lemanschik
@frank-dspeed
Feb 08 2018 21:31
its a rebased version to 4.0 already
also there is a issue
donejs/bitballs#318
that shows what you will get
and please as your here
i think the index.stache is wrong target should be dest
but i am not sure as it don't builds for me
donejs/bitballs#320
Gregg Roemhildt
@roemhildtg
Feb 08 2018 21:34
Woohoo! I found a bug I was trying to track down with can-slot! Anyone have time to take a look and make sure I'm not doing anything silly here? https://jsbin.com/xexeboviko/1/edit?html,js,output
open the browser console in chrome to see the error
Frank Lemanschik
@frank-dspeed
Feb 08 2018 21:37
i see the error
but i don't find the function thats causing it
the error is clear
a node should get removed thats not a child of that node
but why that happens and how is out of my scope
looks complex side effect using
do you think its a bug in can slot?
Gregg Roemhildt
@roemhildtg
Feb 08 2018 21:38
Its got to do with the data.assign too
data.assign triggers can.queues.batch
and then the dom gets updated which results in the error
Frank Lemanschik
@frank-dspeed
Feb 08 2018 21:39
i am wondering about why the slot is outside component
i think thats not a good thing
a slot is a part of a component
i am not sure if you can use it alone
Gregg Roemhildt
@roemhildtg
Feb 08 2018 21:39
can-slot is inside the component?
Frank Lemanschik
@frank-dspeed
Feb 08 2018 21:40
ah ya sorry
its inside the stache i see
Gregg Roemhildt
@roemhildtg
Feb 08 2018 21:42
has to do with if/else inside a can-slot/template
and can-queues
Frank Lemanschik
@frank-dspeed
Feb 08 2018 21:43
you should try out the new syntaxc
maxbe that don't happens with that
Gregg Roemhildt
@roemhildtg
Feb 08 2018 21:43
new syntax?
Frank Lemanschik
@frank-dspeed
Feb 08 2018 21:43
you don't need to do this stache stuff and append child stuff any more with 4.0
you can use directly can-component
it includes definemap and stache
and also autorenders
<home-page></home-page>
Matthew Phillips
@matthewp
Feb 08 2018 21:44
@frank-dspeed so I see 2 of these warnings
Frank Lemanschik
@frank-dspeed
Feb 08 2018 21:44
only 2
Matthew Phillips
@matthewp
Feb 08 2018 21:44
One is env.NODE_ENV, this needs a fix in done-autorender and it will go away
I'm going to fix that one
The other is "scope.root.loginSession.user.email".
Frank Lemanschik
@frank-dspeed
Feb 08 2018 21:45
no thats not importent
Matthew Phillips
@matthewp
Feb 08 2018 21:45
That's probably a bug
Frank Lemanschik
@frank-dspeed
Feb 08 2018 21:45
create a user
yes thats a bug if node env is not set
if it is set this don't shows
create a user and a tournament
you will see that it warns on any value
all the form data everything
but it will all work and render
Matthew Phillips
@matthewp
Feb 08 2018 21:46
ok
Frank Lemanschik
@frank-dspeed
Feb 08 2018 21:46
its simply that warning that is false
so the value is there but it warns its not in scope
it even complains about scope.root.values
that they are not there but it renders the {{scope*}}
Matthew Phillips
@matthewp
Feb 08 2018 21:47
i'll try to create some tests for these
I see a few different scenarios here
Frank Lemanschik
@frank-dspeed
Feb 08 2018 21:48
i don't even understand how that warning comes and works
where it looks and all that
so i can't do a lot about that i would need to understand stache parser probally
but i am sure its only a little thing but it needs to get found
as that worked befor relativ good
in 3.0