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

iOS: Add getContentSizeMultiplier & event #11010

Closed

Conversation

rigdern
Copy link
Contributor

@rigdern rigdern commented Nov 18, 2016

Corresponding Android PR: #11008

This gives apps the ability to find out the current scaling factor for fonts on the device. An event was also added so that apps can find out when this value changes.

Test plan (required)

Verified that the getter and the event work properly in a test app. Also, this change is used in my team's app.

Adam Comella
Microsoft Corp.

This gives apps the ability to find out the current scaling factor for fonts on the device. An event was also added so that apps can find out when this value changes.
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 18, 2016
@facebook-github-bot
Copy link
Contributor

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

@rigdern rigdern deleted the rigdern/iosGetFontSizeMultiplier branch November 21, 2016 19:32
@mkonicek
Copy link
Contributor

mkonicek commented Nov 22, 2016

Since it looks like the method and event deal purely with fonts:

this gives apps the ability to find out the current scaling factor for fonts on the device

What do you think of the following naming?

getContentSizeMultiplier ->getFontScale
didUpdateContentSizeMultiplier -> didUpdateFontScale

But I see this reads bridge.accessibilityManager.multiplier so maybe it's related to other things than fonts and it makes sense to keep the name more generic?

Should the method and event be declared and documented in a JS file somewhere?

@rigdern
Copy link
Contributor Author

rigdern commented Nov 23, 2016

Martin, I responded in #11008 (comment). Let's discuss it there.

DanielMSchmidt pushed a commit to DanielMSchmidt/react-native that referenced this pull request Jan 4, 2017
Summary:
Corresponding Android PR: facebook#11008

This gives apps the ability to find out the current scaling factor for fonts on the device. An event was also added so that apps can find out when this value changes.

**Test plan (required)**

Verified that the getter and the event work properly in a test app. Also, this change is used in my team's app.

Adam Comella
Microsoft Corp.
Closes facebook#11010

Differential Revision: D4207620

Pulled By: ericvicenti

fbshipit-source-id: b3f6f4a412557ba97e1f5fb63446c7ff9a2ff753
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants