-
Notifications
You must be signed in to change notification settings - Fork 16
Conversation
e2302d9
to
1450944
Compare
@@ -31,7 +31,7 @@ | |||
"@glimmer/util": "^0.26.2" | |||
}, | |||
"devDependencies": { | |||
"@glimmer/application": "^0.5.0", | |||
"@glimmer/application": "^0.7.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this upgrade necessary to fix the issue or can it be moved to a separate PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is necessary for these tests to pass. I could probably do this upgrade in a separate PR still, but it would need to be merged first.
app.scheduleRerender(); | ||
}); | ||
|
||
assert.equal(app.rootElement.textContent.trim(), 'Tom Dale is dope'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A+++++ tests, would test again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Thom.
test/args-test.ts
Outdated
@@ -76,6 +77,106 @@ test('Args smoke test', (assert) => { | |||
parent.firstName = "Thomas"; | |||
}); | |||
|
|||
test('Rendering args derivatives', (assert) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a nitpick but I would prefer test names that are more descriptive, so they are more accessible to future contributors. For example, perhaps instead of "Rendering args derivatives", we could say something like "Tracked properties that depend on args
re-render correctly". The terse names make it difficult to understand at a glance the difference between the two tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
if (!bucket) { return; } | ||
|
||
// TODO: This should be moved to `didUpdate`, but there's currently a | ||
// Glimmer bug that causes it not to be called if the layout doesn't update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to verify, has the Glimmer VM bug that necessitated this been fixed? (Seems like yes.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
@tomdale Updated per review 😃 |
LGTM! 👍 Thank you for the hard work! |
Fixes #66.
The component manager is supposed to update
this.args
on a component when they update. This was not happening at the appropriate time, causing computed properties dependent uponthis.args
to not update in time to reflect in the layout.Args were being updated in the
didUpdate
component manager hook but needed to be updated in theupdate
hook. Updating the args indidUpdate
is too late in the rendering process (didUpdate
indicates that the component has updated already). Theupdate
hook is for updating the component ahead of updating the layout so the layout knows what to render.Also upgrades the @glimmer/application devDependency and removes an unnecessary guard.