These are chat archives for canjs/canjs

27th
Jan 2017
Guido Smeets
@gsmeets
Jan 27 2017 10:10
@justinbmeyer @matthewp if I port the %arguments event binding to 2.3, will you accept that as a pull request?
it's excruciatingly annoying that it's missing, and I'm still a few months off from upgrading our entire 2.3 codebase to 3.0
Frank Lemanschik
@frank-dspeed
Jan 27 2017 10:14
@gsmeets could you create a proposal for this in the CanJS Repo?
Guido Smeets
@gsmeets
Jan 27 2017 10:15
aye
Frank Lemanschik
@frank-dspeed
Jan 27 2017 10:15
Simply Subject Proposal Copy paste relevant parts in and then we can vote for that
and discusse that with the whole core team
thanks and as far as i can see i would have no problem with it :)
maybe this can also be added to the new stache v4 syntax
Guido Smeets
@gsmeets
Jan 27 2017 10:16
is the syntax being changed again?
yikes
Frank Lemanschik
@frank-dspeed
Jan 27 2017 10:16
justin will tell us more if that fits in maybe it even is related to can-stache only not canjs directly
but canjs is a good place to start and yes there are bigger plans to extend the can-stache api (syntax) in v4
to support better bindings and cases and that
your proposal will flow into that
Guido Smeets
@gsmeets
Jan 27 2017 10:18
is that accessible somewhere? or is that still internal at bitovi?
Frank Lemanschik
@frank-dspeed
Jan 27 2017 10:18
but 2.3 only gets updates i think
so it is also save that you fork it
but also still make a proposal so we know the case for future :)
canjs/can-stache#151
here for your reference the issue about new syntax
@gsmeets
Guido Smeets
@gsmeets
Jan 27 2017 10:22
thx
Frank Lemanschik
@frank-dspeed
Jan 27 2017 10:23
And i am not a bitovi worker would love to be one but i am only a Self Employed :)
i love this project and the people doing it so i use it as often as i can :) and also try to make it fit my needs
i only get such infos from the public contributors meetings on youtube
if your interrested you could watch them also they happen on fridays and they are a fix part of my friday day schedule :)
Guido Smeets
@gsmeets
Jan 27 2017 10:24
I hear you ;) our flagship product is slowly being converted to an SPA based on canjs
Frank Lemanschik
@frank-dspeed
Jan 27 2017 10:25
Ok nice :) if you need help i always need paying costumers :)
i saw you talked about .NET code i could help you to replace it with NodeJS code ;)
Guido Smeets
@gsmeets
Jan 27 2017 10:27
heh, no thx
I like C# for my server
node is a mess imo ;)
Frank Lemanschik
@frank-dspeed
Jan 27 2017 10:28
It isn't
i did sites facing 4mio uniq visitors a day
:)
NodeJs isn't simply forcing your do code the right way but if you know what your doing its amazing!
Guido Smeets
@gsmeets
Jan 27 2017 10:29

but if you know what your doing its amazing!

that goes for almost every language ;)

Frank Lemanschik
@frank-dspeed
Jan 27 2017 10:29
and with its nativ C bindings you know :)
Guido Smeets
@gsmeets
Jan 27 2017 10:29
meh, I do have colleagues with near 0 knowledge of js you know ;)
Frank Lemanschik
@frank-dspeed
Jan 27 2017 10:29
you can put all realy havy parts into C or even more future CUDA !
i last time coded some stuff utiling havy Math in CUDA it was More then Amazing
CUDA let you Run C Code on GPU's of your graphic card wich hare realy high parallel processing
You can replace 100 + servers when we talk only about CPU Usage with simply 1 Server and a good Graphic Card
Guido Smeets
@gsmeets
Jan 27 2017 10:32
and all that still doesn't help me one bit dealing with complex business requirements in our problem domain
our toughest problems aren't technical ;) they're domain related
Frank Lemanschik
@frank-dspeed
Jan 27 2017 10:32
Line out the complex stuff private
i will give you free solutions for that
Guido Smeets
@gsmeets
Jan 27 2017 10:32
anyway, all of this is not related to canjs ;)
Frank Lemanschik
@frank-dspeed
Jan 27 2017 10:32
i am not only can JS :)
i am doing mainly a Xamarin Clone
if you know them
as a C# coder your probally do :)
but i depend on JavaScript
So i address FullStack App Development, Full Cycle, Also Backend and Database Stuff.
CanJs is only a little part of the tool chain
my problem domain was creating complex applications in less time with even only a single developer
Frank Lemanschik
@frank-dspeed
Jan 27 2017 10:37
Oh and about your comment thats why we do that in can 4 that it will probally get a totall diffrent name as you probally readed already :D

