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

Support template-only-glimmer-components optional feature #98

Closed
karellm opened this issue Mar 24, 2018 · 7 comments · Fixed by #99
Closed

Support template-only-glimmer-components optional feature #98

karellm opened this issue Mar 24, 2018 · 7 comments · Fixed by #99

Comments

@karellm
Copy link

karellm commented Mar 24, 2018

I was playing with Ember 3.1 and saw a move from innerHTML to outerHTML (see here). From my quick tests, it doesn't seem to play nice with ember-css-modules.

@karellm
Copy link
Author

karellm commented Mar 24, 2018

Discard this, I had a problem with my configuration.

@karellm karellm closed this as completed Mar 24, 2018
@dfreeman
Copy link
Member

@karellm It actually wouldn't surprise me at all if ECM doesn't work with that feature turned on (or, more likely, if it interferes with that feature because of this logic).

If it is a problem, I'm not positive we'll be able to fix it until module unification lands, but I'll keep an eye on things. Please let me know if you run into any issues!

@karellm
Copy link
Author

karellm commented Mar 26, 2018

@dfreeman Thanks for taking the time to check this. local-class still works ok for me. At first I was using class which doesn't work. I will keep experimenting with this and definitely reopen this if I find blocking things.

@mswanson
Copy link

mswanson commented Apr 3, 2018

It appears this bug should be reopened. I just did some testing with a basic Ember 3.1-beta.5 app. Removing the application template wrapper appears to work just fine, but template-only components silently fail and the wrapper div is still present in the DOM (see screenshot)

screenshot 2018-04-02 23 18 06

I am using the latest 3.1 beta versions of ember and ember-cli

screenshot 2018-04-02 23 19 17

ember-cli: 3.1.0-beta.1
node: 9.5.0
os: darwin x64

Steps to reproduce

  1. Installed the latest ember-cli beta yarn global upgrade ember-cli#3.1.0-beta.1
  2. ember install @ember/optional-features
  3. ember feature:disable application-template-wrapper
  4. ember feature:enable template-only-glimmer-components
  5. ember g component my-component
  6. deleted app/components/my-component.js

@dfreeman
Copy link
Member

dfreeman commented Apr 3, 2018

Yep, that's the issue I was expecting to see—thanks for confirming @mswanson!

The short version is that ECM relies on having a component class defined, so it does the equivalent of creating a component.js for you in order to make the local styles work. And that, clearly, gets in the way of the template-only-glimmer-components feature 🙂

I'll reopen this, but I may not have a chance to investigate what the options are in the near future. If anyone's interested in taking a look, though, I'm happy to point you toward what I do know!

@dfreeman dfreeman reopened this Apr 3, 2018
@dfreeman dfreeman changed the title outerHTML support (3.1 optional feature)? Support template-only-glimmer-components optional feature Apr 3, 2018
@mswanson
Copy link

mswanson commented Apr 5, 2018

@dfreeman I can try to take a look. I am expecting my first kid in the next few weeks so i'm not gonna be sleeping anyway! 😄

@dfreeman
Copy link
Member

@mswanson Sorry, I totally lost track of this issue — I hope parenthood is treating you well! If you do find yourself with some spare time at some point, feel free to ping me here or in Slack and I can talk you through what I know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants