Skip to content

Commit

Permalink
Merge pull request #20722 from boris-petrov/remove-template-only-glim…
Browse files Browse the repository at this point in the history
…mer-components

Remove checks for no longer existing optional features
  • Loading branch information
ef4 authored Aug 7, 2024
2 parents a5be201 + d37f2f7 commit 85fa73f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 25 deletions.
18 changes: 0 additions & 18 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,24 +78,6 @@ module.exports = {
);
}

if (
optionalFeaturesMissing ||
optionalFeatures.isFeatureEnabled('application-template-wrapper')
) {
message.push(
`* The application-template-wrapper optional feature should be disabled under Octane, run \`ember feature:disable application-template-wrapper\` to disable it`
);
}

if (
optionalFeaturesMissing ||
!optionalFeatures.isFeatureEnabled('template-only-glimmer-components')
) {
message.push(
`* The template-only-glimmer-components optional feature should be enabled under Octane, run \`ember feature:enable template-only-glimmer-components\` to enable it`
);
}

if (message.length > 0) {
message.unshift(
`You have configured your application to indicate that it is using the 'octane' edition (via \`setEdition('octane')\`), but the appropriate Octane features were not enabled:\n`
Expand Down
9 changes: 5 additions & 4 deletions packages/@ember/component/template-only.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
without adding a wrapping `<div>` (or any of the other element customization behaviors of [@ember/component](/ember/release/classes/Component)).
Specifically, this means that the template will be rendered as "outer HTML".
In general, this method will be used by build time tooling and would not be directly written in an application. However,
at times it may be useful to use directly to leverage the "outer HTML" semantics mentioned above. For example, if an addon would like
to use these semantics for its templates but cannot be certain it will only be consumed by applications that have enabled the
`template-only-glimmer-components` optional feature.
In apps, this method will usually be inserted by build-time tooling the handles converting `.hbs` files into component Javascript modules and
would not be directly written by the application author.
Addons may want to use this method directly to ensure that a template-only component is treated consistently in all Ember versions (Ember versions
before 4.0 have a "template-only-glimmer-components" optional feature that causes a standalone `.hbs` file to be interpreted differently).
@example
Expand Down
4 changes: 1 addition & 3 deletions smoke-tests/app-template/config/optional-features.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"application-template-wrapper": false,
"default-async-observers": true,
"jquery-integration": false,
"template-only-glimmer-components": true
"jquery-integration": false
}

0 comments on commit 85fa73f

Please sign in to comment.