The Wayback Machine - https://web.archive.org/web/20220729180728/https://github.com/angular/components/issues/25068
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

bug(material/tabs): ink bar animation not disabling when animationDuration set to 0 #25068

Open
midgleyc opened this issue Jun 13, 2022 · 2 comments
Labels
area: material/tabs good first issue P4

Comments

@midgleyc
Copy link

@midgleyc midgleyc commented Jun 13, 2022

Feature Description

I can set the animation duration for the tabs themselves using animationDuration on the mat-tab-group. If I set this to 0, the tabs switch instantly, but the ink bar moves across taking 500ms, which makes the tab switching look slower than it actually is.

I can implement this myself using ng-deep:

::ng-deep .mat-ink-bar {                                                                             
  transition: none !important;                                                                       
}

but ng-deep is deprecated, so there's always the risk this will stop working in the future.

Use Case

Tab switching looks faster if tab switch animation duration is less than 500ms.

@midgleyc midgleyc added feature needs triage labels Jun 13, 2022
@wagnermaciel wagnermaciel changed the title feat(material/tabs): Allow disabling animation for ink bar bug(material/tabs): ink bar animation not disabling when animationDuration set to 0 Jun 17, 2022
@wagnermaciel wagnermaciel added P4 good first issue area: material/tabs and removed feature needs triage labels Jun 17, 2022
@synopss
Copy link

@synopss synopss commented Jun 25, 2022

Is this really a bug ? animationDuration is used to set the body animation speed, not the mat-ink-bar one.

So if you give it the value 0 or 0ms, the body will appear with no animation, but the mat-ink-bar will still have one.

To me, it looks like two very different things. I don't think the mat-ink-bar animation is supposed to follow the body one.

Also, removing the animation can be done by adding the _mat-animation-noop css property to the mat-ink-bar.

@yndue736
Copy link

@yndue736 yndue736 commented Jun 27, 2022

Yes this is great and you can now check some information about it here on modern christening cakes where they have used it in a different shape.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: material/tabs good first issue P4
Projects
None yet
Development

No branches or pull requests

4 participants