-
Notifications
You must be signed in to change notification settings - Fork 115
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
Doesn't work with flag template-only-glimmer-components #293
Comments
I guess I have to use |
I'm not familiar with template only components and ember-component-css, but maybe try using |
the only way I was able to get it working correctly is by doing the following: init() {
this._super(...arguments);
this.tagName = 'div';
this.classNames =['main-navbar', 'sticky', 'navCTA'];
this.classNameBindings = ['styleNamespace'];
} It would be useful to have logic not to generate outer div if |
I have done I little more digging. The way |
Ya. Template only components aren't currently working with this. The proposed change that is under development will be to use a |
right now to do a "tagless" component with ECC, you have to set the |
I know that isn't what a |
@webark Thanks a lot for quick reply! Let me know if you need a hand getting this working. I would be happy to help! |
What's the status on this? Since it also affects glimmer components I think as well. |
Indeed it does, I have already asked this question in discord. But I guess it will take some time to make it forward compatible. I am more then willing to help but with some directions from maintainer |
Hit this today when working with Glimmer and Sparkles components. Is there any movement forward to get something working for those cases? |
When working with Sparkles Components you can do something like: import Component from 'sparkles-component';
import podNames from 'ember-component-css/pod-names';
export default class ReportConfigButton extends Component {
get styleNamespace() {
return podNames['foo-bar'];
}
} Where I'd imagine that this is similar to what would be wanted when working with the |
ya. if you look in PR #300, you can see the template transform that does that. (i ended up just doing a string adjustment cause it’s always wrapping i don’t have to go through the complexity of a handlebars transform) That PR is held up due to me not really loving the babel transform that adds the styleNamespace into the component js files, and considering having to manually do the imports for addons similarly to how you do the templates with importing the layout |
In Ember 3.13
is no longer true, and if you disable reproduction: https://github.com/knownasilya/repro-3.13-component-css-bug |
The issue from a discussion with @rwjblue |
This doesn't work in Ember 3.15
|
@BryanCrotaz I’m sorry that you are running into this issue. :/ I will release the new beta version soon where you should have access to the class. |
with this add-on installed and
template-only-glimmer-components
turned on wrappingdiv
is being created. It would be nice to provide an element as root to attach auto generated class to.The text was updated successfully, but these errors were encountered: