Skip to content

Support minimumFontScale in paragraphAttributes #50933

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

Closed

Conversation

anupriya13
Copy link
Contributor

@anupriya13 anupriya13 commented Apr 25, 2025

Summary:

Support minimumFontScale in paragraphAttributes

Resolves #50934

Changelog:

Support minimumFontScale in paragraphAttributes

Test Plan:

Tested via this code here: microsoft/react-native-windows#14617

Before:
image

After:
image

minFontScale.mp4

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Apr 25, 2025
@facebook-github-bot
Copy link
Contributor

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Copy link
Contributor

@NickGerleman NickGerleman left a comment

Choose a reason for hiding this comment

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

Looks like we're missing the code to read from Props into this, or to incorporate it into the math used for adjustsFontSizeToFit? Having a field there, but never correctly populated, or used for its documented purpose, is confusing for future readers.

Can we add the other code around this?

@anupriya13
Copy link
Contributor Author

anupriya13 commented Apr 26, 2025

Looks like we're missing the code to read from Props into this, or to incorporate it into the math used for adjustsFontSizeToFit? Having a field there, but never correctly populated, or used for its documented purpose, is confusing for future readers.

Can we add the other code around this?

We are using both adjustsFontSizeToFit and minimumFontScale in React Native Windows.

Refer

minimumFontScale prop doesn't populates in updateProps for windows hence this change.

Could you please clarify which file/code you meant the gap about?

@NickGerleman
Copy link
Contributor

Some props code in

paragraphAttributes.minimumFontSize = convertRawProp(

others in ParagraphProps

then I would expect it to be used in the paragraph component view on iOS. Can probably find that by a quick search.

@anupriya13
Copy link
Contributor Author

@NickGerleman I have updated it and also tested with RNW. Please refer before and after screenshots.

@facebook-github-bot
Copy link
Contributor

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Apr 30, 2025
@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @anupriya13 in f53d066

When will my fix make it into a release? | How to file a pick request?

@facebook-github-bot
Copy link
Contributor

@cipolleschi merged this pull request in f53d066.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support minimumFontScale in paragraphAttributes
4 participants