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

fix(material/tabs): avoid unnecessary updates of tab ink bar #27031

Merged
merged 1 commit into from May 8, 2023

Conversation

dmitry-stepanenko
Copy link
Contributor

There's a resize observer in the paginated-tab-header, that calls _alignInkBarToSelectedTab method here

this._alignInkBarToSelectedTab();

This causes the ink bar to be updated each time there's any size change. Sometimes it can cause additional problems. For example, in our case we are slightly customizing the UI so that selected tab has larger font weight than others. And this actually triggers the resize observer, which attempts to redraw the ink bar twice and breaks the ink bar animation

Untitled.1.mp4

Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release labels May 8, 2023
@angular-robot angular-robot bot merged commit a1e7de9 into angular:main May 8, 2023
25 checks passed
angular-robot bot pushed a commit that referenced this pull request May 8, 2023
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jul 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants