-
-
Notifications
You must be signed in to change notification settings - Fork 407
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 send API #609
Comments
Crosslinking Eslint rule proposal as well: ember-cli/eslint-plugin-ember#753 |
I have a few use cases left in my code, and all are simply because I haven't got around to a complete native class refactor yet. |
@jherdman what does native classes change regarding this? Also, is that path to getting rid of those usages clear? Would be good to know if there are usages that aren't possible (or hard) to implement without this API so an RFC on this can suggest alternatives. |
is the old pattern because you can't |
I am in agreement that we need to deprecate the send api as part of deprecating non-closure actions. However, as long as non-closure actions are a thing, the send api is needed. |
@Gaurav0 it seems like deprecating |
People don't like deprecations, generally. We especially don't want to deprecate things where there is no clear path forward. Actually the way I'd attack this group of stuff is to deprecate action bubbling through routes first. Many people nowadays don't even realize that is there any more! Plus closure actions don't bubble. |
Also an interesting alternative. I also learned the other day that action bubbling from controller to route goes by way of router:main, which blew my mind. I always assumed the controller was directly hooked up to its route. That behavior specifically seemed so nefarious that deprecating that first also makes sense. Considering there are three approaches already discussed, I think a full approach probably will be best.
|
@locks can we add the Deprecation candidate label here? |
Considering |
"unnecessary churn" is pretty subjective. Moving towards removing action handling is a good goal by itself for ergonomics and performance. I don't think it's necessary to think of it as part of controllers or classic components. |
Agreed. Though I do think that an RFC that addresses this would do it as part of an RFC that deprecates "string based actions" and deprecating |
That's fine with me. Closing in favor of #629. |
Are there any use cases of
.send
API anymore that can't be done any other way?Since this is part of the
action_handler
mixin, mayybe it makes sense to deprecate the{{action}}
modifier/helper instead, but I think using.send
should be actively discouraged now?The text was updated successfully, but these errors were encountered: