Where communities thrive


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

    greenkeeper[bot] on can-simple-map-4.3.3

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

  • Oct 14 20:19
    greenkeeper[bot] labeled #5377
  • Oct 14 20:19
    greenkeeper[bot] opened #5377
  • Oct 14 20:19

    greenkeeper[bot] on @feathersjs

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

  • Oct 14 20:18
    greenkeeper[bot] labeled #5376
  • Oct 14 20:18
    greenkeeper[bot] opened #5376
  • Oct 14 20:18

    greenkeeper[bot] on @feathersjs

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

  • Oct 14 14:43
    greenkeeper[bot] closed #5373
  • Oct 14 14:43

    greenkeeper[bot] on can-deep-observable-1.0.1

    (compare)

  • Oct 14 14:42

    m-mujica on update-deep-observable

    (compare)

  • Oct 14 14:42

    m-mujica on master

    Update can-deep-observable to l… Merge pull request #5374 from c… (compare)

  • Oct 14 14:42
    m-mujica closed #5374
  • Oct 14 14:42
    m-mujica closed #5365
  • Oct 14 14:09
    f-ricci starred canjs/canjs
  • Oct 14 13:55
    greenkeeper[bot] commented #5375
  • Oct 14 13:55

    greenkeeper[bot] on core-js-3.3.2

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

  • Oct 14 10:51
    m-mujica review_requested #5374
  • Oct 14 07:43
    rjgotten commented #5358
Thomas Sieverding
@Bajix
@matthewp What is can-wait being used for? Compatibility layer for SSR?
Matthew Phillips
@matthewp
Yes, it is how we know when rendering is complete on the server
Thomas Sieverding
@Bajix
I was under the impression that only deferreds mattered
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