ember-inspector icon indicating copy to clipboard operation
ember-inspector copied to clipboard

Show "named blocks"

Open lifeart opened this issue 4 years ago • 6 comments

it will be great to have ability to see "named blocks" usage in component explorer

why?

in ember v3.25.0-beta.1 named blocks enabled

https://github.com/emberjs/ember.js/pull/19318

https://github.com/emberjs/rfcs/blob/master/text/0460-yieldable-named-blocks.md

lifeart avatar Jan 29 '21 10:01 lifeart

@lifeart how exactly would you like this feature to work?

RobbieTheWagner avatar Jan 29 '21 13:01 RobbieTheWagner

@rwwagner90 I think it may be <:slotName><InternalComponentIfExists /></:slotName> in component explorer, if there is no components inside slot (but thers is some dom nodes), it may be <:slotName /> .

lifeart avatar Jan 29 '21 14:01 lifeart

@lifeart would the slots be selectable? If so, what data would we show?

RobbieTheWagner avatar Jan 29 '21 14:01 RobbieTheWagner

Yes, I think slots should be selectable, and we could show slot's position arguments

{{yield (hash a=1) "foo" "bar" to="heder"}}

[ {a: 1}, "foo", "bar" ]

lifeart avatar Jan 29 '21 14:01 lifeart

I would like to see this, but right now we don't really have the information to do it from the debug render tree. So the first step would be to make that work, and then we can work out the display format here

chancancode avatar Mar 11 '21 20:03 chancancode

@chancancode follow-up request - have ability to see "if"s and "each" blocks (areas)

lifeart avatar Mar 11 '21 20:03 lifeart