Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 17 18:44

    matthewp on setupguide

    (compare)

  • Sep 17 18:44

    matthewp on major

    Current static Update setting up canjs The setting up guide and 2 more (compare)

  • Sep 17 18:44
    matthewp closed #5292
  • Sep 17 18:06
    matthewp ready_for_review #5292
  • Sep 17 18:06
    matthewp synchronize #5292
  • Sep 17 18:06

    matthewp on setupguide

    Minor edits to make the setting… (compare)

  • Sep 17 17:30

    matthewp on major

    Update dist for release (compare)

  • Sep 17 17:30

    matthewp on v6.0.0-pre.15

    Update dist for release 6.0.0-pre.15 (compare)

  • Sep 17 17:04

    matthewp on major

    Upgrade to can-type 1.0.0-pre.8 Increase bundlesize for core T… Upgrade to can-stache@5.0.0-pre… and 1 more (compare)

  • Sep 17 17:04
    matthewp closed #5291
  • Sep 17 16:08

    chasenlehara on type8

    Upgrade to can-stache@5.0.0-pre… (compare)

  • Sep 17 16:08
    chasenlehara synchronize #5291
  • Sep 17 16:00
    cherifGsoul commented #5268
  • Sep 17 15:57

    cherifGsoul on update-theme-new-buttons

    pre 2 for theme (compare)

  • Sep 17 15:51
    cherifGsoul synchronize #5268
  • Sep 17 15:51

    cherifGsoul on jquery-add-event-migration-guide

    Some updates (compare)

  • Sep 17 15:33
    greenkeeper[bot] labeled #5293
  • Sep 17 15:32
    greenkeeper[bot] opened #5293
  • Sep 17 15:32

    greenkeeper[bot] on can-component-4.6.3

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

  • Sep 17 15:00
    phillipskevin commented #5290
Gregg Roemhildt
@roemhildtg
It would be good to have some way of preventing issues like this. Not that it happens often, but when it does its pretty tough finding the source
Justin Meyer
@justinbmeyer
@roemhildtg I don't think there's a way to prevent it, but that issue has an idea about how to spot the problem.
Well, it might be preventable as we could see the same function added multiple times to the queue in the same "batch"
Frank Lemanschik
@frank-dspeed
@justinbmeyer do you got a idea how to polyfill this
view-model.mjs:25 Uncaught (in promise) ReferenceError: regeneratorRuntime is not defined
    at eval (view-model.mjs:25)
    at AppViewModel{}'s componentToShow getter (view-model.mjs:25)
    at Observation.onBound (can-observation.js:86)
    at KeyTree.add (can-key-tree.js:140)
    at Observation.on (value.js:35)
    at Object.eval [as onValue] (observe.js:25)
    at Function.temporarilyBind (temporarily-bind.js:23)
    at AppViewModel.get AppViewModel{}.componentToShow (can-define.js:780)
    at AppViewModel.getKeyValue (map.js:58)
    at Object.getKeyValue (get-set.js:80)
some how for me it looks like steal don't likes dynamic import
maybe i need newer bable?
  async function returnModule(page ,viewModel) {
    setTitle(`doorly - ${page} Page`);
    return import(`/components/page-${page}`)
      .then((m)=> new m.default(viewModel))
      .catch(e=>{
        setTitle( 'doorly - ERROR Page');
        // eslint-disable-next-line no-console
        console.error(e);
        return Promise.resolve(page404);
      });
  }
is the code that starts on line 25 that steal don't likes
without steal it works like a charm
Matthew Phillips
@matthewp
I believe you have to include babel-polyfill to use async functions.
qantourisc
@qantourisc
@justinbmeyer i don't get how to use your component constructors practically
Justin Meyer
@justinbmeyer
@qantourisc the modal recipe shows how they are used
I think the routing guide does too
Frank Lemanschik
@frank-dspeed
@qantourisc i can clarify that
there are 2 ways this constructors get used
first way is .stache template references them via can-import or you do it your self
const HelloWorld = Component.extend({
    tag: "hello-world",
    view: `
        <can-slot name="greetingTemplate" />
        <content>world</content>
        <ul>{{#each(items)}} {{this}} {{/each}}</ul>
    `,
    ViewModel: {
        items: {}
    }
});

// Create a new instance of our component
const componentInstance = new HelloWorld({

    // values with which to initialize the component’s view model
    viewModel: {
        items: ["eat"]
    },

    // can-stache template to replace any <content> elements in the component’s view
    content: "<em>{{message}}</em>",

    // <can-template> strings rendered by can-stache with the scope
    templates: {
        greetingTemplate: "{{greeting}}"
    },

    // scope with which to render the <content> and templates
    scope: {
        greeting: "Hello",
        message: "friend"
    }
});

