machty / emblem.js

Emblem.js - Ember-friendly, indented syntax alternative for Handlebars.js
http://emblemjs.com
MIT License
1.04k stars 81 forks source link

Yielded Components render as Class instead of property #337

Open ilovethebends opened 4 years ago

ilovethebends commented 4 years ago

It seems that for glimmer emblem treats nested properties as classes.

% MyForm::MyFormGroup as |formGroup|
    %formGroup.label @name="Ed"

label gets compiled into a class instead of a property on formGroup

<MyForm::MyFormGroup as |formGroup|>
  <formGroup @name="Ed" class="label"></formGroup>
</MyForm::MyFormGroup>

The other issue I'm finding is that %formGroup.label @name="Ed" gets translated into a block component instead inline.

Thanks in advance!

wmlele commented 4 years ago

Is this dead? It is a real shame because I like emblem, but not supporting glimmer components will make it kind of unusable.

wmlele commented 4 years ago

Added a PR #341

dfriquet commented 4 years ago

I'd be glad to see this issue resolved too. For now, we need to jungle between .emblem and .hbs depending on the use of yielded components or not in the template. And I really miss Emblem's elegance when writing those Handlebars files…

Thanks @wmlele, this PR of yours looks pretty good!

kjhangiani commented 4 years ago

@thec0keman @machty any chance of getting this merged in?

dfriquet commented 3 years ago

@thec0keman @machty Any chance you take a look at this issue in a near future?

@wmlele @kjhangiani Are you using some other fork of EmblemJS in production or have you thrown EmblemJS away altogether?