-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Comparing changes
Open a pull request
base repository: facebook/react-native
base: v0.60.0-rc.2
head repository: facebook/react-native
compare: v0.60.0-rc.3
- 8 commits
- 29 files changed
- 5 contributors
Commits on Jun 28, 2019
-
custom fontWeight numeric values for Text on Android (#25341)
Summary: I found that on Android we only support 2 fontWeight options, either **normal** or **bold**, even developer can set any numeric value. But iOS supports all possible numeric values. This PR tries to add support for all possible numeric values on Android, even if it's supported only on Android P(28) and above. This change might break texts where fontWeight use improperly, because this PR removes conversion of values above 500 to BOLD and below 500 to normal. FYI, also moved **mCustomTypefaceCache** usage up because it was working after unnecessary mFontCache usage. ## Changelog [Android] [Changed] - add custom font weight support to Text component on Android, only on P(API 28) and above versions. Pull Request resolved: #25341 Test Plan: RNTester app's Text examples will show Rubik Regular, Rubik Light, Rubik Bold, Rubik Medium and Rubik Medium Italic texts in corresponding font family, style and weights. Differential Revision: D15956350 Pulled By: mdvacca fbshipit-source-id: 61079d953c65fb34ab4497d44c22317912a5a616
Configuration menu - View commit details
-
Copy full SHA for 13f4fa0 - Browse repository at this point
Copy the full SHA 13f4fa0View commit details -
bump fresco to 2.0.0, supports AndroidX (#25358)
Summary: Bump Fresco to 2.0.0, which supports AndroidX. We should cherry-pick to 0.60 release, to support brown field apps but also native components. ## Changelog [Android] [Changed] - Bump Fresco to 2.0.0, supports AndroidX Pull Request resolved: #25358 Test Plan: CI is green, and RNTester builds and runs as expected. Differential Revision: D15959443 Pulled By: mdvacca fbshipit-source-id: 58ba2c3e4d1342014d6ea632cd865b4f413548d9
Configuration menu - View commit details
-
Copy full SHA for c36c481 - Browse repository at this point
Copy the full SHA c36c481View commit details -
Fix regression of improper assets copy (revert #24518 #24778) (#25363)
Summary: Pull requests #24518 #24778 make Gradle copy all **generated** assets and resources into `android/app/src/res`, which is a bad behavior, because `src/res` goes into version control and should hold only those **original** resource files. These changes in #24518 #24778 were merged into 0.60.0-rc release and cause regression. This pull request will: - Revert pull requests #24518 #24778 - Close #25325 ## Changelog [Android] [Fixed] - Fix regression of improper assets copy (revert #24518 #24778) Pull Request resolved: #25363 Test Plan: It is a revert pull request and the reverted script should work the same as it has in 0.59.x. Differential Revision: D15963329 Pulled By: cpojer fbshipit-source-id: 5619a318dbdb40e816e37b6e37d4fe32caa46e9e
Configuration menu - View commit details
-
Copy full SHA for 99bc31c - Browse repository at this point
Copy the full SHA 99bc31cView commit details -
Use CALayers to draw text (#24387)
Summary: The current technique we use to draw text uses linear memory, which means that when text is too long the UIView layer is unable to draw it. This causes the issue described [here](#19453). On an iOS simulator the bug happens at around 500 lines which is quite annoying. It can also happen on a real device but requires a lot more text. To be more specific the amount of text doesn't actually matter, it is the size of the UIView that we use to draw the text. When we use `[drawRect:]` the view creates a bitmap to send to the gpu to render, if that bitmap is too big it cannot render. To fix this we can use `CATiledLayer` which will split drawing into smaller parts, that gets executed when the content is about to be visible. This drawing is also async which means the text can seem to appear during scroll. See https://developer.apple.com/documentation/quartzcore/calayer?language=objc. `CATiledLayer` also adds some overhead that we don't want when rendering small amount of text. To fix this we can use either a regular `CALayer` or a `CATiledLayer` depending on the size of the view containing the text. I picked 1024 as the threshold which is about 1 screen and a half, and is still smaller than the height needed for the bug to occur when using a regular `CALayer` on a iOS simulator. Also found this which addresses the problem in a similar manner and took some inspiration from the code linked there GitHawkApp/StyledTextKit#14 (comment) Fixes #19453 ## Changelog [iOS] [Fixed] - Use CALayers to draw text, fixes rendering for long text Pull Request resolved: #24387 Test Plan: - Added the example I was using to verify the fix to RNTester. - Made sure all other examples are still rendering properly. - Tested text selection Reviewed By: shergin Differential Revision: D15918277 Pulled By: sammy-SC fbshipit-source-id: c45409a8413e6e3ad272be39ba527a4e8d349e28
Configuration menu - View commit details
-
Copy full SHA for b68966e - Browse repository at this point
Copy the full SHA b68966eView commit details -
Fix some languages wrapped texts are cut off on android (#25306)
Summary: Fix wrapped some languages (like Japanese, Chinese) texts are cut off on android. This p-r is based on linjson [patch](#25275 (comment)). - related (maybe) - #25297 - #25275 - #24837 - #25155 `setUseLineSpacingFromFallbacks` is recommended to set true on [document](https://developer.android.com/reference/android/text/StaticLayout.Builder#setUseLineSpacingFromFallbacks(boolean)) >For backward compatibility reasons, the default is false, but setting this to true is strongly recommended. It is required to be true if text could be in languages like Burmese or Tibetan where text is typically much taller or deeper than Latin text. ## Changelog [Android] [Fixed] - Fix some languages wrapped texts are cut off. Pull Request resolved: #25306 Test Plan: Set the target SDK to 28 in ``fbsource/fbandroid/java/com/facebook/catalyst/shell/AndroidManifest.xml``: ``` <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="28"/> ``` Insert the following code into Playground.js: P67720709 Start the Catalyst Android app and navigate to the playground: `buck install -r catalyst` |Before|After| |{F163482789}|{F163481060}| Reviewed By: cpojer Differential Revision: D15985809 Pulled By: makovkastar fbshipit-source-id: 0f98760b7a7fe4689fa3fe90ca747e9bf9fc4780
Configuration menu - View commit details
-
Copy full SHA for 9837d24 - Browse repository at this point
Copy the full SHA 9837d24View commit details -
Configuration menu - View commit details
-
Copy full SHA for 93c8318 - Browse repository at this point
Copy the full SHA 93c8318View commit details -
Configuration menu - View commit details
-
Copy full SHA for db1d60f - Browse repository at this point
Copy the full SHA db1d60fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8a43321 - Browse repository at this point
Copy the full SHA 8a43321View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v0.60.0-rc.2...v0.60.0-rc.3