Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 17 21:58
  • Nov 14 17:40
    nlundquist edited #5424
  • Nov 14 17:40
    nlundquist edited #5424
  • Nov 14 17:39
    nlundquist opened #5424
  • Nov 14 17:39
    nlundquist review_requested #5424
  • Nov 14 17:39

    nlundquist on 107-update-converter-demos

    update can-stache-converters de… (compare)

  • Nov 14 14:32
    greenkeeper[bot] labeled #5423
  • Nov 14 14:32
    greenkeeper[bot] opened #5423
  • Nov 14 14:32

    greenkeeper[bot] on can-route-5.0.1

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

  • Nov 13 13:09

    greenkeeper[bot] on steal-tools-2.2.3

    (compare)

  • Nov 13 12:55

    greenkeeper[bot] on steal-tools-2.2.3

    chore(package): update steal-to… (compare)

  • Nov 13 01:44

    greenkeeper[bot] on @webcomponents

    (compare)

  • Nov 13 01:42

    greenkeeper[bot] on @webcomponents

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

  • Nov 12 05:28
    greenkeeper[bot] commented #5392
  • Nov 12 05:28

    greenkeeper[bot] on core-js-3.4.1

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

  • Nov 11 18:03
    greenkeeper[bot] labeled #5422
  • Nov 11 18:03
    greenkeeper[bot] opened #5422
  • Nov 11 18:03

    greenkeeper[bot] on @feathersjs

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

  • Nov 11 18:02
    greenkeeper[bot] commented #5401
  • Nov 11 18:02

    greenkeeper[bot] on @feathersjs

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

Kevin Phillips
@phillipskevin

I forgot at the Contributor's Meeting that I wanted to show the code for how the JSON is updated in the ViewModel Editor in Devtools.

It was interesting because changes come in from the ViewModel changing in the app and changes also happen when the user edits the JSON in the jsoneditor (third-party plugin) we're using. And both could be changing at the same time.

Whichever one changes, we have to find the patches for what changed and apply it to the other one. It was a good use-case for the value resolver observable in DefineMap. Here's the code if you want to take a look: https://github.com/canjs/can-devtools-components/blob/6075bfe2282f80fdbb081384245e2a86b9125092/viewmodel-editor/viewmodel-editor.js#L65-L102

srikkanthsiki
@srikkanthsiki
hi Justin
Thomas Sieverding
@Bajix
@daffl Very nice work on Feathers. Spot on.
ebriksmanish
@ebriksmanish
Hello Everyone. I have made index.html , index.js, app.stache from "https://canjs.com/doc/guides/setup.html" guide.
And i have also made a file name services.js and import it in index.js like "import services from "./services";"
with content of "https://canjs.com/doc/can-connect.html" 's Demo Stuff.
Now there is problem . It is Appended on UL LI already but when i do tbody and tr , its not working . and another problem is that . How can i iterate it in app.stache file.
but for that I need the data in ViewModel , which i dont know how to fetch it in there.
Kindly Help
Gregg Roemhildt
@roemhildtg

Hey guys, do you think its possible to use Canjs to create something like this?
https://bl.ocks.org/rpgove/53bb49d6ed762139f33bdaea1f3a9e1c

Or do you usually use a library like d3 to do this?

They're basically all just svg's positioned, so a stache template seems doable. I'm just curious if anyone had done something like this before and if there'd be any major caveats
Chasen Le Hara
@chasenlehara
Hi @ebriksmanish, you can share your code here or put it in a JS Bin to show us the problem.
If you haven’t already, I’d recommend going through the chat guide, which shows some basics with can-connect: https://canjs.com/doc/guides/chat.html
This recipe might be helpful too in seeing some examples of using the #each helper: https://canjs.com/doc/guides/recipes/weather-report-simple.html
Chasen Le Hara
@chasenlehara
@roemhildtg I’ve seen projects use D3… I’m not sure what the gotchas would be. I’d do a quick smoke test to see if the basics work.
Julian
@pYr0x
or this this possible?
const Signal = DefineMap.extend("Signaldata", {
  seal: false
}, {
  graph: {identity: true, type: "string"},
  value: "string"
});
Chasen Le Hara
@chasenlehara
Strings should be fine
Julian
@pYr0x
k thx
Julian
@pYr0x
can't i listen on promise with listenTo ?
this.listenTo("dataPromise", () => {
      setTimeout(() => {
        console.log("test");
      }, 10);

    })
dataPromise looks like
dataPromise: {
    get: function (lastSet, resolve) {
      return Select.getList({candidate: this.apiEndpoint}).then((response) => {
        this.select = "all";
        return response;
      });
    }
  },
Julian
@pYr0x
can i set a nested property on a child VM?
<x-dashboard-logistics filter.period:raw="today" filter.organizations:raw="all"></x-dashboard-logistics>
my VM is
export const ViewModel = DefineMap.extend({
  filter: {
    Type: Filter
  }
});
Justin Meyer
@justinbmeyer
@pYr0x you can listen to when the property changes, but not when the promise resolves
You want to know when the value resolves?
Why are you using the resolve based getter but not using resolve?
In 4.0, you should probably be doing the setting of select in a different way .. you should be able to remove that imperative code
let me know what you want that listenTo to do
and I'll help you figure out how to write it
Regarding the deep property set, I'm not sure. I think that might work
Justin Meyer
@justinbmeyer

@/all

If folks have a few min, it would help a lot if you could pick a section and review a part of the Setting Up CanJS guide: https://canjs.github.io/next/doc/guides/setup.html

Please add comments here: https://docs.google.com/document/d/19EPefoI7fRovoCx61HBtFUu0aBGiRSgHrSZ16IQxfWc/edit#heading=h.nzqslfn4opog

(most examples don't work, but it's helpful to know what people think is confusing!!)

Stef
@sronsiek
Hi all - can anyone point me to an example / recipe of file upload implemented in canjs4
Nico R.
@nriesco
Hi, I currently use can3 and while taking a look at this https://jsbin.com/jeligek/3/edit?html,js,console,output I tried to figure out it the code worked on can3 changing <script src="https://unpkg.com/can@4/dist/global/can.all.js"></script> into <script src="https://unpkg.com/can@3/dist/global/can.all.js"></script>. Well it didn’t work. I removed the connectedCallback and changed Default to Value but still didn’t work, what makes it fail?
Jeroen Cornelissen
@jeroencornelissen
Is there a quick way to setup can-route-pushstate with <script src=“https://unpkg.com/can@4/dist/global/can.all.js”> ?
Jeroen Cornelissen
@jeroencornelissen
@nriesco I think you have to render the component <clock-controls> with stache. CanJS3 doesn’t have automount.
Kevin Phillips
@phillipskevin
@nriesco also, you can't pass strings as the view and objects as the ViewModel
you need to do
  view: can.stache('<canvas id="analog" width="255" height="255"></canvas>'),
  ViewModel: can.DefineMap.extend({})
instead of
  view: '<canvas id="analog" width="255" height="255"></canvas>',
  ViewModel: {}
the second version only works in CanJS 4.0
Nico R.
@nriesco
@phillipskevin thanks, I tried but had no luck. I’m just trying versino 4, as all my code has version 3 and was wondering how hard would it be to migrate to canjs4
so modifiying that example seemed like a good exercise to me
to understand what needs to be modified
so I guess there is something else that is not working
Kevin Phillips
@phillipskevin
I'm actually working on a presentation about upgrading to CanJS 4.0 right now
will probably record for youtube next week
but I'll share the link to the slides today
Nico R.
@nriesco
great