These are chat archives for canjs/canjs

Sep 2015
Adam L Barrett
Sep 18 2015 04:05

Looking for advice here:
Here is a simplified example of something in an app I am working on

It’s basically a checkbox, that has to make a service call to change some state.
What’s potrayed in the pen is sort of what is hapenning now in the app (though in the example it errors on the 11th request), you click the checkbox, but the state doesn’t change until the request finishes. On error it doesn’t successfully change. The problems is UX related, for example if you hammer it twice, it will change underneath you after the first response returns. Also it is just annoying to see the spinner and wait.

I think I’d like to have it just change the state, make the request, and report and revert the state if the re is an error. But then I still end up with some weirdness when hammering on the thign a few times. What do you think the best way to handle this UI issue is, assuming I cannot change the service?

Sep 18 2015 06:06
how to remove trailing '#!' which automatically added in the url?
David Luecke
Sep 18 2015 14:50
It isn't added if you don't use can.route. You could also use can.route.pushtate
Fred Daoud
Sep 18 2015 15:39
so this is where you all are now... :)
David Luecke
Sep 18 2015 15:39
You found us. No way on hiding ;)
Fred Daoud
Sep 18 2015 15:40
@tracer99 ratted you out to me ;)
Gregg Roemhildt
Sep 18 2015 23:16
Hi all, somewhat new to CanJS, and I'm running into an issue using deferred. Its probably something obvious but when I have a component with a deferred in its viewModel, and multiple components are placed on the page, resolving one deferred resolves each of the components deferred(s). My intent was to have each component use its own deferred and have them resolve individually. Any suggestions?