Skip to content

bug: ion-accordion-group animations not completely disabled with animated="false" and expand="inset" #27047

Closed

Description

@ReneZeidler

Prerequisites

Ionic Framework Version

v6.x

Current Behavior

Setting animated="false" on an ion-accordion-group with expand="inset" does not completely disable animations in MD mode.

Specifically, the extra margin for expanded ion-accordions still gets animated, while all other animations are disabled.

Expected Behavior

Setting animated="false" should disable all animations, including the extra margin in MD mode.

Steps to Reproduce

  1. Create an ion-accordion-group with animated="false" and expand="inset" with at least two items (see Stackblitz example)
  2. Open the application in MD mode
  3. Toggle one of the accordions

Code Reproduction URL

https://stackblitz.com/edit/ion-accordion-inset-animation

Ionic Info

Ionic:

   Ionic CLI                     : 6.20.8 (/usr/local/share/npm-global/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 6.7.0
   @angular-devkit/build-angular : 15.2.4
   @angular-devkit/schematics    : 15.2.4
   @angular/cli                  : 15.2.4
   @ionic/angular-toolkit        : 8.0.0

Utility:

   cordova-res : not installed globally
   native-run  : not installed globally

System:

   NodeJS : v18.12.1 (/usr/local/bin/node)
   npm    : 9.6.2
   OS     : Linux 5.10

Additional Information

The accordion-animated class is still present on ion-accordions even when the ion-accordion-group has animated="false". The extra margin gets animated with a CSS transition depending only on that class. Removing the class manually with the browser dev tools fixes this issue.

Activity

  1. averyrousseau commented on Mar 29, 2023

    @averyrousseau
    Contributor

    Thank you for the issue, and for the additional investigation into the cause 👀 I'm able to reproduce this behavior. The issue is that the accordion-animated class does not account for setting the animated property on the accordion group itself, as you described. (Relevant line)

  2. added
    package: core
    type: bug
    on Mar 29, 2023
  3. removed their assignment
    on Mar 29, 2023
  4. added a commit that references this issue on Apr 12, 2023
    114fe28
  5. thetaPC commented on Apr 12, 2023

    @thetaPC
    Contributor

    Thanks for the issue! This has been resolved via #27173 and will be available in an upcoming release of Ionic 7.

  6. locked as resolved and limited conversation to collaborators on Apr 12, 2023
  7. added 2 commits that reference this issue on Apr 17, 2023
    a6c455d
    f7d5212
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    package: coretype: bug

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions