Where communities thrive


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

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

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

  • Oct 18 19:08
    cherifGsoul labeled #5390
  • Oct 18 19:07
    cherifGsoul opened #5390
  • Oct 18 18:45
    greenkeeper[bot] labeled #5389
  • Oct 18 18:45
    greenkeeper[bot] opened #5389
  • Oct 18 18:45

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

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

  • Oct 18 18:29

    matthewp on master

    Update dist for release (compare)

  • Oct 18 18:29

    matthewp on v6.1.3

    Update dist for release 6.1.3 (compare)

  • Oct 18 17:59

    matthewp on can-observable-array-1.0.2

    (compare)

  • Oct 18 17:59

    matthewp on master

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

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

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

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

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

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

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

  • Oct 18 09:49
    chasenlehara edited #5384
it would be nice to have some html file that has a custom compnent (e.g. <x-import>) and its content is the stache view and the VM gets passed into this view
currently, <x-entnahmestelle-list> will be rendered but {{bar}} or vm:msg:to="bar"will not work
it does not have to content maybe some new special tag
^^ New can-route is out which makes using it much easier thanks to DefineMap.
No more serialize: false!!!
Gregg Roemhildt
@roemhildtg
Question - in the newest can-stache does #with still create a new scope?
I know #for of does not
Kevin Phillips
@phillipskevin
#with does, yes
we're going to add a #let helper that can be used like #with but without creating a new scope
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