-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Simple extension of {{link-to}} component fails #13432
Comments
The thing is this is working properly because there is no longer an inline version of |
This is going to cause a breaking change in a bunch of addons, in a way that makes it quite difficult to write tests around (i.e., existing behavior should work, but only for Ember <= 2.5) and potentially confusing to consume as a developer. I would argue that this change violates SemVer, since we advise people to customize {{link-to}} by reopening it or extending it. Just like with a public API surface, common usage patterns that were valid (and officially supported) in Ember 2.5 should continue in 2.6+. |
Can you list a few for context?
I am not sure that non-block usage of something extending from Either way, I agree that if this is commonly in use in the wild that we either need to fix or revert. |
I'm not sure developers understand that there's a distinction between what's supported for "inline form" and "block form" of what is (apparently) the exact same component. My hunch is that many developers see block vs. inline as two different ways of consuming a single API surface, and simply make a choice as to whether they need complex content (a |
(can I petition for the inline @mike-north I have checked some of those |
👍 ya we do this and I would say it feels like something one should be able to do. |
@locks - some of those are addons. How can you be assured that consuming apps do not use the published components in inline form?
To be clear, this is sort of the point I'm trying to make (it's a breaking change, and would constitute a major version increment). |
Just to be clear, we have to fix this regression. The question now is if we should just deprecate the inline form for extended components. I think that I would prefer to deprecate, but either way we have to ensure extending from |
Thanks for confirming that this a break @rwjblue - I will write a failing test for this in ~3 days if nobody else has gotten to it by then. |
…js#13432 This PR partially reverts emberjs#12229 given that it made the inline form of components extending from `LinkTo` impossible. Beware that matching the exact behaviour is not there yet (as it wasn't before emberjs#12229) given that {{{link-to title route}}} would unescape title while {{{my-link-to title route}}} would not. This behaviour was not working before and therefore is not working after this revert. This PR does not address whether the inline form for link-to should be deprecated or not.
Fixed by #13438. |
This PR partially reverts #12229 given that it made the inline form of components extending from `LinkTo` impossible. Beware that matching the exact behaviour is not there yet (as it wasn't before #12229) given that {{{link-to title route}}} would unescape title while {{{my-link-to title route}}} would not. This behaviour was not working before and therefore is not working after this revert. This PR does not address whether the inline form for link-to should be deprecated or not. (cherry picked from commit 04390f1)
…js#13432 This PR partially reverts emberjs#12229 given that it made the inline form of components extending from `LinkTo` impossible. Beware that matching the exact behaviour is not there yet (as it wasn't before emberjs#12229) given that {{{link-to title route}}} would unescape title while {{{my-link-to title route}}} would not. This behaviour was not working before and therefore is not working after this revert. This PR does not address whether the inline form for link-to should be deprecated or not.
In ember 2.5, one can extend the
{{link-to}}
component as followsmy-component.js
my-component.hbs
(copied from the framework template for link-to, and very slightly tweaked)
Example: https://ember-twiddle.com/488364295bf020f03f62307c7f9e0349?fileTreeShown=false&numColumns=2&openFiles=components.my-link.js%2Ctemplates.components.my-link.hbs
If you switch the framework version to the beta channel, this example fails, and the error that's thrown seems to indicate a change in the ordering of parameters
The text was updated successfully, but these errors were encountered: