Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 15 21:43

    phillipskevin on master

    Update dist for release (compare)

  • Oct 15 21:43

    phillipskevin on v6.1.1

    Update dist for release 6.1.1 (compare)

  • Oct 15 21:34

    phillipskevin on can-observable-mixin-1.0.2

    (compare)

  • Oct 15 21:34

    phillipskevin on master

    fix(package): update can-observ… Merge branch 'master' into gree… Merge pull request #5382 from c… (compare)

  • Oct 15 21:34
    phillipskevin closed #5382
  • Oct 15 21:34

    phillipskevin on can-make-map-1.2.2

    (compare)

  • Oct 15 21:34

    phillipskevin on master

    fix(package): update can-make-m… Merge pull request #5380 from c… (compare)

  • Oct 15 21:34
    phillipskevin closed #5380
  • Oct 15 20:30
    phillipskevin synchronize #5382
  • Oct 15 20:30

    phillipskevin on can-observable-mixin-1.0.2

    fix(package): update can-observ… fix(package): update can-simple… Merge pull request #5372 from c… and 2 more (compare)

  • Oct 15 20:30
    phillipskevin opened #5382
  • Oct 15 20:28

    phillipskevin on can-simple-map-4.3.3

    (compare)

  • Oct 15 20:28

    phillipskevin on master

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

  • Oct 15 20:28
    phillipskevin closed #5378
  • Oct 15 20:26

    phillipskevin on can-observable-mixin-1.0.1

    (compare)

  • Oct 15 20:26

    phillipskevin on master

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

  • Oct 15 20:26
    phillipskevin closed #5372
  • Oct 15 20:25

    phillipskevin on update-make-map

    (compare)

  • Oct 15 20:25
    phillipskevin closed #5381
  • Oct 15 20:21
    phillipskevin opened #5381
Roger K
@thejavascriptist
Went through the chat example on https://jsbin.com/yexezu/3/edit?html,js,output
Its not very clear how a the app would intercept the route change and proces it rather than a simple view updating itsself.
Kevin Phillips
@phillipskevin
ok, I think there's a few different problems...
the can-route-pushstate docs look to be a little out of date
Roger K
@thejavascriptist
ah
Kevin Phillips
@phillipskevin
there is already an issue about listening to routes changing
canjs/can-route#78
Roger K
@thejavascriptist
ha
Kevin Phillips
@phillipskevin
the last part I'm not sure exactly what you mean
what kind of processing do you want to do?
intercept the route change and proces it
Roger K
@thejavascriptist
The requirement that needs to be fulfilled is really simple:
The app must centralize the registering and any processing of a route change to a single function.
The app must accept a url pattern "/aa/{sid}/bb{mid}/cc/" or "/xx/{sid}/bb/{id}"...
There are 30+ url paths, when the location hash is changed, it must trigger a single function which validates security and calls the appropriate component/controller.
(the function may be added n number of times to route.on("sid", fnHandleRouteChange ) route.on("mid", fnHandleRouteChange ) etc... )
...
also the usage of defineMap seems to be an overkill for the purpose based on teh example in the jsbin
adding a simple route('pattern/prop', handler) multiple times should be sufficient?
Kevin Phillips
@phillipskevin
the purpose of can-route is to bind the url to an observable map
Roger K
@thejavascriptist
using pushstate or #! are both ok, urls looking like &aa=sid&bb=mid is not.
would an observable map be https://canjs.com/doc/can-map.html
Kevin Phillips
@phillipskevin
yes, or DefineMap
there is an example on https://canjs.com/doc/migrate-3.html for how to listen to when any property changes
search for Remove use of change events
Roger K
@thejavascriptist
it was mentioned somewhere that can-map was being deprecated so do not use it?
Kevin Phillips
@phillipskevin
it's not deprecated
but it is a legacy api
DefineMap does everything can-map does, but you don't need to call .attr()
to get/set properties
Roger K
@thejavascriptist
oic - Remove use of change events
When you upgrade to use can-define, you’ll no longer receive change events on maps.
is there a working example of a can-route-pushstate that we could test?
that would be really helpful in clearing the confusion we are having in getting it to work.
Kevin Phillips
@phillipskevin
any of the can-route examples
only difference is if you import can-route-pushstate it will use pushstate
Roger K
@thejavascriptist
with the ability to listen to the onChange
or hook up to listen to onchange
tried the following
The example from the url
https://canjs.com/doc/can-route.html
does not throw an exception but the route.data.on("page" ... ) or route.on("page" ... ) is never called.
Kevin Phillips
@phillipskevin
yes, see canjs/can-route#78
or use a can-map
route.data = new CanMap();

route.data.on('change', function() { ... });
Roger K
@thejavascriptist
got it... will test with can-map next, thank you so much... had avoided can-map because of the legacy tag.
btw: when is 4.0.0 scheduled for ?
Kevin Phillips
@phillipskevin
we don't really give planned release dates
and since canjs is broken up into 50+ repos now, 4.0 is kind of ambiguous
Roger K
@thejavascriptist
what is the feature set/changes in it (if the list is publicly available) also a rouch date (q3 q4)
ok.
thanks much @phillipskevin ... testing can map shortly
Kevin Phillips
@phillipskevin
this is the epic for 4.0: canjs/canjs#3140