I think the goal of can-stache 4.0 should be:

Called something other than can-stache. This will allow us to put it in ecosystem, making it part of CanJS 3.0. Eventually it can be moved into core.

so it will not be called can-stache@4*
Jeroen Cornelissen
@jeroencornelissen
Jan 27 2017 13:48
How do you guys fit the <can-import />-tags in your css?
They mess up my flexbox styles, so I’m kind of forced not to use can-import in our stache files...
Jeroen Cornelissen
@jeroencornelissen
Jan 27 2017 14:09

If I use it like this:

<can-import from="~/themes/themes" />
<kp-themes class="smscMain smscMain--tb-main">themes</kp-themes>

It doesn't matter because <can-import />has no height and <kp-themes /> component has a `flex-grow: 1.

But I can’t use it like this:

<can-import from="~/themes/themes">
    {{#if isResolved}}
        <kp-themes class="smscMain smscMain--tb-main">themes</kp-themes>
    {{else}}
        <div>Loading...</div>
    {{/if}}
</can-import>
Matthew Phillips
@matthewp
Jan 27 2017 15:12
@jeroencornelissen if you display: none it does it fix it?
if so that's something we should fix in the library
to automatically do that
Jeroen Cornelissen
@jeroencornelissen
Jan 27 2017 15:23
display:none also makes the content of <can-import/> invisible so that doesn't help
Matthew Phillips
@matthewp
Jan 27 2017 15:25
oh, you're saying that it works in the static form but doesn't in the dynamic
is that because the parent of can-import is a display: flex ?
and kp-themes is a flex: N ?
Jeroen Cornelissen
@jeroencornelissen
Jan 27 2017 15:28
Yes and yes.
The parent is a display: flex, and kp-themes is a flex: 1;
Matthew Phillips
@matthewp
Jan 27 2017 15:28
got it
just wanted to understand the issue better
Jeroen Cornelissen
@jeroencornelissen
Jan 27 2017 15:31
if I do something like this it could work, but feels wrong.
can-import.make-it-flex {
  display: flex;
  flex-grow: 1;
}
<can-import from="~/themes/themes” class=“make-it-flex”>…</can-import>
Matthew Phillips
@matthewp
Jan 27 2017 15:34
that's the idea that i had
i don't think that's necessarily wrong, can-import is an element like any other
understand what you mean of course
oh, another idea
<can-import from="~/themes/themes" {^.}="*themesPromise"></can-import>
{{#if *themesPromise.isResolved}}
        <kp-themes class="smscMain smscMain--tb-main">themes</kp-themes>
    {{else}}
        <div>Loading...</div>
    {{/if}}
or something like that
you should be able to bind to the can-import promise
and if it's not self-closing it will be progressively imported
basically taking your approach but pulling out the conditional
Jeroen Cornelissen
@jeroencornelissen
Jan 27 2017 15:44
Thanks @matthewp , but I’ll stick with the helper class and not overcomplicating things :-)
I was just wondering how you guys handle these things.
Matthew Phillips
@matthewp
Jan 27 2017 15:44
:+1:
I haven't run into this case personally
i'd probably style the can-import too
Chasen Le Hara
@chasenlehara
Jan 27 2017 20:28
@gsmeets, if you could re-open that issue with any additional detail, that’d be great.
And just to be clear about what Frank was saying: the core team is starting to talk about how we can improve templating in CanJS, whether that’s a can-stache 4 release, or another project (similar to how we created can-define as an improved API over can-map and the define plugin).
We first started talking about it last week, and in the contributors meeting we said we would put out some info about what we want to improve. We’ll ask for proposals & feedback, then start making some decisions in March at the earliest.
There should be more info about all of this next week. 🙂