Where communities thrive


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

    greenkeeper[bot] on can-observable-mixin-1.0.7

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

  • 18:30

    cherifGsoul on update-infrastructure-page

    (compare)

  • 18:30

    cherifGsoul on master

    Update infrastructure page with… (compare)

  • 18:30
    cherifGsoul closed #5441
  • 18:30
    cherifGsoul closed #5417
  • Dec 10 17:40
    cherifGsoul review_requested #5443
  • Dec 10 16:47
    cherifGsoul review_requested #5441
  • Dec 10 16:35
    cherifGsoul synchronize #5441
  • Dec 10 16:35

    cherifGsoul on update-infrastructure-page

    Fix typos (compare)

  • Dec 10 10:01
    jkeruzec starred canjs/canjs
  • Dec 09 18:59
    cherifGsoul review_requested #5443
  • Dec 09 18:59
    cherifGsoul opened #5443
  • Dec 09 18:51

    cherifGsoul on document-inserted-removed-can6

    Add inserted/removed events to … (compare)

  • Dec 09 15:38
    greenkeeper[bot] labeled #5442
  • Dec 09 15:38
    greenkeeper[bot] opened #5442
  • Dec 09 15:38

    greenkeeper[bot] on can-view-live-5.0.1

    fix(package): update can-view-l… (compare)

  • Dec 08 21:21
    greenkeeper[bot] commented #5392
  • Dec 08 21:21

    greenkeeper[bot] on core-js-3.4.8

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

Jeroen Cornelissen
@jeroencornelissen
Thx, @justinbmeyer. You’re right .update() wasn’t a good idea :clap:
Jeroen Cornelissen
@jeroencornelissen
@justinbmeyer Hmm, I removed the routeUrl helper in my stache also and did the route directly <a href="#!/admin/settings”> and that solved the issue.
When I do: {{routeUrl(page='admin' subpage='settings')}} the route flickers from #!&page=admin&subpage=settings to #!&page=admin&subpage=settings.
Justin Meyer
@justinbmeyer
@jeroencornelissen aren't those identical?
btw, if you are in 4.0, you can can.queues.log("flush") and see the route updates happen
Justin Meyer
@justinbmeyer
@/all We are about to discuss the survey proposals: https://www.youtube.com/watch?v=EEBytcIX7oA
Jeroen Cornelissen
@jeroencornelissen
@justinbmeyer sorry I meant from ... to #!admin/settings.
Jared Stehler
@jaredstehler
Anyone have tips on troubleshooting stache timeout errors?
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