Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 14 21:13
    greenkeeper[bot] labeled #5378
  • Oct 14 21:12
    greenkeeper[bot] opened #5378
  • Oct 14 21:12

    greenkeeper[bot] on can-simple-map-4.3.3

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

  • Oct 14 20:19
    greenkeeper[bot] labeled #5377
  • Oct 14 20:19
    greenkeeper[bot] opened #5377
  • Oct 14 20:19

    greenkeeper[bot] on @feathersjs

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

  • Oct 14 20:18
    greenkeeper[bot] labeled #5376
  • Oct 14 20:18
    greenkeeper[bot] opened #5376
  • Oct 14 20:18

    greenkeeper[bot] on @feathersjs

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

  • Oct 14 14:43
    greenkeeper[bot] closed #5373
  • Oct 14 14:43

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

    (compare)

  • Oct 14 14:42

    m-mujica on update-deep-observable

    (compare)

  • Oct 14 14:42

    m-mujica on master

    Update can-deep-observable to l… Merge pull request #5374 from c… (compare)

  • Oct 14 14:42
    m-mujica closed #5374
  • Oct 14 14:42
    m-mujica closed #5365
  • Oct 14 14:09
    f-ricci starred canjs/canjs
  • Oct 14 13:55
    greenkeeper[bot] commented #5375
  • Oct 14 13:55

    greenkeeper[bot] on core-js-3.3.2

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

  • Oct 14 10:51
    m-mujica review_requested #5374
  • Oct 14 07:43
    rjgotten commented #5358
Adam L Barrett
@BigAB
You still get all the cool power of canjs observables, like models and can-connect and whatnot, but instead of stash you connect them to react components that update when observed props change
Kevin Phillips
@phillipskevin
@/all I just published some updates to the Routing Guide: https://canjs.com/doc/guides/routing.html
There are new sections on:
  • Programmatically creating components for your routes in your view-model
  • Progressively loading these components
Julian
@pYr0x
:thumbsup:
Thomas Sieverding
@Bajix
@BigAB Thanks I’ll look at that
Thomas Sieverding
@Bajix
@BigAB Yea this looks really nice. This looks like it should work with all CanJS observables too from what I can tell.
This is already in a usable state?
Adam L Barrett
@BigAB
Yeah, maps with .attr() don't really fit the paradigm though, because you don't want your react components to "know" they are dealing with anythign other than a plan object, but technically I think it would work with all the observables (I think)
Thomas Sieverding
@Bajix
I thought attr was already gone?
Adam L Barrett
@BigAB
@Bajix We are currently using it on a couple of projects, so yes, but there is still a bit of flux
Thomas Sieverding
@Bajix
As far as direction goes or?
Adam L Barrett
@BigAB
Well, if you're keeping up to date, you probably aren't using .attr() but they did just release a package for adding attr maps
Thomas Sieverding
@Bajix
I just really like the idea of using CanJS observables w/ React if not for any other reason than to take advantage of all that sweet sweet open source React stuff
Adam L Barrett
@BigAB
Yeah, as far as direction in marketing and training more than anything, and what features we want to add moving forward as well, but the connect() api is pretty stable
Thomas Sieverding
@Bajix
Connect can accept a DefineMap.extend and doesn’t need to extend from ObserveObject right?
Is ObserveObject something from Can?
Nvm it’s part of can-observe
The ObserveObject here === that from can-observe? import { connect, ObserveObject } from "ylem”;
Thomas Sieverding
@Bajix
Does CanJS work w/ VueJS?
Justin Meyer
@justinbmeyer
@Bajix yes, ObserveObject === can-observe
there's no VueJS integration
Adam L Barrett
@BigAB
...yet :)
(not a hint or anything, there's nothing in the works at all or anything, I just didn't want to rule out the possibility)
Thomas Sieverding
@Bajix
@justinbmeyer Do you know if CanJS observables are interoperable with VueJS observables presently? I think that the next major version of Vue will be more split up, and if they make their observables standalone, then it should be viable to use steal config maps to swap something that implements the same interface but uses Can observables. It would be interesting if they’d even consider using Can observables in lieu of their own considering how much more advanced they are.
Justin Meyer
@justinbmeyer
@Bajix I don't know. I know they have a similar system. But I've only briefly skimmed the mechanics. It's not event based I think. I think there's just one "listener" for each observable value.
but I might also be thinking of easy-react-state or whatever it is called
Gregg Roemhildt
@roemhildtg
Quick(ish) question. Do you guys think it'd be possible to use can-stache as a templating language that would output a different format than html? I'd like to design a JSON file, that serves as a template that I could run through my template renderer with helpers and context and output plain json.
This template file would resemble json, but would have stache tags inside it that would be replaced by my helpers and context.

