Move away from deprecated sendAction function #163
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This closes #160. I followed the deprecation guidelines here:
https://deprecations-app-prod.herokuapp.com/deprecations/v3.x/#toc_ember-component-send-action
To show that this actually works to remove the deprecation warning in newer Ember versions that aren’t currently being tested, I made another branch that merged both this one and #162; this Travis job log doesn’t contain the warning that I linked to in #162.
There are some judgment calls in this implementation that I made arbitrarily. For instance, rather than specifying empty implementations for the three actions, I could have checked for their existence before calling them, as in the guidelines. I‘ve also seen some addons throw exceptions when an action isn’t supplied, which I wondered whether may be applicable for
on-change
, but it seemed unnecessary to me.Let me know if you have any changes you’d like to see and thanks for all the work on this!