fix(view): skip view distribution on slot fallback fix #639#640
fix(view): skip view distribution on slot fallback fix #639#640StrahilKazlachev wants to merge 1 commit intoaurelia:masterfrom
Conversation
let ShadowSlot and PassThroughSlot handle nodes/view distribution themselves
|
@StrahilKazlachev nice that you figured this out. This is the most obscure part in this module. Maybe we will need to give it few tests to go together with this. Can you also help with that @StrahilKazlachev |
|
Seems reasonable but I get nervous when changing code in here because there aren't really tests and it's rather complicated and a little shaky code. |
|
@EisenbergEffect @bigopon will testing in such manner suffice? I know those aren't exactly unit tests. |
|
@StrahilKazlachev That looks nice to me. We can test with element first, and then later will test with slot scenarios where it involves only text node. For unit test, I think if you already have pin pointed the issue, maybe a test for that specific part only if possible would be better, @EisenbergEffect 's call |
|
I'd be very happy with some more tests like this, yes :) |
ShadowSlotandPassThroughSlothave custom logic that callsShadowDOM.distributeNodes/ShadowDOM.distributeViewafter binding the fallbackView. Because of thatShadowDOM.distributeViewshould not be called inView.prototype.bindfor fallbackViews. Calling it results in the creation and binding of the fallbackViewfor nested<slot>s even if override is provided for that nested<slot>.@EisenbergEffect @bigopon