Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 15:14
    greenkeeper[bot] commented #5375
  • 15:14

    greenkeeper[bot] on core-js-3.3.1

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

  • 14:49
    greenkeeper[bot] labeled #5375
  • 14:49
    greenkeeper[bot] opened #5375
  • 14:49

    greenkeeper[bot] on core-js-3.3.0

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

  • Oct 12 18:35
    matthewp commented #5358
  • Oct 12 18:15
    chasenlehara commented #5358
  • Oct 12 06:41

    greenkeeper[bot] on @octokit

    (compare)

  • Oct 12 06:39

    greenkeeper[bot] on @octokit

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

  • Oct 11 19:01
    m-mujica edited #5374
  • Oct 11 19:01
    m-mujica opened #5374
  • Oct 11 19:00

    m-mujica on update-deep-observable

    Update can-deep-observable to l… (compare)

  • Oct 11 18:55
    m-mujica edited #5365
  • Oct 11 18:54
    greenkeeper[bot] labeled #5373
  • Oct 11 18:54
    greenkeeper[bot] opened #5373
  • Oct 11 18:54

    greenkeeper[bot] on can-deep-observable-1.0.1

    fix(package): update can-deep-o… (compare)

  • Oct 11 16:42
    LakshanKarunathilake starred canjs/canjs
  • Oct 11 14:58
    greenkeeper[bot] labeled #5372
  • Oct 11 14:58
    greenkeeper[bot] opened #5372
  • Oct 11 14:58

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

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

Gregg Roemhildt
@roemhildtg
That'll be nice and easy
Kevin Phillips
@phillipskevin
that bug you found yesterday is fixed now also: https://github.com/canjs/can-view-scope/releases/tag/v4.8.1
Gregg Roemhildt
@roemhildtg
:+1:
Sweet!
Kevin Phillips
@phillipskevin
if you haven't converted all of your templates to for...of already, you should be able to update
Gregg Roemhildt
@roemhildtg
Working on it :P
Regexpressions work pretty well
There's a bit of manual stuff involved with the scope changes
Kevin Phillips
@phillipskevin
if you want to write a codemod, that would be awesome
ah, yeah
Gregg Roemhildt
@roemhildtg
Not sure how I'd code mod that. There's lots of odd cases where you want to keep the scope.vm.stuff
like can-template
Gregg Roemhildt
@roemhildtg
What about this situation? I actually want the "this" value to become the value of toast, because my child renderer template expects that.
<can-import from="spectre-canjs/sp-toast/sp-toast.stache" value:to="scope.vars.toast" />
<div class="toasts">
    {{#for(toast of toasts)}}
        {{#with(toast)}}
        {{>scope.vars.toast}}
        {{/with}}
    {{/for}}
</div>
Is there a better way to do that?
Gregg Roemhildt
@roemhildtg
Thanks @phillipskevin That did fix the issue I was having
I'm also seeing another error in can-view-nodelist
    replace: function (oldElements, newFrag) {
        // The following helps make sure that a selected <option> remains
        // the same by removing `selected` from the currently selected option
        // and adding selected to an option that has the same value.
        var selectedValue,
            parentNode = oldElements[0].parentNode;

        if(parentNode.nodeName.toUpperCase()
The error is because "parentNode" is undefined
Gregg Roemhildt
@roemhildtg
Got any ideas on that one? The oldElements array just contains a text node that is empty.
Gregg Roemhildt
@roemhildtg
Error is occuring in an if statement when a value gets set:
{{#if(projectsPromise.isPending)}}
    <div class="loading"></div>
{{else}}
    <dl-autocomplete 
        options:from="autoCompleteOptions"
        on:value="setSelectedSearch(scope.arguments.0.0)"></dl-autocomplete>

    {{#if(selectedProject)}}
        Error occurs here when selectedProject gets set
    {{/if}}

{{/if}}
Kevin Phillips
@phillipskevin
is that the top-level of the template?
Gregg Roemhildt
@roemhildtg
Yes
Kevin Phillips
@phillipskevin
if you wrap it in a <div> does the error go away?
might be related to canjs/can-stache#202
Gregg Roemhildt
@roemhildtg
Nope. Still happens
Kevin Phillips
@phillipskevin
what is oldElements[0]?
Gregg Roemhildt
@roemhildtg
image.png
A bit up the call stack
image.png
Kevin Phillips
@phillipskevin
what if you wrap Error occurs here when selectedProject gets set in an element?
Gregg Roemhildt
@roemhildtg
Nope
Kevin Phillips
@phillipskevin
ok, if you can reproduce it in a codepen I can take a look
later tonight / tomorrow morning
Gregg Roemhildt
@roemhildtg
Is there a canjs symbol for something like "can.forEach"?
Kevin Phillips
@phillipskevin
there is CanSymbol.iterator
Gregg Roemhildt
@roemhildtg
If I add that, it'll call that function in stache for of ?
Kevin Phillips
@phillipskevin
you're trying to create your own observable you mean?
Gregg Roemhildt
@roemhildtg
Correct. Its kind of like an array...it has a toArray method, and a length property but its not like a normal array where you can do array[0]. So I thought I'd build an iterator function
Kevin Phillips
@phillipskevin
you would need more symbols than that
definitely isObservableLike and isListLike
not sure what else
Andrei Balmus
@abalmush
Hi guys, does anyone has experience with intergating Jest in canjs app?
Gregg Roemhildt
@roemhildtg
I've done this @abalmush
Jest works super well testing view models
Andrei Balmus
@abalmush
@roemhildtg do you have an example especially how to configure it
I have quite old project with canjs 2.3 )
Gregg Roemhildt
@roemhildtg
Weeeeelll, I haven't really needed to configure anything with Jest. That being said I'm writing stuff in es6 now so everything just works.
I'm also using canjs 5
Andrei Balmus
@abalmush
and I tried to get it to work, looks like the instance of canjs inside Component is differetn and I see warning somethig saying that this component is not registered
yeah with Canjs5 should work pretty well