Skip to content
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

Move away from deprecated sendAction function #163

Merged
merged 1 commit into from
Jun 9, 2020

Conversation

backspace
Copy link
Contributor

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!

@sdhull
Copy link

sdhull commented Dec 15, 2018

Thanks for getting this done! I hope the maintainers merge it soon 🙏

Copy link
Collaborator

@lukemelia lukemelia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than defining the empty actions, I'd prefer to surround each call with a guard to see if the property is defined. That will make our future refactor to Glimmer cleaner.

Also, please use the constants that are defined at the top of the file for WILL_CREATE... and DID_CREATE... action names.

Once those changes are done, we can get this merged and released. 👍

@backspace
Copy link
Contributor Author

👍 thanks for the feedback, I should be able to update this tonight 😀

@backspace backspace force-pushed the closure-actions branch 2 times, most recently from 44ae731 to 96fe380 Compare June 9, 2020 00:12
Copy link
Collaborator

@lukemelia lukemelia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect -- thanks @backspace!

@lukemelia lukemelia merged commit e9ab995 into bustle:master Jun 9, 2020
@lukemelia
Copy link
Collaborator

Released as v0.6.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecation warning in Ember 3.5
3 participants