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

Colocate component templates #1221

Merged
merged 5 commits into from
Sep 5, 2020
Merged

Conversation

jelhan
Copy link
Contributor

@jelhan jelhan commented Sep 3, 2020

Most work was done by ember-component-template-colocation-migrator. Only needed to fix some edge cases, which triggered bugs.

Component template colocation is available since Ember 3.13. As we require Ember 3.16+ and Ember CLI 3.15+ this shouldn't be a breaking change for any consumer.

Not sure why but it seems as if this has triggered a bug in the codemod.
It logged this error:

❌ Did not move '/home/main/Code/ember-ecosystem/ember-bootstrap/addon/templates/components/bs-button-group.hbs' because it was imported by multiple components:
	/components/bs-button-group.js
	/components/bs-button.js

But <BsButton> was not using that template at all. 😕
Copy link
Contributor

@simonihmig simonihmig left a comment

Choose a reason for hiding this comment

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

Thanks for working on this!

Why has bs-tooltip/element.hbs been renamed to bs-contextual-help/element.hbs?
This seems odd, as the bs-contextual-help/element component is basically an abstract class, extended from both by bs-tooltip/element and bs-popover/element.

@jelhan
Copy link
Contributor Author

jelhan commented Sep 5, 2020

Why has bs-tooltip/element.hbs been renamed to bs-contextual-help/element.hbs?
This seems odd, as the bs-contextual-help/element component is basically an abstract class, extended from both by bs-tooltip/element and bs-popover/element.

Good catch. I got confused by the template import in bs-contextual-help/element.js and wrongly assumed that it needs the template. Moved the template back to bs-tooltip/element.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants