Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 17:25
    matthewp edited #5384
  • 17:00

    matthewp on can-dom-mutate-2.0.7

    (compare)

  • 17:00

    matthewp on master

    fix(package): update can-dom-mu… Merge pull request #5386 from c… (compare)

  • 17:00
    matthewp closed #5386
  • 16:27
    greenkeeper[bot] labeled #5386
  • 16:27
    greenkeeper[bot] opened #5386
  • 16:27

    greenkeeper[bot] on can-dom-mutate-2.0.7

    fix(package): update can-dom-mu… (compare)

  • 16:25

    matthewp on can-dom-mutate-2.0.6

    (compare)

  • 16:24
    matthewp closed #5379
  • 16:24
    matthewp commented #5379
  • 15:26

    greenkeeper[bot] on can-type-1.1.2

    (compare)

  • 15:26

    matthewp on master

    fix(package): update can-type t… Merge pull request #5385 from c… (compare)

  • 15:26
    matthewp closed #5385
  • 14:11
    matthewp closed #5377
  • 14:11
    matthewp closed #5376
  • 14:11
    matthewp closed #5375
  • 14:07
    greenkeeper[bot] labeled #5385
  • 14:07
    greenkeeper[bot] opened #5385
  • 14:07

    greenkeeper[bot] on can-type-1.1.2

    fix(package): update can-type t… (compare)

  • Oct 16 20:07
    matthewp commented #5384
Nico R.
@nriesco
I’ll replicate the error on a simplified version of this app and create an issue
Kevin Phillips
@phillipskevin
ok thanks
Nico R.
@nriesco
now my app works so smoothly.. :-)
Kevin Phillips
@phillipskevin
great!
Thomas Sieverding
@Bajix
@matthewp The bug has to do w/ path resolution during build. I use directories.lib, and my build was building into dist/cms then Steal was trying to load relative to dist/assets, where assets is my directories.lib
Matthew Phillips
@matthewp
hm, is there a bug?
Thomas Sieverding
@Bajix
Well it’s breaking bundling for me
If you’d like to screen share, maybe I could show you?
Matthew Phillips
@matthewp
yeah sure
Thomas Sieverding
@Bajix
Screen Hero?
Matthew Phillips
@matthewp
yeah
Thomas Sieverding
@Bajix
My handle is Bajix
Gira Minus
@gKreator
When creating and updating a form with canjs. Does it make sense to update a form model everytime it is changed?
So in a viewModel I keep a name: { type: 'string', value: 'Jeff' }
then update it on input change
rather then reading the value with dom functions later?
than*
Kevin Phillips
@phillipskevin
you can't easily write tests for code using the dom directly, so I would use the viewModel
Gira Minus
@gKreator
ok that makes sense
Real quick... what is the best way to re initialize a component that is inside another component?
Kevin Phillips
@phillipskevin
pass the data in with stache bindings
Gira Minus
@gKreator
but what if i had logic in the init: function() that i wanted to execute?
Kevin Phillips
@phillipskevin
depends what that logic does, but there's usually a better place to put that code
Sunil George
@georgesunil81
This may be a naive question, but I want to ask anyways to see if there is a best practice recommendation. I have a controller (can.Control) in my CanJS application that is quite bloated with over 2000 lines of code. Is there a way to break certain logically related methods out into a separate js file and import it or something? I am using AMD modules.
Kevin Phillips
@phillipskevin
a naive answer is yes, but without knowing what that code does, it’s hard to say how
why is your controller doing so much?
sort of a rhetorical question, but something you should ask yourself
Sunil George
@georgesunil81
@phillipskevin . Thanks. The can.Control has many event handler methods since the page it is rendering is rather element rich.
Kevin Phillips
@phillipskevin
so maybe some of those should be in their own components
(or controls if that’s your thing)
Sunil George
@georgesunil81
Yeah, it could have been done that way. Right now, there is only one controller that renders and controls that element rich page. So, I am trying to see if I can put some related methods out to seperate js files and AMD-import it.
Kevin Phillips
@phillipskevin
sure
I don’t know that it’s going to make it easier to read your code though
not as much as actually breaking down the functionality into multiple stand-alone pieces
but you can take any event handler and move it to its own file
Sunil George
@georgesunil81
Yeah, that is what I have to balance between - readability/maintainability vs "too many" lines of code.
Thanks @phillipskevin for the insights there. Will do.
Kevin Phillips
@phillipskevin
if your event handlers are using this, you’ll need to figure out how to bind those functions if you import them
Sunil George
@georgesunil81
Yes, some of the event handlers do refer to this! Thanks @phillipskevin for the pointer.
Justin Meyer
@justinbmeyer
@/all If you have nested structures and can-connect … this will make your life much easier: https://github.com/canjs/can-connect/releases/tag/v1.2.0 (docs out soon)
seasoup
@seasoup
Hey, I'm trying to use fixture from this tutorial a https://canjs.com/doc/guides/todomvc.html
but am getting this error: undefined is not an object (evaluating 'can.fixture.store')
"can": "^3.3.1"
import can from "can";
import "can-define";
import DefineMap from "can-define/map/map";
import DefineList from "can-define/list/list";
doing these imports:
seasoup
@seasoup
needed to npm install can-fixture --save
Gira Minus
@gKreator
You really dont need the "can"
Mohamed Cherif Bouchelaghem
@cherifGsoul
you should use import can from "can-util" for can3.x
seasoup
@seasoup
using can 3, I have a define map passed into a template and am showing some html based on the value of one of the attributes (page), how can I update the define map so that the template changes
var data = new DefineMap({
body: "BODY",
page: "event-group"
});