diff --git a/packages/@ember/-internals/environment/lib/env.ts b/packages/@ember/-internals/environment/lib/env.ts index bef9f01d815..64e9c51766d 100644 --- a/packages/@ember/-internals/environment/lib/env.ts +++ b/packages/@ember/-internals/environment/lib/env.ts @@ -66,21 +66,6 @@ export const ENV = { STRUCTURED_PROFILE: false, - /** - Whether to insert a `
` wrapper around the - application template. See RFC #280. - - This is not intended to be set directly, as the implementation may change in - the future. Use `@ember/optional-features` instead. - - @property _APPLICATION_TEMPLATE_WRAPPER - @for EmberENV - @type Boolean - @default true - @private - */ - _APPLICATION_TEMPLATE_WRAPPER: true, - /** Whether to use Glimmer Component semantics (as opposed to the classic "Curly" components semantics) for template-only components. See RFC #278. diff --git a/packages/@ember/-internals/glimmer/lib/component-managers/outlet.ts b/packages/@ember/-internals/glimmer/lib/component-managers/outlet.ts index 39cf2cfd29c..4503ffcb43d 100644 --- a/packages/@ember/-internals/glimmer/lib/component-managers/outlet.ts +++ b/packages/@ember/-internals/glimmer/lib/component-managers/outlet.ts @@ -1,6 +1,4 @@ -import { ENV } from '@ember/-internals/environment'; import type { InternalOwner } from '@ember/-internals/owner'; -import { guidFor } from '@ember/-internals/utils'; import { assert } from '@ember/debug'; import EngineInstance from '@ember/engine/instance'; import { _instrumentStart } from '@ember/instrumentation'; @@ -17,7 +15,6 @@ import type { VMArguments, WithCreateInstance, WithCustomDebugRenderTree, - WithDynamicTagName, } from '@glimmer/interfaces'; import type { Nullable } from '@ember/-internals/utility-types'; import { capabilityFlagsFrom } from '@glimmer/manager'; @@ -26,7 +23,6 @@ import { createConstRef, valueForRef } from '@glimmer/reference'; import { EMPTY_ARGS } from '@glimmer/runtime'; import { unwrapTemplate } from '@glimmer/util'; -import type { SimpleElement } from '@simple-dom/interface'; import type { DynamicScope } from '../renderer'; import type { OutletState } from '../utils/outlet'; import type OutletView from '../views/outlet'; @@ -211,36 +207,5 @@ export class OutletComponentDefinition } export function createRootOutlet(outletView: OutletView): OutletComponentDefinition { - if (ENV._APPLICATION_TEMPLATE_WRAPPER) { - const WRAPPED_CAPABILITIES = Object.assign({}, CAPABILITIES, { - dynamicTag: true, - elementHook: true, - wrapped: true, - }); - - const WrappedOutletComponentManager = class - extends OutletComponentManager - implements WithDynamicTagName - { - getTagName() { - return 'div'; - } - - getCapabilities(): InternalComponentCapabilities { - return WRAPPED_CAPABILITIES; - } - - didCreateElement(component: OutletInstanceState, element: SimpleElement): void { - // to add GUID id and class - element.setAttribute('class', 'ember-view'); - element.setAttribute('id', guidFor(component)); - } - }; - - const WRAPPED_OUTLET_MANAGER = new WrappedOutletComponentManager(); - - return new OutletComponentDefinition(outletView.state, WRAPPED_OUTLET_MANAGER); - } else { - return new OutletComponentDefinition(outletView.state); - } + return new OutletComponentDefinition(outletView.state); } diff --git a/packages/@ember/-internals/glimmer/tests/integration/application/debug-render-tree-test.ts b/packages/@ember/-internals/glimmer/tests/integration/application/debug-render-tree-test.ts index 516cbc2e7c0..c233e605dfb 100644 --- a/packages/@ember/-internals/glimmer/tests/integration/application/debug-render-tree-test.ts +++ b/packages/@ember/-internals/glimmer/tests/integration/application/debug-render-tree-test.ts @@ -1637,9 +1637,7 @@ if (ENV._DEBUG_RENDER_TREE) { args: { positional: [], named: {} }, instance: undefined, template: outlet, - bounds: ENV._APPLICATION_TEMPLATE_WRAPPER - ? this.nodeBounds(this.element) - : this.elementBounds(this.element!), + bounds: this.elementBounds(this.element!), children: [ this.outlet({ type: 'route-template', diff --git a/packages/@ember/-internals/glimmer/tests/integration/application/hot-reload-test.js b/packages/@ember/-internals/glimmer/tests/integration/application/hot-reload-test.js index 0fee258a11b..d004d314e60 100644 --- a/packages/@ember/-internals/glimmer/tests/integration/application/hot-reload-test.js +++ b/packages/@ember/-internals/glimmer/tests/integration/application/hot-reload-test.js @@ -13,10 +13,8 @@ moduleFor( class extends ApplicationTestCase { constructor() { super(...arguments); - this._APPLICATION_TEMPLATE_WRAPPER = ENV._APPLICATION_TEMPLATE_WRAPPER; this._TEMPLATE_ONLY_GLIMMER_COMPONENTS = ENV._TEMPLATE_ONLY_GLIMMER_COMPONENTS; - ENV._APPLICATION_TEMPLATE_WRAPPER = false; ENV._TEMPLATE_ONLY_GLIMMER_COMPONENTS = true; let didCreateReloader = (reloader) => { @@ -81,7 +79,6 @@ moduleFor( teardown() { super.teardown(); - ENV._APPLICATION_TEMPLATE_WRAPPER = this._APPLICATION_TEMPLATE_WRAPPER; ENV._TEMPLATE_ONLY_GLIMMER_COMPONENTS = this._TEMPLATE_ONLY_GLIMMER_COMPONENTS; } diff --git a/packages/@ember/-internals/glimmer/tests/integration/application/rendering-test.js b/packages/@ember/-internals/glimmer/tests/integration/application/rendering-test.js index 1b56761835f..83028cc0c6e 100644 --- a/packages/@ember/-internals/glimmer/tests/integration/application/rendering-test.js +++ b/packages/@ember/-internals/glimmer/tests/integration/application/rendering-test.js @@ -1,6 +1,5 @@ import { moduleFor, ApplicationTestCase, strip } from 'internal-test-helpers'; -import { ENV } from '@ember/-internals/environment'; import Controller from '@ember/controller'; import Route from '@ember/routing/route'; import { service } from '@ember/service'; @@ -13,29 +12,7 @@ import { runTask } from '../../../../../../internal-test-helpers/lib/run'; moduleFor( 'Application test: rendering', class extends ApplicationTestCase { - constructor() { - super(...arguments); - this._APPLICATION_TEMPLATE_WRAPPER = ENV._APPLICATION_TEMPLATE_WRAPPER; - } - - teardown() { - super.teardown(); - ENV._APPLICATION_TEMPLATE_WRAPPER = this._APPLICATION_TEMPLATE_WRAPPER; - } - - ['@test it can render the application template with a wrapper']() { - ENV._APPLICATION_TEMPLATE_WRAPPER = true; - - this.addTemplate('application', 'Hello world!'); - - return this.visit('/').then(() => { - this.assertComponentElement(this.element, { content: 'Hello world!' }); - }); - } - ['@test it can render the application template without a wrapper']() { - ENV._APPLICATION_TEMPLATE_WRAPPER = false; - this.addTemplate('application', 'Hello world!'); return this.visit('/').then(() => { diff --git a/packages/@ember/application/tests/visit_test.js b/packages/@ember/application/tests/visit_test.js index a33ba9ac260..ab4f71d9cf0 100644 --- a/packages/@ember/application/tests/visit_test.js +++ b/packages/@ember/application/tests/visit_test.js @@ -15,7 +15,6 @@ import Engine from '@ember/engine'; import Route from '@ember/routing/route'; import { Component, helper, isSerializationFirstNode } from '@ember/-internals/glimmer'; import { compile } from 'ember-template-compiler'; -import { ENV } from '@ember/-internals/environment'; function expectAsyncError() { RSVP.off('error'); @@ -26,7 +25,6 @@ moduleFor( class extends ApplicationTestCase { teardown() { RSVP.on('error', onerrorDefault); - ENV._APPLICATION_TEMPLATE_WRAPPER = false; super.teardown(); } @@ -52,7 +50,6 @@ moduleFor( rootElement, }; - ENV._APPLICATION_TEMPLATE_WRAPPER = false; return this.visit('/', bootOptions).then(() => { assert.equal( rootElement.innerHTML, @@ -75,8 +72,6 @@ moduleFor( _renderMode: 'serialize', }; - ENV._APPLICATION_TEMPLATE_WRAPPER = false; - return this.visit('/', bootOptions) .then((instance) => { assert.ok( diff --git a/packages/ember/tests/routing/toplevel_dom_test.js b/packages/ember/tests/routing/toplevel_dom_test.js index 57c5d7aa701..805bd02f064 100644 --- a/packages/ember/tests/routing/toplevel_dom_test.js +++ b/packages/ember/tests/routing/toplevel_dom_test.js @@ -1,32 +1,9 @@ -import { ENV } from '@ember/-internals/environment'; import { moduleFor, ApplicationTestCase } from 'internal-test-helpers'; moduleFor( 'Top Level DOM Structure', class extends ApplicationTestCase { - constructor() { - super(...arguments); - this._APPLICATION_TEMPLATE_WRAPPER = ENV._APPLICATION_TEMPLATE_WRAPPER; - } - - teardown() { - super.teardown(); - ENV._APPLICATION_TEMPLATE_WRAPPER = this._APPLICATION_TEMPLATE_WRAPPER; - } - - ['@test topmost template with wrapper']() { - ENV._APPLICATION_TEMPLATE_WRAPPER = true; - - this.addTemplate('application', 'hello world'); - - return this.visit('/').then(() => { - this.assertComponentElement(this.element, { content: 'hello world' }); - }); - } - ['@test topmost template without wrapper']() { - ENV._APPLICATION_TEMPLATE_WRAPPER = false; - this.addTemplate('application', 'hello world'); return this.visit('/').then(() => { diff --git a/packages/internal-test-helpers/lib/test-cases/abstract-application.ts b/packages/internal-test-helpers/lib/test-cases/abstract-application.ts index bfae6b31741..05acec12a80 100644 --- a/packages/internal-test-helpers/lib/test-cases/abstract-application.ts +++ b/packages/internal-test-helpers/lib/test-cases/abstract-application.ts @@ -1,6 +1,5 @@ import type { EmberPrecompileOptions } from 'ember-template-compiler'; import { compile } from 'ember-template-compiler'; -import { ENV } from '@ember/-internals/environment'; import AbstractTestCase from './abstract'; import { runDestroy, runTask, runLoopSettled } from '../run'; import type { BootOptions } from '@ember/engine/instance'; @@ -48,9 +47,7 @@ export default abstract class AbstractApplicationTestCase extends AbstractTestCa return this._element; } - let element = document.querySelector( - ENV._APPLICATION_TEMPLATE_WRAPPER ? '#qunit-fixture > div.ember-view' : '#qunit-fixture' - ); + let element = document.querySelector('#qunit-fixture'); return (this._element = element); } diff --git a/tests/docs/expected.js b/tests/docs/expected.js index f781f6fe1b7..fa28446307c 100644 --- a/tests/docs/expected.js +++ b/tests/docs/expected.js @@ -7,7 +7,6 @@ module.exports = { 'LOG_STACKTRACE_ON_DEPRECATION', 'LOG_VERSION', '[]', - '_APPLICATION_TEMPLATE_WRAPPER', '_DEBUG_RENDER_TREE', '_DEFAULT_ASYNC_OBSERVERS', '_NO_IMPLICIT_ROUTE_MODEL', diff --git a/tests/index.html b/tests/index.html index 97c3ba250b6..ed768814b5e 100644 --- a/tests/index.html +++ b/tests/index.html @@ -28,7 +28,6 @@ if (edition === 'octane') { EmberENV._TEMPLATE_ONLY_GLIMMER_COMPONENTS = true; - EmberENV._APPLICATION_TEMPLATE_WRAPPER = false; EmberENV._DEFAULT_ASYNC_OBSERVERS = true; } diff --git a/tests/node/app-boot-test.js b/tests/node/app-boot-test.js index 0f9aee5519a..92ce303be90 100644 --- a/tests/node/app-boot-test.js +++ b/tests/node/app-boot-test.js @@ -36,7 +36,7 @@ QUnit.module('App Boot', function (hooks) { return this.renderToHTML('/').then(function (html) { assert.htmlMatches( html, - '

Hello World

The files are *inside* the computer?!

' + '

Hello World

The files are *inside* the computer?!

' ); }); }); @@ -50,7 +50,7 @@ QUnit.module('App Boot', function (hooks) { return this.renderToHTML('/').then(function (html) { assert.htmlMatches( html, - '' + '

Go to photos

' ); }); }); @@ -64,7 +64,7 @@ QUnit.module('App Boot', function (hooks) { return this.renderToHTML('/').then(function (html) { assert.htmlMatches( html, - '' + '

Go to photos

' ); }); }); @@ -80,10 +80,7 @@ QUnit.module('App Boot', function (hooks) { }); return this.renderToHTML('/').then(function (html) { - assert.htmlMatches( - html, - '

Hello world

' - ); + assert.htmlMatches(html, '

Hello world

'); }); }); @@ -99,19 +96,13 @@ QUnit.module('App Boot', function (hooks) { let promises = []; promises.push( this.renderToHTML('/').then(function (html) { - assert.htmlMatches( - html, - '

index

' - ); + assert.htmlMatches(html, '

index

'); }) ); promises.push( this.renderToHTML('/photos').then(function (html) { - assert.htmlMatches( - html, - '

photos

' - ); + assert.htmlMatches(html, '

photos

'); }) ); @@ -150,10 +141,7 @@ QUnit.module('App Boot', function (hooks) { this.template('application', "
"); return this.renderToHTML('/').then(function (html) { - assert.htmlMatches( - html, - '
' - ); + assert.htmlMatches(html, '
'); }); }); }); diff --git a/tests/node/fastboot-sandbox-test.js b/tests/node/fastboot-sandbox-test.js index 72427206550..1ca6af7df26 100644 --- a/tests/node/fastboot-sandbox-test.js +++ b/tests/node/fastboot-sandbox-test.js @@ -56,7 +56,6 @@ function buildSandboxContext(precompile) { ` var EmberENV = { _TEMPLATE_ONLY_GLIMMER_COMPONENTS: true, - _APPLICATION_TEMPLATE_WRAPPER: false, _DEFAULT_ASYNC_OBSERVERS: true, _JQUERY_INTEGRATION: false, };`,