Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.5.0 rendering reggression #17062

Closed
ilucin opened this issue Oct 10, 2018 · 4 comments
Closed

3.5.0 rendering reggression #17062

ilucin opened this issue Oct 10, 2018 · 4 comments

Comments

@ilucin
Copy link
Contributor

ilucin commented Oct 10, 2018

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 ember@3.4.5; 
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:

  • the issue is only happening on production build
  • the component I'm talking about is rendered as a contextual component whereas model is a contextual property -> I'm suspecting this is pretty important
  • I've tried the 3.6.0-beta.1 build but it's completely broken, cannot even run the app
  • I have {"jquery-integration": false} in my optional-features.json
  • ember-cli@3.4.3, ember-data@3.4.2, ember-engines@0.5.23

Anybody has an idea what might have happened in the last release?

@rwjblue
Copy link
Member

rwjblue commented Oct 10, 2018

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?

@ilucin
Copy link
Contributor Author

ilucin commented Oct 11, 2018

@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 ember@3.4.5.

@mschorsch
Copy link

Is there any progress on this issue? This bug prevents us from upgrading to Ember 3.5.1.

@chancancode
Copy link
Member

I think this is a dup of #17243 and is fixed by #17487 (landed in 3.8 beta)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants