Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Dec 06 18:40
    cherifGsoul review_requested #5441
  • Dec 06 18:39
    cherifGsoul opened #5441
  • Dec 06 18:22

    cherifGsoul on update-infrastructure-page

    Update infrastructure page with… (compare)

  • Dec 06 18:14
    greenkeeper[bot] commented #5422
  • Dec 06 18:14

    greenkeeper[bot] on @feathersjs

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

  • Dec 06 18:11
    greenkeeper[bot] commented #5401
  • Dec 06 18:11

    greenkeeper[bot] on @feathersjs

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

  • Dec 04 22:03
    chasenlehara opened #5440
  • Dec 04 22:03
    chasenlehara labeled #5440
  • Dec 04 19:18
    cherifGsoul review_requested #5432
  • Dec 04 14:09
    m-ahmadi starred canjs/canjs
  • Dec 04 10:52
    ansyeow starred canjs/canjs
  • Dec 03 14:53
    matthewp commented #5439
  • Dec 03 14:30
    frank-dspeed opened #5439
  • Dec 02 18:13
    greenkeeper[bot] commented #5392
  • Dec 02 18:13

    greenkeeper[bot] on core-js-3.4.7

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

  • Dec 02 17:48
    greenkeeper[bot] commented #5392
  • Dec 02 17:48

    greenkeeper[bot] on core-js-3.4.6

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

  • Dec 02 15:38
    phillipskevin commented #5438
  • Dec 02 15:38
    phillipskevin closed #5438
Jared Stehler
@jaredstehler
Potentially unhandled rejection [4] Error: Timeout of 5000 exceeded at eval (http://localhost:8082/src/index.stache:247:17) at eval (http://localhost:8082/node_modules/can-zone/lib/tasks.js:149:15) at Task.run (http://localhost:8082/node_modules/can-zone/lib/zone.js:41:17) at Zone.runTask (http://localhost:8082/node_modules/can-zone/lib/zone.js:183:14)
then a bunch of
this is the line in datastream-app.control.js: instances: { get: function get(prevVal, resolver) { DataStreamAppInstance.getList({ artifact: this.app.artifact, ts: this.updateTs }).then(function (data) { // setTimeout($.proxy(this.updateData, this), 10000); resolver(data); }); } },
but i see that the http request is completing in 900ms
Kevin Phillips
@phillipskevin
take a look at https://www.youtube.com/watch?v=8cWPZM8fiOQ, @jaredstehler
Jared Stehler
@jaredstehler
thanks!
Jared Stehler
@jaredstehler
any best practices on "polling" and updating lists of superMaps? I'm currently doing what feels hacky:
export const ViewModel = DefineMap.extend({

  title: {
    get() {
      return 'Recent Deploys';
    }
  },

  updateTime: 'number',

  deploys: {
    get(prevVal, resolver) {
      if(this.updateTime) {
        var params = route.data.serialize();
        params.ts = this.updateTime;

        Deploy.getList(params).then((d) => {
          setTimeout($.proxy(this.update, this), 30000);
          resolver(d);
        });
      }
      else {
        resolver(null);
      }
    }
  },

  update() {
    this.updateTime = new Date().getTime();
  }

});

export default Component.extend({
  tag: 'deploy-list',
  ViewModel,
  events: {
    inserted() {
      this.viewModel.update();
    }
  },
  view
});
it also causes the whole list to flicker each update
and I think that it might have been causing or contributing to my zone render timeout issues..
andre-cgn
@andre-cgn
hey guys. i've got a stache.addHelper related question. anyone around who might be able to help?
I've got a repository with just one can component and a helper to go with it. both written in es6 style and transpiled with babel. i import that package via es6 import in my main project (that project is built via browserify + babelify). i would expect my stache view helper to also be available to all components and templates in my core repository - even though that helper is registered by the imported module with my simple can-component
it doesnt work though
i added stache to get window object for debugging purposes. when i get window.stahce-getHelper('myhelper'), it does return a function
but i still get warnings in the console that stache cannot find the myhelper helper
is there any good way around this
Mohamed Cherif Bouchelaghem
@cherifGsoul
@andre-cgn how did you register the helper? in the componet helpers object or with stache.registerHelper ?
Kevin Phillips
@phillipskevin
@andre-cgn do you have multiple versions of stache?
andre-cgn
@andre-cgn
i used addHelper
nope i am using identical versions
and only bundling one
Kevin Phillips
@phillipskevin
what version are you using?
andre-cgn
@andre-cgn
can-stache 4.1.1
Kevin Phillips
@phillipskevin
how are you calling the helper?
andre-cgn
@andre-cgn
as i said, the first package only contains one can-component and a stache helper. nothing is bundled. the bundling takes place in the core package which uses the first one as a dependency
my helper is called 'translate'
Kevin Phillips
@phillipskevin
so you're calling it like {{translate("foo")}} ?
andre-cgn
@andre-cgn
exactly
Flavio Garcia
@piraz
Hello guys, when I import a template using steal-stache using
import template from "./nav.stache";
it works
but like this:
var template = steal("./nav.stache");
I'll get this error:
can-component.js:409 Uncaught TypeError: betweenTagsRenderer is not a function at Constructor.setup (can-component.js:409) at Function.newInstance (can-construct.js:288) at Constructor.init (can-construct.js:636) at new Constructor (eval at <anonymous> (can-construct.js:NaN), <anonymous>:3:34) at Object.eval [as nav-base] (can-component.js:228) at HTMLElement.CustomElement.connectedCallback (can-view-callbacks.js:181) at Object.tag (can-view-callbacks.js:188) at Function.setup (can-component.js:227) at Function.extend (can-construct.js:687) at execute (nav.js:185)
Kevin Phillips
@phillipskevin
@andre-cgn can you put a breakpoint in your code where you call addHelper and also in stache where the warning is given
to make sure your helper is being added before the template is rendered
@piraz maybe try asking your question in the steal room
I'm not sure what the difference is with that kind of import
Flavio Garcia
@piraz
It is funny @andre-cgn because the only doc I get ins on the canjs page: https://canjs.com/doc/steal-stache.html#Use
Kevin Phillips
@phillipskevin
@jaredstehler you might want to ask your question on the forums
it probably could use a longer answer
Flavio Garcia
@piraz
I'll check on their side
Kevin Phillips
@phillipskevin
the only docs you get on steal-stache?
I'm not sure this is related to steal-stache... I think the steal syntax requires a callback
Thomas Sieverding
@Bajix
@piraz you need to do:
import template from "./nav.stache!”;
Flavio Garcia
@piraz
yes, even the repo is pointing to this page: https://github.com/canjs/steal-stache
Kevin Phillips
@phillipskevin
like
steal("./nav.stache", function(template) { 
  ...
});
but I'm not sure
Thomas Sieverding
@Bajix
The ! is what makes the loader use the plugin