-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #133, creates API for Maps and Lists for consistent data checking #154
base: master
Are you sure you want to change the base?
Conversation
// what do we do here? self.rejectedUpdatedList ? | ||
console.log("REJECTED", e); | ||
console.error("baseConnect.getListData rejected", e); | ||
self.rejectedUpdatedInstance(list, e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be rejectedUpdatedList
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't, "instance" was the best neutral name I could come up with to apply to both a map and a list.
|
||
var behavior = { | ||
init: function() { | ||
// If List and Map are on the behavior, then we go ahead and add the | ||
// isConsistent API information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably avoid having fall-through-cache know anything about can-connect/can/map
. Can you think of a way to avoid this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Off the top of my head no. Based on the suggested requirements, these features would be specific to maps and lists, and made sense to me that if we wanted to have these function features available in templates.
Do you have any suggestions?
Thanks @imjoshdean. Please let me know if you have any thoughts about this stuff. |
Thoughts provided inline! |
@justinbmeyer this is waiting review. |
For #133:
If
can/map
is being used alongsidefall-through-cache
, new attributes will be added toMap
s andList
s.isConsistent()
will return true if the data is actively in sync with the data from the server, false if it's relying onfall-back-cache
's cached data.inconsistencyReason
will return the base connection's rejected promise error, should there be one.