Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 19:08
    cherifGsoul labeled #5390
  • 19:07
    cherifGsoul opened #5390
  • 18:45
    greenkeeper[bot] labeled #5389
  • 18:45
    greenkeeper[bot] opened #5389
  • 18:45

    greenkeeper[bot] on can-observable-bindings-1.3.0

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

  • 18:29

    matthewp on master

    Update dist for release (compare)

  • 18:29

    matthewp on v6.1.3

    Update dist for release 6.1.3 (compare)

  • 17:59

    matthewp on can-observable-array-1.0.2

    (compare)

  • 17:59

    matthewp on master

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

  • 17:59
    matthewp closed #5388
  • 16:46
    greenkeeper[bot] labeled #5388
  • 16:46
    greenkeeper[bot] opened #5388
  • 16:46

    greenkeeper[bot] on can-observable-array-1.0.2

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

  • 12:45
    greenkeeper[bot] labeled #5387
  • 12:45
    greenkeeper[bot] opened #5387
  • 12:45

    greenkeeper[bot] on can-stache-element-1.0.2

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

  • 09:49
    chasenlehara edited #5384
  • 09:47
    chasenlehara edited #3864
  • 09:46
    chasenlehara edited #5383
  • Oct 17 20:12

    matthewp on master

    Update dist for release (compare)

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
are you using "automounting"... where you have a component directly in your html?
like <my-app></my-app>?
or are you rendering everything with stache?
Ivo Pinheiro
@ivospinheiro
The first can-component is being rendered like this:
$('#app').html(stache("<my-app></my-app>"));
Kevin Phillips
@phillipskevin
ok
so... to check if what I'm thinking is the issue, can you change the <html> element of your page to <html data-can-automount="false">
Ivo Pinheiro
@ivospinheiro
We are using a plugin for tree's named jstree and in this case it is a big tree with lots of nodes.
It seems that the renderNodeAndChildren function is being called whenever a new node is inserted on the DOM
@phillipskevin I will try that
Kevin Phillips
@phillipskevin
:thumbsup:
Ivo Pinheiro
@ivospinheiro
It works! And now the application loads is much more faster
Kevin Phillips
@phillipskevin
ok
that's good, but that means there's something we should fix
can share what your jstree code looks like?
and open an issue in can-view-callbacks if possible
Ivo Pinheiro
@ivospinheiro
I will do that as soon as I can