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

Co-locate component templates #661

Merged
merged 1 commit into from Apr 9, 2022
Merged

Conversation

ef4
Copy link
Contributor

@ef4 ef4 commented Apr 8, 2022

This PR co-locates the component templates with their JS files.

This is an important change because without it users cannot easily adopt first-class component templates.

Co-located templates stay bound to the corresponding class even when you pass the class through arbitrary Javascript. Non-co-located templates don't.

Component template co-location is supported in all the ember versions this addon supports. So this should not be a breaking change. Any users who were overriding these templates with their own implementations would break, but those users are necessarily relying on private API (the API between each component JS and its own template).

This PR co-locates the component templates with their JS files.

This is an important change because without it users cannot easily adopt [first-class component templates](https://github.com/emberjs/rfcs/blob/master/text/0779-first-class-component-templates.md).

Co-located templates stay bound to the corresponding class even when you pass the class through arbitrary Javascript. Non-co-located templates don't.

Component template co-location is supported in all the ember versions this addon supports. So this should not be a breaking change. Any users who were overriding these templates with their own implementations *would* break, but those users are necessarily relying on private API (the API between each component JS and its own template).
@cibernox
Copy link
Owner

cibernox commented Apr 9, 2022

I'll merge this and release it as a new major version then.

Thanks!

@cibernox cibernox merged commit 13f099a into cibernox:master Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants