Skip to content

Deprecate <LinkTo> Component Positional Arguments#698

Merged
rwjblue merged 2 commits intomasterfrom
deprecate-link-to-positional-args
Jan 15, 2021
Merged

Deprecate <LinkTo> Component Positional Arguments#698
rwjblue merged 2 commits intomasterfrom
deprecate-link-to-positional-args

Conversation

@chancancode
Copy link
Member

@chancancode chancancode force-pushed the deprecate-link-to-positional-args branch from 1934284 to 80dc688 Compare January 6, 2021 09:35
@chancancode chancancode added this to the 4.0 milestone Jan 6, 2021
@chancancode chancancode linked an issue Jan 6, 2021 that may be closed by this pull request
@chancancode chancancode added T-framework RFCs that impact the ember.js library T-components labels Jan 6, 2021
@chancancode chancancode force-pushed the deprecate-link-to-positional-args branch from 80dc688 to c9e48a9 Compare January 6, 2021 09:58
Copy link
Contributor

@snewcomer snewcomer left a comment

Choose a reason for hiding this comment

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

Excited for a day where positional args are removed from the framework! This is a great step.

</LinkTo>
```

These migrations can be automated using the [angle brackets codemod](https://github.com/ember-codemods/ember-angle-brackets-codemod).
Copy link
Contributor

Choose a reason for hiding this comment

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

This is great!

The `<LinkTo>` built-in component started life as a "helper" in the early days
of Ember, even before an official components API was created. Over time, it
became clear that `<LinkTo>` is better classified as a component than a helper
in modern Ember, and the learning materials have been updated accordingly.
Copy link
Contributor

Choose a reason for hiding this comment

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

https://guides.emberjs.com/release/routing/linking-between-routes/#toc_the-linkto--component

Do we want to reference any links for future readers or are they at risk to change?

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for including the link here so people reviewing the PR can find them. That said, there are also other places, such as the tutorial. This is meant to include all of these so I don't think we need to link from the RFC text itself.

@rwjblue
Copy link
Member

rwjblue commented Jan 8, 2021

Excited for a day where positional args are removed from the framework!

Hehe, I'm not so sure that this specifically will happen (helpers and modifiers will also use positional params still).

@rwjblue
Copy link
Member

rwjblue commented Jan 8, 2021

Moving into final comment period. We will work on adding a nice ember-template-lint rule with a --fix for this.

Co-authored-by: Matthew Beale <matt.beale@madhatted.com>
@rwjblue rwjblue merged commit dfb3fc8 into master Jan 15, 2021
@rwjblue rwjblue deleted the deprecate-link-to-positional-args branch January 15, 2021 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Final Comment Period T-components T-framework RFCs that impact the ember.js library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deprecate positional arguments and non-block usage of {{link-to}}

5 participants