Found a weird rendering engine regression in 3.5.0 release. The issue is that the DOM isn't updated properly on state change on the component.
I have this in my component's template.hbs:
{{#if isSubmitting}}
<div class="spinner"></div>
{{/if}}
and in component.js:
isSubmitting: reads('model.isSubmitting')
isSubmitting goes from initial false value to true and to false again but in ember 3.5.0 the last state change isn't reflected in the DOM - the spinner stays visible. Here are two short videos proving the component has the correct state but there's a rendering issue in the 3.5.0 version:
The only difference between the two videos is that I've run:
yarn add [email protected];
ember deploy;
In the video, there's a v($0) function in the global scope that does this:
window.v = (el) => owner.lookup('-view-registry:main')[el.id];
... so I'm actually checking the state of that component instance.
Few things that might be relevant here:
model is a contextual property -> I'm suspecting this is pretty important{"jquery-integration": false} in my optional-features.jsonAnybody has an idea what might have happened in the last release?
Hmm, nothing jumps out at me here. Can you tell me more about your setup? What do the components look like (ts or js, decorators, etc)? Do you have any deprecations/assertions in the debug build? Might be hard to debug this without a reproduction that we can dig into (and creating a repro may help us identify what is wrong), would you mind trying to re-recreate the issue in a demo repo?
@rwjblue I've tracked it down. It has something to do with using {defineProperty} from '@ember/object' in production build. Here's a minimal repo reproducing the bug.
This is the output after clicking "boom" when I run it in development:
A: 1,2,3
B: 1,2,3
.. and after ember build --environment=production:
A: 1,2,3
B: 1,2
It works as expected in [email protected].
Is there any progress on this issue? This bug prevents us from upgrading to Ember 3.5.1.
I think this is a dup of #17243 and is fixed by #17487 (landed in 3.8 beta)
Most helpful comment
@rwjblue I've tracked it down. It has something to do with using
{defineProperty} from '@ember/object'in production build. Here's a minimal repo reproducing the bug.This is the output after clicking "boom" when I run it in development:
.. and after
ember build --environment=production:It works as expected in [email protected].