ember-animation / ember-animated

Core animation primitives for Ember.
https://ember-animation.github.io/ember-animated/
MIT License
244 stars 90 forks source link

Getting "Error: Unimplemented" when using moveOver transitions #208

Open AriasBros opened 4 years ago

AriasBros commented 4 years ago

Hi,

I am getting the error Unimplemented when I try to use the moveOver transitions (anyone, I tried with the four transitions).

The exception is thrown only when I change to other route where the same component is used. For example, I use the component in /teams and /team/1 routes, so, if I try to navigate between these routes, I got the error. If I navigate to some of these routes from other route (/leagues, for example), the error doesn't happen.

I have this in my component:

  <AnimatedContainer class="player-slot__footer__animated-container">
    {{#animated-value this.price rules=this.rules as | price |}}
      <div class="player-slot__footer__price">
        <span class="player-slot__footer__price__amount">
          ${{format-number price minimumFractionDigits=1 maximumFractionDigits=1}}m
        </span>

        <Player::Revaluation @player={{this.player}} @type="season" class="player-slot__footer__price__revaluation" />
      </div>
    {{/animated-value}}
  </AnimatedContainer>
  rules({ oldItems, newItems }) {
    if (oldItems[0] < newItems[0]) {
      return toDown;
    } else {
      return toUp;
    }
  }

I am not using a bug issue for this because, as the exception say, what I am trying to do seems to be an unimplemented thing. But I can't understand what I am doing "wrong" to get this exception, I am following the examples in the documentation.

Can someone say me a workaround to this problem?

I attach 2 screenshots with the exception.

Captura de pantalla 2020-04-20 a las 14 52 12 Captura de pantalla 2020-04-20 a las 14 52 27

stukalin commented 4 years ago

Same here with the {{animated-if}}...

fusion2004 commented 4 years ago

It seems to do with the moveOver transitions always expecting there to be a kept or inserted sprite. I ran into this with {{animated-if}} and I was able to fix it by adding an empty div as an else case!

<AnimatedContainer>
  {{#animated-if this.errored rules=this.rules}}
    <MyErrorComponent />
  {{else}}
    <div></div>
  {{/animated-if}}
</AnimatedContainer>
RobbieTheWagner commented 4 years ago

@ef4 any chance we could get rid of the unimplemented errors entirely? We have one we cannot even make happen, but happens under some random conditions, and starts blowing up our error log.

ef4 commented 4 years ago

Yes, absolutely. The error is called "unimplemented" because it's just not written, there's no fundamental limitation. Please do implement.

Benkooo commented 2 years ago

Any update regarding this error please?