-
-
Notifications
You must be signed in to change notification settings - Fork 406
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
Deprecate Array Observers #692
Conversation
|
||
- While array observers are not used commonly in public code, they are used by | ||
several commonly used addons, such as `ember-collection`, | ||
`ember-data-model-fragments`, and `ember-light-table`. Deprecating them will |
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.
Do we want to mention ember-data here? Seems like this might be an intermediate refactor for hasMany objects.
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.
Calling arrayContentWillChange
and arrayContentDidChange
is how an EmberArray triggers array observers. Internally, Ember Data does not rely on array observers at all, but it must call these methods in case others are using them.
This is a good point though, in that it's a similar situation to the one we're facing with implicit injections, Ember Data cannot remove these method calls until there are no more users, which means they cannot immediately comply with a deprecation. So, I think we should make it a phased deprecation, where arrayContentWillChange
and arrayContentDidChange
are fully deprecated in the next major version after array observers themselves are deprecated and removed.
Moving into FCP |
} | ||
|
||
objectAtContent() { | ||
return this._content.objectAt(index); |
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.
index
is not defined here.
Rendered