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)

Matthew Phillips
@matthewp
In 0.5.0 we forced you to do this.attr("@root").waitFor(deferred)
but in 0.6.0 we added can-wait
which prevents the need for that
Thomas Sieverding
@Bajix
So you’re hijacking timers & promises instead of doing a root level Promise.all
Matthew Phillips
@matthewp
we're hijacking async code so that we are aware of when it happens
so you don't have to manually tell us all of your deferreds
Thomas Sieverding
@Bajix
That has unintended consequences though
Matthew Phillips
@matthewp
what are those consequences?
Thomas Sieverding
@Bajix
For example, when I worked at Pluto, we would use promises both in our A/B testing flow, and for wrapping modal life cycles to do complex chaining
I can think of dozens of cases in which we’ve used promises & timers in which we wouldn’t want those to prevent SSR
Matthew Phillips
@matthewp
You were using promises that didn't result in the UI changing?
That is the purpose, to know when rendering is complete
Thomas Sieverding
@Bajix
I suppose we could have disabled those modals if we were rendering server side
It would result in UI changing, however there would be a sizable delay
Matthew Phillips
@matthewp
Yes, you can selectively render stuff of course
use helpers to only render certain parts in the client
Thomas Sieverding
@Bajix
can-wait always gets loaded?
Matthew Phillips
@matthewp
it's used by done-autorender
so if you're not using that, no it does not
Thomas Sieverding
@Bajix
I see
Matthew Phillips
@matthewp
by the way, angular 2 has essentially the same sort of thing.
Thomas Sieverding
@Bajix
Feels dirty ;x
Matthew Phillips
@matthewp
for their ssr solution
Thomas Sieverding
@Bajix
But I suppose that’s acceptable for SSR
Matthew Phillips
@matthewp
It only applies to the initial render
once the page is loaded our overrides are gone
I like it because it leads to more elegant user code
you can do new XMLHttpRequest() and we'll know to wait for that
or return User.getList() and we know about it
Thomas Sieverding
@Bajix
Will done-autorender work w/ precompiled stache templates
Matthew Phillips
@matthewp
what is a precompiled stache template?
I think the answer is yes because i don't know what that is :)
done-autorender is like the stache/system plugin but applies to the main template only
so if you know a little about stache/system it's similar in what it does
but it also inserts the rendered fragment into the page for you
Thomas Sieverding
@Bajix
define([
  "module",
  "can/view/stache/stache",
  "can/view/stache/mustache_core"
],function(module, stache, mustacheCore){
    var renderer = stache([{"tokenType":"start","args":["p",false]},{"tokenType":"end","args":["p",false]},{"tokenType":"chars","args":["I'm a little tea pot"]},{"tokenType":"close","args":["p"]},{"tokenType":"done","args":[]}]);
    can.view.preload("test_stache", renderer);
    return function(scope, options, nodeList){
        var moduleOptions = { module: module };
        if(!(options instanceof mustacheCore.Options)) {
            options = new mustacheCore.Options(options || {});
        }
        return renderer(scope, options.add(moduleOptions), nodeList);
    };
});
If I wanted to use done-autorender w/ something like that
My builds do *.stache -> .stache.js, and utilize configuration so that I don’t need the !plugin syntax
If I were to be using done-autorender, I would be loading the pre-compiled stache JS file
Thomas Sieverding
@Bajix
done-autorender seems problematic because it’s dependent on doing an ad-hoc stache translation
Not to mention the coupling w/ live-reload ;(
Mason Shin
@minsooshin
is there a way that i can fire the ($click) event on the dom element?
in the component?
Kevin Phillips
@phillipskevin
you mean trigger a click programatically?
Mason Shin
@minsooshin
<td class="sa-expand-row" ($click)="toggleNestedContent(../../..)">
I have a stache file like this
but I would like to remove the click event listener from the component
Kevin Phillips
@phillipskevin
ok
you just don’t want it in the template?