Where communities thrive


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

    phillipskevin on master

    Update dist for release (compare)

  • 21:43

    phillipskevin on v6.1.1

    Update dist for release 6.1.1 (compare)

  • 21:34

    phillipskevin on can-observable-mixin-1.0.2

    (compare)

  • 21:34

    phillipskevin on master

    fix(package): update can-observ… Merge branch 'master' into gree… Merge pull request #5382 from c… (compare)

  • 21:34
    phillipskevin closed #5382
  • 21:34

    phillipskevin on can-make-map-1.2.2

    (compare)

  • 21:34

    phillipskevin on master

    fix(package): update can-make-m… Merge pull request #5380 from c… (compare)

  • 21:34
    phillipskevin closed #5380
  • 20:30
    phillipskevin synchronize #5382
  • 20:30

    phillipskevin on can-observable-mixin-1.0.2

    fix(package): update can-observ… fix(package): update can-simple… Merge pull request #5372 from c… and 2 more (compare)

  • 20:30
    phillipskevin opened #5382
  • 20:28

    phillipskevin on can-simple-map-4.3.3

    (compare)

  • 20:28

    phillipskevin on master

    fix(package): update can-simple… Merge pull request #5378 from c… (compare)

  • 20:28
    phillipskevin closed #5378
  • 20:26

    phillipskevin on can-observable-mixin-1.0.1

    (compare)

  • 20:26

    phillipskevin on master

    fix(package): update can-observ… Merge pull request #5372 from c… (compare)

  • 20:26
    phillipskevin closed #5372
  • 20:25

    phillipskevin on update-make-map

    (compare)

  • 20:25
    phillipskevin closed #5381
  • 20:21
    phillipskevin opened #5381
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?
Mason Shin
@minsooshin
events: {
  'tbody.sc-disabled td click’: function(el, ev): {
    …
  }
}
I am trying to do something like this
in the component
Kevin Phillips
@phillipskevin
ok
Mason Shin
@minsooshin
I wat to keep that event
but also want to fire the event for some cases