Skip to content

Conversation

@BlueCutOfficial
Copy link
Contributor

@BlueCutOfficial BlueCutOfficial commented Jun 5, 2025

Description

This PR prepares the ground for Ember 6 support.

In old Ember versions, components were not co-located with their template. Your component would live in app/components/ and its template in app/templates/components. The class and the template were registered separately. The ember-inspector test ember_debug/view-debug-test was initially written with this approach in mind.

Ember 3.13 introduced co-location. The component and its template would live in app/components/, and the method setComponentTemplate was introduced to associate the template with the given class. The previous non-co-located structure was still valid, though, so the registration approach in the ember-inspector tests wasn't updated.

With Ember 6, non-co-located components are no longer supported, and we can only use the setComponentTemplate approach. Tests need to get prepared for this so we can enable Ember 6 on CI.

ℹ️ We assume that the ember-inspector only cares about the components in the registry, not how they get registered. That's the reason why changing the registration so it works for 3.13 to 6.x is possible, and we don't need a way to keep testing the old approach.


This PR follows-up to the discussion on #2642 (comment)

Copy link
Member

@mansona mansona left a comment

Choose a reason for hiding this comment

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

looks great!

@mansona mansona merged commit f059217 into emberjs:main Jun 5, 2025
13 of 16 checks passed
@patricklx
Copy link
Collaborator

ah, I see this PR now @BlueCutOfficial 👍
But it would have been nice to reference previous work to give other contributors recognition...

based on mainmatter#1 (review) and discussion on #2642 (comment)

@mansona
Copy link
Member

mansona commented Jun 5, 2025

@patricklx I asked @BlueCutOfficial to separate out this PR because it's been very hard to follow the larger changes in your other PRs 👍

@BlueCutOfficial
Copy link
Contributor Author

@patricklx Sorry for forgetting the link to our conversation, it wasn't intentional.

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.

3 participants