Just to give you an example, this json file :

 [{
                                    "text": "Date & Time of inspection",
                                    "style": "grayb"
                                },
                                {
                                    "style": "gray",
                                    "text": "{{helpers.moment(data.inspection.DateCreated, format=M/D/YYYY H:m A)}}"
                                }
                            ],
                            [{
                                    "text": "Weather Conditions:",
                                    "style": "grayb"
                                },
                                {
                                    "style": "gray",
                                    "text": "{{data.inspection.WeatherCondition::None Specified}}"
                                }
                            ],

Should compile down to plain json where the special tags would be replaced by my scope and helper output

Gregg Roemhildt
@roemhildtg
I think dot will work for this actually http://olado.github.io/doT/
Justin Meyer
@justinbmeyer
@roemhildtg you'd want to make stache text-only
so it doesn't produce fragments
About to discuss proposals: https://www.youtube.com/watch?v=2WM0WOAY_jE
Matthew Phillips
@matthewp
Watch that ^^
kostya.aderiho
@kaderiho
Hi guys, Is there any approach to understand that component's stache template is rendered, I want to run my callback once component is rendered. The inserted method is not appropriate because there are some async data in the viewModel and template is rendered with some delay. I will appreciate any help. Thanks!
Frank Lemanschik
@frank-dspeed
@kaderiho i solve that via a next Tick operation after the async operation
so for example if the async operation is fetching data and returning a promise i simply integrate at that point a next tick operation or a timer to get next tick
a other nice way is also if its a standart async operation that returns a promise to call a function inside the stache template once promise is resolved
a example where i am using that is a animated gallery that i init after the stache template is rendered and data is fetched
via the stache template
Frank Lemanschik
@frank-dspeed
{{#if listArtist.isResolved}}
    <div  on:inserted="initGallery()" class="justified-gallery justifiedGallery" id="puppies">
        {{#listArtist.value}}
        <!-- https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQN8oh9a91sQGeOjg7DwZFAaecnWnLlUoVEREk-yDlbr75vcbHG  on:click="doSomething(%element)"-->

          <div id="{{_id}}">
            <a  href="{{routeUrl ( page='details'  )}}&artistId={{_id}}"><img alt="{{name}}" data-artist-id="{{_id}}"  src="http://master.peep:3030/bilder/{{_id}}/{{mainImage}}" /></a>
          </div>

        {{/listArtist.value}}
        <br />
    </div>
    <a href="{{routeUrl ( page='session' )}}"><button style="width: 100%;" class="btn btn-success">BUCHUNG ABSCHLIESSEN</button></a>
    {{/if}}
look at the on:inserted
this is for example one easy way to fire a function after data is Resolved
Frank Lemanschik
@frank-dspeed
but if your a current canjs user you need to import something to make this on:inserted work again
as far as i remember

@kaderiho can you describe more about your problem? I'm not sure I understand it. Component's templates are rendered immediately. So I'm not sure what you mean by:

template is rendered with some delay

Matthew Phillips
@matthewp
Please fill out the community survey! https://www.surveymonkey.com/r/donejs-survey-8
qantourisc
@qantourisc
Where to unlisten to event to prevent memory leaks ?
Kevin Phillips
@phillipskevin
how are you listening to the event, @qantourisc ?
RanjanSubbiah-tc
@RanjanSubbiah-tc
hey guys, Is it possible to do live-bindings using can-slot? https://canjs.com/doc/can-component/can-slot.html
{{#each ./slides}}

        <can-slot name="nameOfImage" isActiveYes:from="../isActive(scope.index)"/>

        <content />

{{/each}}

<can-template name="nameOfImage">

        <div
            class="slide photosSlide {{#if ./isActiveYes}} active {{/if}}"
            tabindex="{{#if ./isActiveYes}} 0 {{else}} -1 {{/if}}"
        >
               </div>
</can-template>