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

Missing optional features #925

Closed
rwjblue opened this issue Jul 11, 2019 · 1 comment · Fixed by #955
Closed

Missing optional features #925

rwjblue opened this issue Jul 11, 2019 · 1 comment · Fixed by #955
Labels
help wanted Extra attention is needed

Comments

@rwjblue
Copy link
Contributor

rwjblue commented Jul 11, 2019

The following optional features are missing from /configuring-ember/optional-features/. The prose under each section is directly from the prompt in @ember/optional-features when you run ember feature:enable <feature name>

application-template-wrapper

This will remove the <div class="ember-view"> wrapper for the top-level application template (app/templates/application.hbs).
While this may be a desirable change, it might break your styling in subtle ways:
- Perhaps you were targeting the .ember-view class in your CSS.
- Perhaps you were targeting the <div> element in your CSS (e.g. body > div > .some-child).
- Depending on your choice of rootElement, your app might not be wrapped inside a block-level element anymore.

For more information, see emberjs/rfcs#280.

template-only-glimmer-components

This will change the semantics for template-only components (components without a .js file).
Some notable differences include...
- They will not have a component instance, so statements like {{this}}, {{this.foo}} and {{foo}} will be null or undefined.
- They will not have a wrapper element: what you have in the template will be what is rendered on the screen.
- Passing classes in the invocation (i.e. {{my-component class="..."}}) will not work, since there is no wrapper element to apply the classes to.

While these changes may be desirable for new components, they may unexpectedly break the styling or runtime behavior of your existing components.

To be conservative, it is recommended that you add a .js file for existing template-only components. (You can always delete them later if you aren't relying on the differences.)

For more information, see emberjs/rfcs#278.

@rwjblue rwjblue added the help wanted Extra attention is needed label Jul 11, 2019
@rwjblue
Copy link
Contributor Author

rwjblue commented Jul 11, 2019

IMHO, a good start for documenting these would be copying that prose above but I do suspect we'd want some tweaks...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant