Skip to content

[Internal][CollapsingTextHelper] Fix letter spacing not updating correctly#5016

Open
pubiqq wants to merge 1 commit intomaterial-components:masterfrom
pubiqq:internal/fix-letter-spacing-in-collapsingtexthelper
Open

[Internal][CollapsingTextHelper] Fix letter spacing not updating correctly#5016
pubiqq wants to merge 1 commit intomaterial-components:masterfrom
pubiqq:internal/fix-letter-spacing-in-collapsingtexthelper

Conversation

@pubiqq
Copy link
Contributor

@pubiqq pubiqq commented Mar 12, 2026

In the current implementation, when the letter spacing is changed, neither currentLetterSpacing nor the text layout is updated, and this PR fixes that.

Also it fixes #5014.

currentDrawY = lerp(expandedDrawY, collapsedDrawY, fraction, positionInterpolator);

setInterpolatedTextSize(fraction);

Copy link
Contributor

Choose a reason for hiding this comment

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

Don't we need to keep this so the offset will be calculated correctly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Don't we need to keep this so the offset will be calculated correctly?

I'm not sure which offset you're referring to. The code block you highlighted is no longer needed because the updated calculateUsingTextSize() method already sets the correct letter spacing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TextField] Label text renders outside the expected bounds

2 participants