sbb-design-systems / sbb-angular

Angular Library for SBB
https://angular.app.sbb.ch
Other
105 stars 22 forks source link

[Bug]: accordion expansion panel flickers when parent animation present #2055

Open daniel-sc opened 8 months ago

daniel-sc commented 8 months ago

Preflight Checklist

Bug type

Functionality

Which version are you using

16.7.1

Operating system

Windows 10

Browser / Browser version

Chrome 118

Input mode

None

Additional settings

No response

What happened?

When adding a new accordion panel and triggering an animation at some parent component at the same time, the new accordion is (wrongly) displayed expanded and only after the parent animation finishes, it is displayed as non-expanded. (see stackblitz below).

Steps to reproduce the issue

  1. Go to https://stackblitz.com/edit/d4rmbk?file=src%2Fapp%2Faccordion-simple-panel-example.html
  2. click "add panel"
  3. observe that the new panel is first expanded and automatically closes itsself after ~1sec

Relevant log output

No response

daniel-sc commented 8 months ago

Note: a possible workaround is to group the parent animation with a query('@*', animateChild(), {optional: true}).

Nontheless, should the expansion panel be displayed correctly when the animation is blocked.