myGreetingInstance.element; // is like <my-greeting>Hello <em>friend</em> <ul> <li>eat</li> </ul></my-greeting>

myGreetingInstance.viewModel; // is HelloWorld.ViewModel{items: ["eat"]}
this is a defined helloworld component
that gets Loaded aka Instance creation of the constructed component
new HellWorld
is the key part
the part after that is supplying inital values
Paul Tichonczuk
@tracer99
Working on a Canjs 2->3 migration. Running into an issue where jQuery is complaining about route binding syntax
Error: Syntax error, unrecognized expression: /:service
Did we miss something? Is this syntax depricated?
Chasen Le Hara
@chasenlehara
@tracer99 That’s for something like route.register('/:service'), right?
As far as I know, we’re showing /{service} in our docs since 3.x (and we do show a warning) but we haven’t removed the old colon syntax.
Paul Tichonczuk
@tracer99
   '/:service route': function(urlContext) {
                this.login(urlContext);
                if (urlContext.service == 'logout') {
                    route.attr({}, true);
                }
            },
It's a route change binding in a controller.
yeah, that syntax doesn't work either (different error)
Chasen Le Hara
@chasenlehara
Hm, I’m not sure, let me check with @justinbmeyer or @phillipskevin
Matthew Phillips
@matthewp
canjs 5.20.0 is out, adding support for portals: https://github.com/canjs/canjs/releases/tag/v5.20.0
Justin Meyer
@justinbmeyer
@tracer99 howdy ... so the app is using the old can-control-route stuff?
Gregg Roemhildt
@roemhildtg
:+1: on 5.20 portals. Good solution for a common problem
Matthew Phillips
@matthewp
Thanks!
Justin Meyer
@justinbmeyer
@roemhildtg besides modals, what else might you need it for?
Justin Meyer
@justinbmeyer
It was a great day for open source today: https://twitter.com/canjs/status/1074850516092551168 Warms my heart to get help on DoneJS/CanJS/StealJS . Thanks @MarcGodard & @roemhildtg ! A great xmas present!
RyanMilligan
@RyanMilligan
Hi everyone, I'm having another strange problem. We have an application using can-router to navigate the application. It works fine when just serving up my JavaScript folder using http-server, but if I run a steal build and host the result in a script tag (i.e., <script src="steal.production.js">), then the navigation doesn't work at all.

Here's how the router's being configured:

// route('', {app: 'admin', page: 'markets'})
// route('{app}', { page: 'markets' })
route('{app}/{page}', {app: 'admin', page: 'markets'})
route('{app}/{page}/{slug}')
route('{app}/{page}/{slug}/{action}')
route('{app}/{page}/{slug}/{action}/{actionTwo}')
route.start()

The commented out lines are things I removed while trying to troubleshoot this issue.

I also added this diagnostic code below it:

setInterval(() => {
    const result = route.matched();
    console.log(result); //-> ""
  }, 2000);

This is in Can 3, by the way. Anyway, when I navigate to #admin/markets when hosting the JavaScript directly, that console log outputs {app}/{page}, the view model properties get set as expected, and everything's fine. When I do the same thing in the built code, no view model properties get set at all, and it outputs undefined. It seems like the router isn't resolving the correct rule based on the hash I navigated to.

RyanMilligan
@RyanMilligan
Oof, never mind, I figured it out. A vendor reverted a change I made a while ago to remove the can-route-pushstate module.
Ivo Pinheiro
@ivospinheiro
Hi guys!
I'm working on upgrade of an application from CanJS@3 to CanJS@5 and Steal@2.
I'm having a performance issue related with the application loading on an older version of Firefox (FF44) the application hangs many times, until it shows an window with title "Warning: Unresponsive script" dialog.
I don't know if the problem is related with CanJS or Steal, but can you guys give me some tips how to solve this issue?
Ivo Pinheiro
@ivospinheiro
It seems to spend some time on can-view-callbacks renderNodeAndChildren function.
Kevin Phillips
@phillipskevin
do you have the latest can-view-callbacks, @ivospinheiro ?
there was an issue with the MutationObserver version of that code (which is used for browsers that don't support customElements, like older FF)
but it was fixed in the latest version
Ivo Pinheiro
@ivospinheiro
I'm using can-view-callbacks@4.3.2
Kevin Phillips
@phillipskevin
ok