Conversation
added 2 commits
September 1, 2016 01:28
Previously, we were eagerly evaluating the bound reference and passing
the final value around instead of the reference to the final outlet name
value. This means that given `{{outlet foo}}` when the property `foo`
changes then no updates would be made.
The fix is to avoid eagerly evaluating the reference, band and ensure
that the `ComponentDefition` includes a tag the represents both the
outlet name and the outlet state.
While debugging this, I also came across an untested scenario where we
coerced any falsy values for outlet name into `'main'`. However, we
should only be defaulting to `'main'` if no positional argument is present.
A couple issues are fixed here: * When the initially rendered outlet state was `undefined` an error occurred (due to not handling the missing template case). * When a completely new outlet state object is setup, the `.value` calculation for `TopLevelOutletComponentReference` was completely incorrect (it was looking for `newState.outlets.main.render.template` instead of `newState.render.template`).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
undefinedan erroroccurred (due to not handling the missing template case).
.valuecalculation for
TopLevelOutletComponentReferencewas completelyincorrect (it was looking for
newState.outlets.main.render.templateinstead of
newState.render.template).{{outlet foo}}when the propertyfoochanges then no updates would be made. The fix is to avoid eagerly evaluating the reference, band and ensure that theComponentDefitionincludes a tag the represents both the outlet name and the outlet state. While debugging this, I also came across an untested scenario where we coerced any falsy values for outlet name into'main'. However, we should only be defaulting to'main'if no positional argument is present.Addresses 2 more tests in #14170.