-
-
Notifications
You must be signed in to change notification settings - Fork 408
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
Deprecate non-colocated components. #995
Conversation
Co-authored-by: MrChocolatine <47531779+MrChocolatine@users.noreply.github.com>
Co-authored-by: MrChocolatine <47531779+MrChocolatine@users.noreply.github.com>
Co-authored-by: MrChocolatine <47531779+MrChocolatine@users.noreply.github.com>
Co-authored-by: Jeldrik Hanschke <jelhan@users.noreply.github.com>
👍 I don't see why not. I wouldn't recommened any other way. Just wish we had colocated routes/templates/controllers too so I could finally drop pods 😅 |
I think it's a good idea. For a decently large application you want to migrate to colocated js/hbs as a midway point to gjs anyway. Keep the simple file moves separate from the content changes. It will collapse an entire dimension of complexity for codemods, blueprints, linters, and whatever else may be operating at the file system level. Which will be a boon automating any future Ember migrations and maintaining tools. |
It would be great to have at least a draft of what the deprecation guide should teach. It might be helpful to call out explicitly whether old-style addons that set As an implementation tip: I think the deprecation should happen at runtime at the point where ember resolves a non-collated template. At build-time it's more complicated to try to notice all the ways an addon could cause a template to be resolvable. |
@ef4 added |
Guides and docs already don't mention the above old layouts. | ||
|
||
### How to migrate off old layouts | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add some prose, links, explanation, etc
template.hbs | ||
``` | ||
|
||
**After** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like we should not be recommending the "index" variant for people because of a few bugs around that right now. Sure we can make it work but I think we can just suggest the "non-nested" as the after version in the RFC 🤷
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
index is the transition path from component.js/template.hbs since Octane. It's a primary, first-class, feature -- following classic pre-ESM node resolution rules (where index is always the implicit target of a directory path). We can't just get rid of it (by omission) because there is a bug in the unstable embroider resolver (tho, I think that was fixed! (you fixed it! 💪 ))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We discussed in RFC review and agreed that showing index.js is OK because it's a supported node-ism that we need to continue to support, and any bugs are just bugs that we need to fix (in embroider).
Co-authored-by: Chris Manson <mansona@users.noreply.github.com>
Could we have an example of the colocated layout please or at least a link to it? |
Advance RFC #995 `"Deprecate non-co-located components."` to Stage Ready for Release
Advance RFC #995 `"Deprecate non-co-located components."` to Stage Released
Advance RFC #995 `"Deprecate non-co-located components."` to Stage Recommended
Propose Deprecating non-colocated components.
Rendered
Summary
(to be) DEPRECATED
For components,
<Foo>
and<Namespace::Bar>
These layouts are no longer allowed, for apps, addons, etc.
about rfcs (original placeholder text)
This pull request is proposing a new RFC.
To succeed, it will need to pass into the Exploring Stage), followed by the Accepted Stage.
A Proposed or Exploring RFC may also move to the Closed Stage if it is withdrawn by the author or if it is rejected by the Ember team. This requires an "FCP to Close" period.
An FCP is required before merging this PR to advance to Accepted.
Upon merging this PR, automation will open a draft PR for this RFC to move to the Ready for Released Stage.
Exploring Stage Description
This stage is entered when the Ember team believes the concept described in the RFC should be pursued, but the RFC may still need some more work, discussion, answers to open questions, and/or a champion before it can move to the next stage.
An RFC is moved into Exploring with consensus of the relevant teams. The relevant team expects to spend time helping to refine the proposal. The RFC remains a PR and will have an
Exploring
label applied.An Exploring RFC that is successfully completed can move to Accepted with an FCP is required as in the existing process. It may also be moved to Closed with an FCP.
Accepted Stage Description
To move into the "accepted stage" the RFC must have complete prose and have successfully passed through an "FCP to Accept" period in which the community has weighed in and consensus has been achieved on the direction. The relevant teams believe that the proposal is well-specified and ready for implementation. The RFC has a champion within one of the relevant teams.
If there are unanswered questions, we have outlined them and expect that they will be answered before Ready for Release.
When the RFC is accepted, the PR will be merged, and automation will open a new PR to move the RFC to the Ready for Release stage. That PR should be used to track implementation progress and gain consensus to move to the next stage.
Checklist to move to Exploring
S-Proposed
is removed from the PR and the labelS-Exploring
is added.Checklist to move to Accepted
Final Comment Period
label has been added to start the FCP