Remove LinkTo's tagName#19662
Remove LinkTo's tagName#19662nlfurniss wants to merge 2 commits intoemberjs:masterfrom nlfurniss:remove-link-to-tag-name
Conversation
| } | ||
| ); | ||
|
|
||
| this.modernized = false; |
There was a problem hiding this comment.
It is asserted that passing <LinkTo @tagName="div"> still renders an <a> after this removal?
There was a problem hiding this comment.
Good call. I added an assert to the validateArguments method and some tests that assert for this error, but not sure if that's the right place to throw versus where @href throws
|
Needs a rebase (one of the other PR's must have caused a conflict). |
| assert( | ||
| 'Passing the `@tagName` argument to <LinkTo> is not supported.', | ||
| !('tagName' in this.args.named) | ||
| ); |
There was a problem hiding this comment.
Two concerns:
With this implemented as an assert, what does that mean for production? Would a @tagName be applied in production, even if it the assert stopped you in development? Seems bad if so. Maybe it should be a throw.
But, further, IMO we don't need a check at all. I don't think we're planning to add asserts for every old component argument which was removed in 4.0. They were removed, which means passing one of those arguments (like @tagName) could just mean it is ignored. I can ask around on this second point, but the first concern about production behavior not applying the tag name needs to be confirmed.
There was a problem hiding this comment.
Yup, makes sense re: assert. As to the second point, classic components will keep tagName, so it seems like something special will need to be done for linkTo.
|
FYI @nlfurniss I rebased and force pushed this branch. |
mixonic
left a comment
There was a problem hiding this comment.
Per #19669 (comment) we should hold off on this until the built-in components are extracted. @chancancode has kicked off that work I believe.
* Remove the export of `@ember/component/checkbox` * Remove the export of `@ember/component/text-field` * Remove the export of `@ember/component/text-area` * Remove the export of `@ember/component/link-component` * Remove the assignment of `Ember.Checkbox` * Remove the assignment of `Ember.TextField` * Remove the assignment of `Ember.TextArea` * Remove the assignment of `Ember.LinkComponent` * Remove the assignment of `Ember.TextSupport` * Remove the assignment of `Ember.TargetActionSupport` * Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in most places. The remaining are a few spots where there are deprecations targeting *5.0*. * Hard-code the built-in components (`<Textarea>`, `<Input>`, `<LinkTo>`) for the modernized path * Remove the `query-params` helper (it is only needed by the legacy `LinkComponent` and was deprecated). * Review emberjs#19669 and ensure all `disabledWhen` is removed. * Review emberjs#19662 and ensure all `@tagName` support is removed * Review all `ember.built-in-components.*` deprecations and ensure their functionality is removed. * Remove code supporting `ember-glimmer.link-to.positional-arguments`, basically https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts
* Remove the export of `@ember/component/checkbox` * Remove the export of `@ember/component/text-field` * Remove the export of `@ember/component/text-area` * Remove the export of `@ember/component/link-component` * Remove the assignment of `Ember.Checkbox` * Remove the assignment of `Ember.TextField` * Remove the assignment of `Ember.TextArea` * Remove the assignment of `Ember.LinkComponent` * Remove the assignment of `Ember.TextSupport` * Remove the assignment of `Ember.TargetActionSupport` * Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in most places. The remaining are a few spots where there are deprecations targeting *5.0*. * Hard-code the built-in components (`<Textarea>`, `<Input>`, `<LinkTo>`) for the modernized path * Remove the `query-params` helper (it is only needed by the legacy `LinkComponent` and was deprecated). * Review emberjs#19669 and ensure all `disabledWhen` is removed. * Review emberjs#19662 and ensure all `@tagName` support is removed * Review all `ember.built-in-components.*` deprecations and ensure their functionality is removed. * Remove code supporting `ember-glimmer.link-to.positional-arguments`, basically https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts
* Remove the export of `@ember/component/checkbox` * Remove the export of `@ember/component/text-field` * Remove the export of `@ember/component/text-area` * Remove the export of `@ember/component/link-component` * Remove the assignment of `Ember.Checkbox` * Remove the assignment of `Ember.TextField` * Remove the assignment of `Ember.TextArea` * Remove the assignment of `Ember.LinkComponent` * Remove the assignment of `Ember.TextSupport` * Remove the assignment of `Ember.TargetActionSupport` * Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in most places. The remaining are a few spots where there are deprecations targeting *5.0*. * Hard-code the built-in components (`<Textarea>`, `<Input>`, `<LinkTo>`) for the modernized path * Remove the `query-params` helper (it is only needed by the legacy `LinkComponent` and was deprecated). * Review emberjs#19669 and ensure all `disabledWhen` is removed. * Review emberjs#19662 and ensure all `@tagName` support is removed * Review all `ember.built-in-components.*` deprecations and ensure their functionality is removed. * Remove code supporting `ember-glimmer.link-to.positional-arguments`, basically https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts
* Remove the export of `@ember/component/checkbox` * Remove the export of `@ember/component/text-field` * Remove the export of `@ember/component/text-area` * Remove the export of `@ember/component/link-component` * Remove the assignment of `Ember.Checkbox` * Remove the assignment of `Ember.TextField` * Remove the assignment of `Ember.TextArea` * Remove the assignment of `Ember.LinkComponent` * Remove the assignment of `Ember.TextSupport` * Remove the assignment of `Ember.TargetActionSupport` * Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in most places. The remaining are a few spots where there are deprecations targeting *5.0*. * Hard-code the built-in components (`<Textarea>`, `<Input>`, `<LinkTo>`) for the modernized path * Remove the `query-params` helper (it is only needed by the legacy `LinkComponent` and was deprecated). * Review emberjs#19669 and ensure all `disabledWhen` is removed. * Review emberjs#19662 and ensure all `@tagName` support is removed * Review all `ember.built-in-components.*` deprecations and ensure their functionality is removed. * Remove code supporting `ember-glimmer.link-to.positional-arguments`, basically https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts
* Remove the export of `@ember/component/checkbox` * Remove the export of `@ember/component/text-field` * Remove the export of `@ember/component/text-area` * Remove the export of `@ember/component/link-component` * Remove the assignment of `Ember.Checkbox` * Remove the assignment of `Ember.TextField` * Remove the assignment of `Ember.TextArea` * Remove the assignment of `Ember.LinkComponent` * Remove the assignment of `Ember.TextSupport` * Remove the assignment of `Ember.TargetActionSupport` * Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in most places. The remaining are a few spots where there are deprecations targeting *5.0*. * Hard-code the built-in components (`<Textarea>`, `<Input>`, `<LinkTo>`) for the modernized path * Remove the `query-params` helper (it is only needed by the legacy `LinkComponent` and was deprecated). * Review emberjs#19669 and ensure all `disabledWhen` is removed. * Review emberjs#19662 and ensure all `@tagName` support is removed * Review all `ember.built-in-components.*` deprecations and ensure their functionality is removed. * Remove code supporting `ember-glimmer.link-to.positional-arguments`, basically https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts
* Remove the export of `@ember/component/checkbox` * Remove the export of `@ember/component/text-field` * Remove the export of `@ember/component/text-area` * Remove the export of `@ember/component/link-component` * Remove the assignment of `Ember.Checkbox` * Remove the assignment of `Ember.TextField` * Remove the assignment of `Ember.TextArea` * Remove the assignment of `Ember.LinkComponent` * Remove the assignment of `Ember.TextSupport` * Remove the assignment of `Ember.TargetActionSupport` * Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in most places. The remaining are a few spots where there are deprecations targeting *5.0*. * Hard-code the built-in components (`<Textarea>`, `<Input>`, `<LinkTo>`) for the modernized path * Remove the `query-params` helper (it is only needed by the legacy `LinkComponent` and was deprecated). * Review emberjs#19669 and ensure all `disabledWhen` is removed. * Review emberjs#19662 and ensure all `@tagName` support is removed * Review all `ember.built-in-components.*` deprecations and ensure their functionality is removed. * Remove code supporting `ember-glimmer.link-to.positional-arguments`, basically https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts
* Remove the export of `@ember/component/checkbox` * Remove the export of `@ember/component/text-field` * Remove the export of `@ember/component/text-area` * Remove the export of `@ember/component/link-component` * Remove the assignment of `Ember.Checkbox` * Remove the assignment of `Ember.TextField` * Remove the assignment of `Ember.TextArea` * Remove the assignment of `Ember.LinkComponent` * Remove the assignment of `Ember.TextSupport` * Remove the assignment of `Ember.TargetActionSupport` * Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in most places. The remaining are a few spots where there are deprecations targeting *5.0*. * Hard-code the built-in components (`<Textarea>`, `<Input>`, `<LinkTo>`) for the modernized path * Remove the `query-params` helper (it is only needed by the legacy `LinkComponent` and was deprecated). * Review emberjs#19669 and ensure all `disabledWhen` is removed. * Review emberjs#19662 and ensure all `@tagName` support is removed * Review all `ember.built-in-components.*` deprecations and ensure their functionality is removed. * Remove code supporting `ember-glimmer.link-to.positional-arguments`, basically https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts
* Remove the export of `@ember/component/checkbox` * Remove the export of `@ember/component/text-field` * Remove the export of `@ember/component/text-area` * Remove the export of `@ember/component/link-component` * Remove the assignment of `Ember.Checkbox` * Remove the assignment of `Ember.TextField` * Remove the assignment of `Ember.TextArea` * Remove the assignment of `Ember.LinkComponent` * Remove the assignment of `Ember.TextSupport` * Remove the assignment of `Ember.TargetActionSupport` * Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in most places. The remaining are a few spots where there are deprecations targeting *5.0*. * Hard-code the built-in components (`<Textarea>`, `<Input>`, `<LinkTo>`) for the modernized path * Remove the `query-params` helper (it is only needed by the legacy `LinkComponent` and was deprecated). * Review emberjs#19669 and ensure all `disabledWhen` is removed. * Review emberjs#19662 and ensure all `@tagName` support is removed * Review all `ember.built-in-components.*` deprecations and ensure their functionality is removed. * Remove code supporting `ember-glimmer.link-to.positional-arguments`, basically https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts
* Remove the export of `@ember/component/checkbox` * Remove the export of `@ember/component/text-field` * Remove the export of `@ember/component/text-area` * Remove the export of `@ember/component/link-component` * Remove the assignment of `Ember.Checkbox` * Remove the assignment of `Ember.TextField` * Remove the assignment of `Ember.TextArea` * Remove the assignment of `Ember.LinkComponent` * Remove the assignment of `Ember.TextSupport` * Remove the assignment of `Ember.TargetActionSupport` * Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in most places. The remaining are a few spots where there are deprecations targeting *5.0*. * Hard-code the built-in components (`<Textarea>`, `<Input>`, `<LinkTo>`) for the modernized path * Remove the `query-params` helper (it is only needed by the legacy `LinkComponent` and was deprecated). * Review #19669 and ensure all `disabledWhen` is removed. * Review #19662 and ensure all `@tagName` support is removed * Review all `ember.built-in-components.*` deprecations and ensure their functionality is removed. * Remove code supporting `ember-glimmer.link-to.positional-arguments`, basically https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts (cherry picked from commit 5d24ae7)
|
Supplanted by #19806. Thank you @nlfurniss ! |
Part of #19617
Deprecation Guide
Tests pass locally