Where communities thrive


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

    greenkeeper[bot] on @webcomponents

    (compare)

  • 01:42

    greenkeeper[bot] on @webcomponents

    chore(package): update @webcomp… (compare)

  • Nov 12 05:28
    greenkeeper[bot] commented #5392
  • Nov 12 05:28

    greenkeeper[bot] on core-js-3.4.1

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

  • Nov 11 18:03
    greenkeeper[bot] labeled #5422
  • Nov 11 18:03
    greenkeeper[bot] opened #5422
  • Nov 11 18:03

    greenkeeper[bot] on @feathersjs

    chore(package): update @feather… (compare)

  • Nov 11 18:02
    greenkeeper[bot] commented #5401
  • Nov 11 18:02

    greenkeeper[bot] on @feathersjs

    chore(package): update @feather… (compare)

  • Nov 10 23:39

    greenkeeper[bot] on @octokit

    (compare)

  • Nov 10 23:37

    greenkeeper[bot] on @octokit

    chore(package): update @octokit… (compare)

  • Nov 08 16:08
    greenkeeper[bot] labeled #5421
  • Nov 08 16:08
    greenkeeper[bot] opened #5421
  • Nov 08 16:08

    greenkeeper[bot] on can-stache-bindings-5.0.2

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

  • Nov 07 17:31

    cherifGsoul on 6-2-5-version

    (compare)

  • Nov 07 17:31
    cherifGsoul closed #5420
  • Nov 07 17:30

    cherifGsoul on master

    Update dist for release (compare)

  • Nov 07 17:28
    cherifGsoul edited as member
  • Nov 07 17:27
    cherifGsoul added as member
  • Nov 07 17:17
    cherifGsoul opened #5420
Kevin Phillips
@phillipskevin
this works ok:
viewCallbacks.attr("async-attr", el => {
    const attr = el.getAttribute("async-attr");
    const text = new SimpleObservable("initial value");

    setTimeout(() => {
        console.log("changing attribute");
        text.set("new value");
    }, 1000);

    viewLive.attr(el, attr, text);
});

Component.extend({
    tag: "test-sandbox",
    view: `
    <p async-attr="alt">{{ asyncText() }}</p>
  `
});
obviously it would be nicer if your helper could just return an observable
Kevin Phillips
@phillipskevin
I opened an issue @Lighttree: canjs/can-stache#585
Viktor Busko
@Lighttree

would it be possible to set up the attributes a different way?

Yep, I think as temporary solution this will work.

I opened an issue @Lighttree: canjs/can-stache#585

Great, thank you !

Guido Smeets
@gsmeets
anyone here that has experience optimizing stache templates? basically what I want to do is move some template stuff to helpers in order to reduce the number of extra scopes that are created. Specifically I want to be able to wrap a fragment inside another html snippet before returning it from a helper. (maybe @justinbmeyer or @matthewp ?)
Matthew Phillips
@matthewp
I've never done that personally... but helpers would be a way to escape from stache in hot areas...
Justin Meyer
@justinbmeyer
Are extra scopes a perf problem?
Guido Smeets
@gsmeets
well I'm creating a table with pagination here
going from not rendering the table body to rendering it is going from 25-50ms on page swapping to 200-350ms
so I was hoping to avoid some subtemplate calls and scope creation by optimizing
Justin Meyer
@justinbmeyer
are you sure it's the scope creation?
I guess if you have some time, @gsmeets , I'd love to see your app and do some profiling
Justin Meyer
@justinbmeyer
or, if you could export the profiling and send it to me, that would be awesome too
Guido Smeets
@gsmeets
@justinbmeyer sure, I got time
It seems about 100ms is just rendering the table cell contents
so I'm wondering if there's actually any way to speed that up
Gregg Roemhildt
@roemhildtg
Did something break recently with can-stache each loops?
{{#each(objects, object=value)}}
{{#each(scope.vm.fields, field=value)}}
{{../object[field]}} // not working because object is undefined?
{{/each}}
{{/each}}
Kevin Phillips
@phillipskevin
@roemhildtg can you run npm ls --depth=0
and paste the results
Gregg Roemhildt
@roemhildtg
I think I know what the issue is. I deleted my package-lock.json and node_modules and updated to try and fix some webpack issue I was having
I got the latest can-stache 4.11 then, which maybe changed syntax?
Kevin Phillips
@phillipskevin
shouldn't have
I'll take a look
Kevin Phillips
@phillipskevin
definitely a bug in can-stache or can-view-scope
going back to can-stache@4.10.5 and can-view-scope@4.7.1 works
we'll look into this right away, thanks for reporting
Gregg Roemhildt
@roemhildtg
Sounds good :100:
Julian
@pYr0x
is conncet.tag deprecated?
https://github.com/canjs/can-connect/blob/master/all.js should contain connect.tag = require('./can/tag/tag');
i can create a hotfix if you want
Julian
@pYr0x
this indexNum helper is not working anymore
scope.indexNum should be indexNum ?
Matthew Phillips
@matthewp
@pYr0x yeah, it was removed from 3.x
it's there now
Julian
@pYr0x
so why the source is still in master branch?
Julian
@pYr0x
@justinbmeyer @phillipskevin is it not possible to use </content> to own a inner html block as the view and pass the VM to this view
it would be nice to have some html file that has a custom compnent (e.g. <x-import>) and its content is the stache view and the VM gets passed into this view
currently, <x-entnahmestelle-list> will be rendered but {{bar}} or vm:msg:to="bar"will not work
it does not have to content maybe some new special tag
^^ New can-route is out which makes using it much easier thanks to DefineMap.
No more serialize: false!!!
Gregg Roemhildt
@roemhildtg
Question - in the newest can-stache does #with still create a new scope?
I know #for of does not