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

Docs rot: PixelRatio.getFontScale declaration out of date #39708

Closed
ahmedsakr opened this issue Sep 28, 2023 · 4 comments
Closed

Docs rot: PixelRatio.getFontScale declaration out of date #39708

ahmedsakr opened this issue Sep 28, 2023 · 4 comments
Labels
API: PixelRatio Resolution: PR Submitted A pull request with a fix has been provided. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@ahmedsakr
Copy link
Contributor

Description

PixelRatio.d.ts has out-dated behaviour described for getFontScale - it still claims that it is only supported on android when this is no longer the case as indicated by the react-native-website: https://reactnative.dev/docs/pixelratio#getfontscale

React Native Version

0.72.0

Output of npx react-native info

System:
OS: macOS 13.6
CPU: (10) arm64 Apple M1 Pro
Memory: 240.28 MB / 32.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 16.20.0
path: ~/.nvm/versions/node/v16.20.0/bin/node
Yarn:
version: 1.22.17
path: /opt/homebrew/bin/yarn
npm:
version: 8.19.4
path: ~/.nvm/versions/node/v16.20.0/bin/npm
Watchman: Not Found
Managers:
CocoaPods:
version: 1.12.1
path: /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.0
- iOS 17.0
- macOS 14.0
- tvOS 17.0
- watchOS 10.0
Android SDK: Not Found
IDEs:
Android Studio: 2022.3 AI-223.8836.35.2231.10671973
Xcode:
version: 15.0/15A240d
path: /usr/bin/xcodebuild
Languages:
Java:
version: 11.0.12
path: /usr/bin/javac
Ruby:
version: 3.2.1
path: /Users//.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: ^18
react-native:
installed: 0.72.4
wanted: ^0.72.4
react-native-macos: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false

Steps to reproduce

Not really a bug but just docs rot that could be misleading when developers view embedded docs through node_modules: https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Utilities/PixelRatio.d.ts#L37

Snack, screenshot, or link to a repository

https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Utilities/PixelRatio.d.ts#L37

@github-actions
Copy link

⚠️ Newer Version of React Native is Available!
ℹ️ You are on a supported minor version, but it looks like there's a newer patch available - 0.72.5. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

@github-actions
Copy link

⚠️ Missing Reproducible Example
ℹ️ We could not detect a reproducible example in your issue report. Please provide either:
  • If your bug is UI related: a Snack
  • If your bug is build/update related: use our Reproducer Template. A reproducer needs to be in a GitHub repository under your username.

@github-actions github-actions bot added the Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. label Sep 28, 2023
@cortinico cortinico added Resolution: PR Submitted A pull request with a fix has been provided. and removed Needs: Triage 🔍 Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Newer Patch Available labels Sep 28, 2023
facebook-github-bot pushed a commit that referenced this issue Oct 2, 2023
Summary:
Addresses this issue: #39708

The embedded docs for `PixelRatio.getFontScale` haven't been updated in a while and it is still claiming lack of support for iOS when this is not the reality anymore. This was confusing for me when looking for docs through my local workspace.

## Changelog:

[INTERNAL] [CHANGED] - Updated PixelRatio.getFontScale docs to match the latest website

Pull Request resolved: #39709

Test Plan: N/A

Reviewed By: rshest

Differential Revision: D49752103

Pulled By: NickGerleman

fbshipit-source-id: 1b220bc0210639d7863b6961f665aab2cba52889
Copy link

github-actions bot commented Apr 3, 2024

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Apr 3, 2024
Copy link

This issue was closed because it has been stalled for 7 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API: PixelRatio Resolution: PR Submitted A pull request with a fix has been provided. Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

2 participants