Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 00:14
    greenkeeper[bot] labeled #5449
  • 00:14
    greenkeeper[bot] opened #5449
  • 00:14

    greenkeeper[bot] on can-super-model-2.0.0

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

  • 00:13
    greenkeeper[bot] labeled #5448
  • 00:13
    greenkeeper[bot] opened #5448
  • 00:13

    greenkeeper[bot] on can-define-rest-model-2.0.0

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

  • 00:12
    greenkeeper[bot] labeled #5447
  • 00:12
    greenkeeper[bot] opened #5447
  • 00:12

    greenkeeper[bot] on can-define-realtime-rest-model-2.0.0

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

  • 00:07
    greenkeeper[bot] labeled #5446
  • 00:07
    greenkeeper[bot] opened #5446
  • 00:07

    greenkeeper[bot] on can-connect-ndjson-2.0.0

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

  • Dec 13 21:27

    greenkeeper[bot] on @octokit

    (compare)

  • Dec 13 21:25

    greenkeeper[bot] on @octokit

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

  • Dec 13 21:21

    greenkeeper[bot] on @octokit

    (compare)

  • Dec 13 21:20

    greenkeeper[bot] on @octokit

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

  • Dec 12 19:26
    cherifGsoul review_requested #5443
  • Dec 12 18:34
    cherifGsoul synchronize #5443
  • Dec 12 18:34

    cherifGsoul on document-inserted-removed-can6

    Update after review (compare)

  • Dec 12 17:44

    cherifGsoul on theme-3.0.0-pre.5

    (compare)

Viktor Busko
@Lighttree
hah I was thinking about definemaps but looks like overkill :D
but works )
Kevin Phillips
@phillipskevin
it actually doesn't work...
it still gets stringified for attributes
Viktor Busko
@Lighttree
ah in attribute I see
Kevin Phillips
@phillipskevin
this shouldn't be this hard...
Viktor Busko
@Lighttree
yep )
Kevin Phillips
@phillipskevin
@Lighttree would it be possible to set up the attributes a different way?
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