Summary:
ScrollView always clipping children on Android even when `overflow: visible` was specified.
This change just omits the clipping during draw if `overflow: visible` is passed in.
The default is not changed (from hidden to visible) in case there is a performance impact.
Android now matches iOS in behavior. This helps with issue #21116 and resolves#14416.
Reviewed By: shergin
Differential Revision: D9952096
fbshipit-source-id: 367afe33ee7ff0fdc5aa1074d239883aa289888a
Summary:
@public
Otherwise tests using `path` but not `fs` have an empty mock, as it happens on https://github.com/facebook/metro/issues/235#issuecomment-423722747
Reviewed By: mjesun
Differential Revision: D10008513
fbshipit-source-id: 673e2ca79c8105a68818985dc08fe7ccd5d13881
Summary:
<!--
Required: Write your motivation here.
If this PR fixes an issue, type "Fixes #issueNumber" to automatically close the issue when the PR is merged.
-->
Fixes inconsistency in custom font rendering in android. See explanation below.
<!--
Required: Write your test plan here. If you changed any code, please provide us with
clear instructions on how you verified your changes work. Bonus points for screenshots and videos!
-->
I tested the following on my physical device (Sony Z5C) and on Android emulator on Mac.
The test app contains various fonts in the AvenirNext family, which are added to the app as `.ttf` format.
Note that the character "thickness" is inconsistent. Some characters looks thicker than other. See the screenshots below as an example:
- Looks thicker: right half of the `g` and `&` as in "Region & Language" (list-view screen)
- Looks thicker: `w` as in `Change Password` (list-view screen)
- Looks vertically compressed: `a` and `e` as in "Message" in the bottom bar (list-view screen)
- Looks thicker: `A`, `N`, `V`, `v` (paragraph screen)
- Looks thinner: `i` (paragraph screen), it leaves extra space on its right hand side
![screenshot_20180427-151129](https://user-images.githubusercontent.com/1103788/39350754-ae9fafe2-4a31-11e8-8835-97280783bb95.png)
![screenshot_20180427-151419](https://user-images.githubusercontent.com/1103788/39350755-aecc9bba-4a31-11e8-8128-2d230f003dfa.png)
Every characters has consistent "weight" and looks nice:
![screenshot_20180427-150835](https://user-images.githubusercontent.com/1103788/39350753-ae698728-4a31-11e8-8a55-4e161c559b95.png)
![screenshot_20180427-151639](https://user-images.githubusercontent.com/1103788/39350756-aef95d44-4a31-11e8-820b-1a7dee77fabe.png)
<!--
Does this PR require a documentation change?
Create a PR at https://github.com/facebook/react-native-website and add a link to it here.
-->
None
<!--
Required.
Help reviewers and the release process by writing your own release notes. See below for an example.
-->
[ANDROID] [ENHANCEMENT] [CustomStyleSpan] - Enable subpixel text rendering
<!--
**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**
CATEGORY
[----------] TYPE
[ CLI ] [-------------] LOCATION
[ DOCS ] [ BREAKING ] [-------------]
[ GENERAL ] [ BUGFIX ] [ {Component} ]
[ INTERNAL ] [ ENHANCEMENT ] [ {Filename} ]
[ IOS ] [ FEATURE ] [ {Directory} ] |-----------|
[ ANDROID ] [ MINOR ] [ {Framework} ] - | {Message} |
[----------] [-------------] [-------------] |-----------|
EXAMPLES:
[IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
[ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
[CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
[DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
[GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
[INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->
Pull Request resolved: https://github.com/facebook/react-native/pull/19043
Differential Revision: D10008155
Pulled By: hramos
fbshipit-source-id: 7fe9bb0f9be80380947ff80eac522e3cfd6b22cf
Summary:
<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.
Help us understand your motivation by explaining why you decided to make this change.
If this PR fixes an issue, type "Fixes #issueNumber" to automatically close the issue when the PR is merged.
-->
Fixes#20924
DPad arrow events were missing from `KEY_EVENTS_ACTIONS` which meant that they were not broadcasted by `TVEventHandler`.
Pull Request resolved: https://github.com/facebook/react-native/pull/21143
Differential Revision: D10007851
Pulled By: mdvacca
fbshipit-source-id: 9a03cad249a4a1917975d1de10b6112e69d32a72
Summary:
This flow type is wrong, probably just a copy paste mistake.
Pull Request resolved: https://github.com/facebook/react-native/pull/21271
Differential Revision: D10006741
Pulled By: TheSavior
fbshipit-source-id: eba0116ec39ba00f000d9bf789ae9214990355a1
Summary:
This PR applies some fixes I made to the 0.57-stable branch to ensure we only run on commits tagged as "v0.57.1", as an example. This also ensures we only deploy after all tests pass.
Pull Request resolved: https://github.com/facebook/react-native/pull/21250
Differential Revision: D10003666
Pulled By: hramos
fbshipit-source-id: 22d5e674ca925dce53d0ddf0e12c64dc82ec7aa1
Summary: CoreModulePackages was following the old way of adding Native Modules to the Array list. This diff changes it to use names instead of class.
Reviewed By: achen1
Differential Revision: D9996803
fbshipit-source-id: a6c3daf2193a2559db0908f9e26e339e03e4f8c7
Summary:
**Summary**
The RN transformer currently relies on the enviroment providing babelHelpers and regeneratorRuntime as globals by using 'babel-external-helpers'. This wasn't really a problem before since helpers were stable and we could maintain our copy easily but it seems like there are more now with babel 7 and it makes sense to include only those used by the app.
This is exactly what babel/transform-runtime does. It will alias all helpers and calls to regeneratorRuntime to files in the babel/runtime package.
This will solve issues like this https://github.com/facebook/react-native/issues/20150 caused by missing babelHelpers. This solution also avoids bloating babelHelpers to fix OSS issues like the one linked before.
**Test plan**
- Updated tests so they all pass.
- Tested that it actually works by applying the changes locally in an RN app.
- Added a test for async functions, to make sure regenerator is aliased properly and doesn't depend on the global.
- Made sure require-test.js still fails if the require implementation contains babel helpers (by adding an empty class in the file).
Pull Request resolved: https://github.com/facebook/metro/pull/198
Reviewed By: mjesun
Differential Revision: D8833903
Pulled By: rafeca
fbshipit-source-id: 7081f769f288ab358ba89ae8ee72a513bb12e225
Summary:
Upgrades to `react-devtools@^3.4.0`.
Notably, this brings the improved coloring to the React Profiler.
Reviewed By: bvaughn
Differential Revision: D9985352
fbshipit-source-id: 64a76d194275e551f04dd52d775bf26bb16df6b8
Summary:
I've seen quite a few PRs try to change sync'ed files so let's add this warning and hope people read it.
Not sure if it's better / possible to put it in the oss folder instead.
Pull Request resolved: https://github.com/facebook/react-native/pull/21251
Differential Revision: D9993401
Pulled By: hramos
fbshipit-source-id: 05d22c7f8da1eba97a83d2b7dbc66d9324695a1b
Summary:
`new Date().getTime()` is equal to `Date.now()`.
`Date.now()` avoids an allocation, which can save some GC time.
This micro-optimization isn't worth it in most places, but since MessageQueue is one of the hottest pieces of JS in RN, it's worth it.
Reviewed By: javache
Differential Revision: D9972334
fbshipit-source-id: 05d78fd65304f0f27115d76b8b52db11a52c86a0
Summary: This will probably not fix the crash but the current implementation certenly is/was not thread-safe.
Reviewed By: javache
Differential Revision: D9977538
fbshipit-source-id: a9cac05c313ff51efefbd7c228a1160a3aa75b54
Summary:
Fixes#20797
As mentioned in #20797 when running `react-native run-ios Xcode 9.2 will complain about the nullability of pointers in `RCTLinkingManager.h`.
Pull Request resolved: https://github.com/facebook/react-native/pull/20798
Differential Revision: D9988581
Pulled By: hramos
fbshipit-source-id: e3ce7736da97d314a421c2c1ab71577864081642
Summary:
RCT_DEBUG is always defined - it is just rather 0 or 1 so
```#ifndef RCT_DEBUG is always true```
Pull Request resolved: https://github.com/facebook/react-native/pull/21232
Differential Revision: D9982316
Pulled By: hramos
fbshipit-source-id: 5408bfcf95a6ed2beae38217a6ad1ee43950857d
Summary:
RN animations currently ignore the `Slow Animations` option on the iOS simulator because we don't use UIKit animations directly. This uses a private api to get the slow coefficient and use it in the native animated driver. We only compile the private api code on simulator so this won't cause issues for app store approval. One possible issue is that the api changes in new iOS versions but I think it's reasonable to do this.
Note that this won't work with JS driven animations, we could expose the slow coefficient as a constant and use that in JS but I decided not to implement it.
Pull Request resolved: https://github.com/facebook/react-native/pull/21157
Differential Revision: D9980306
Pulled By: sahrens
fbshipit-source-id: bdbce2e469261a75cb4b9a251e8e8f212bb9c4e7
Summary:
When looking at enabling gzip content encoding on Android I stumbled on this old issue where the body content is not decoded. It happens because okhttp only handles gzip decoding if the user does NOT provide an accept-encoding header. This is pretty confusing because on iOS we need to pass the header manually if we want to receive a gzipped response. I think it makes sense to handle the decoding no matter what.
See the comment in code for more details.
Fixed#5297
Pull Request resolved: https://github.com/facebook/react-native/pull/21187
Differential Revision: D9978889
Pulled By: hramos
fbshipit-source-id: b86791fb7d3157f325a0904225d2f63d166080d5
Summary:
Upgrade React Native to Android SDK 27 again, following the reversal in D9886607 (68c7999c25).
The SDK 27 is actually available internally in an alternate location that is suitable for use cases like React Native's. For future reference, SDK 28 is also available for use in this location.
Reviewed By: axe-fb
Differential Revision: D9929066
fbshipit-source-id: 9413f891d5587293a30544351340e9407a2dce55
Summary: Now that NativeModules are stored based on String keys instead of classnames, the old innterface to getNativeModules(Class moduleInterface) is deprecated. This interface is also incorrect since a native module with the same name may be overridden, causing issues. Getting native modules by name is also similar to what JavaScript does
Reviewed By: achen1
Differential Revision: D9697827
fbshipit-source-id: ff832bd2ea5e1c7cfe7d8c0c3a66f0d755b2c354
Summary:
Android CI was failing due to that it was trying to extract major version from build tools and use it to compile ReactAndroid. Now, it'll extract compileSdkVersion from ReactAndroid/build.gradle and use it.
Issue was that 68c7999c25 dowgraded compileSdk version to 26 while retaining build tools version as 27.0.3, so CI was trying to use SDK 27.
Pull Request resolved: https://github.com/facebook/react-native/pull/21205
Differential Revision: D9943909
Pulled By: hramos
fbshipit-source-id: ec9bc0c40956a16f8088532340722fd43cadde37
Summary:
This PR exposes the `onScrollToTop` event on iOS using the same event-forwarding infrastructure as other ScrollView events. (As such, its `nativeEvent` object reflects the same fields as other ScrollView events.)
Motivation:
----------
If your app is only interested in knowing the position of a ScrollView after a scroll has completed, it can use `onScrollEndDrag` and `onMomentumScrollEnd` to inspect the `contentOffset` after a drag-initiated scroll has finished. (This is much less expensive than observing the `onScroll` event if you only want to know the end position.) However, neither of these `End` events fire if the ScrollView is scrolled to the top by tapping the status bar.
By exposing `onScrollToTop`, it is now possible for an app to cheaply know when such a scroll has completed.
Pull Request resolved: https://github.com/facebook/react-native/pull/21204
Differential Revision: D9943618
Pulled By: hramos
fbshipit-source-id: ac5ee42b7f12d94655ffda617f8f811138da7f6f
Summary:
fix ci path problem on Windows
pass all current ci.
none
[GENERAL] [INTERNAL] [CI] - fix ci path problem on Windows
Pull Request resolved: https://github.com/facebook/react-native/pull/21203
Differential Revision: D9943608
Pulled By: hramos
fbshipit-source-id: 66e3e196a6c0015e0472851abeee32de9fef140c
Summary:
This file was created recently but is not used as the WKWebview was integrated directly into the Webview.ios.js
Removing this file to clarify the situation
Pull Request resolved: https://github.com/facebook/react-native/pull/21182
Differential Revision: D9942905
Pulled By: hramos
fbshipit-source-id: 19e9fba94280428edd1deab4a54f8c5dc42a6bfa
Summary:
This diff:
- Disables all tests but one of FabricViewTest
- Disables all tests but one of FabricBenchmarkTest
- Changes ReactAppTestActivity to run with Hermes
The reason there is only one test running in each test class, is because the tear down process of Fabric is still flaky and it produces crashes when restarting RN. We are working on this right now and we will enable the rest of the tests after that's fixed.
Reviewed By: achen1
Differential Revision: D9890700
fbshipit-source-id: a8716481eff15b77bd12b38aaaefd4e282c71f3b
Summary: This diff removes the Fabric Android implementation in favor of Fabric C++, as part of another diff I'm going to move the fabricxx package into fabric package
Reviewed By: shergin
Differential Revision: D9841240
fbshipit-source-id: c7922b7bfb9885f33b1f52237ec7cf00c1df96fb
Summary: This diff adds support for the ActivityIndicator component into the Android Fabric C++ implementation
Reviewed By: shergin
Differential Revision: D9781846
fbshipit-source-id: 952d72556983955875198ac3b7eece6868bc4ae8
Summary:
This PR fixes the formatting of the AppVeyor badge in `README.md` to remove a stray newline that broke formatting.
Pull Request resolved: https://github.com/facebook/react-native/pull/21186
Differential Revision: D9932191
Pulled By: hramos
fbshipit-source-id: f87ad7664d6a0b288615f473ba38b4734b41eb88
Summary:
this is just a suggestion, but as the iPhone 6 is discontinued by Apple
and the new iPhone line will match the X version, it could be good to update the default simulator.
it could also be the iPhone 8, feel free to suggest other changes!
Thank you for sending the PR! We appreciate you spending the time to work on these changes.
Help us understand your motivation by explaining why you decided to make this change.
If this PR fixes an issue, type "Fixes #issueNumber" to automatically close the issue when the PR is merged.
Pull Request resolved: https://github.com/facebook/react-native/pull/21148
Differential Revision: D9928120
Pulled By: hramos
fbshipit-source-id: 005faa3a8e00b67f98a778c92ecc01b064e14199
Summary:
Due to Kureev's cleanup in c4a66a89a2 some arguments are no longer properly passed to metro, but just the default values. This broke the `--projectRoot` and `--watchFolders` arguments used by storybook to change the bundle entrypoint.
This PR simply fixes the regression by assigning these values from argv instead of reading config defaults.
Related: the undocumented `REACT_NATIVE_APP_ROOT` env var is broken, not sure for how long, but I can fix it as a part of this PR or make a new one.
Pull Request resolved: https://github.com/facebook/react-native/pull/21165
Differential Revision: D9929642
Pulled By: hramos
fbshipit-source-id: 00485a0429bd4301de03e5cb455e928878c4ba8f
Summary:
Currently the warning is always triggered, even on iOS. This simply adds a platform check and tweak the message.
Pull Request resolved: https://github.com/facebook/react-native/pull/21174
Differential Revision: D9929679
Pulled By: hramos
fbshipit-source-id: 383f4a820cf5bf261dbfdcff3b950f9812a65e00
Summary:
@public
The React Native CLI is not passing the default `maxWorkers` param to Metro, making it run in a single thread and making the development process really slow.
This fixes https://github.com/facebook/metro/issues/253
Reviewed By: mjesun
Differential Revision: D9915500
fbshipit-source-id: d15030af582e99fe20535c07e751cfe12e444f2f
Summary:
Go back to using compileSdkVersion 26 and targetSdkVersion 26, temporarily. We can re-add this once Android SDK 27 becomes available in Facebook's internal repository.
The Android SDK Build Tools 27.0.3 **are** available, so we can continue using those.
Reviewed By: axe-fb
Differential Revision: D9886607
fbshipit-source-id: 6c1c9c1e1309c3a0483cc4c0bd8dcb4a5f29fc7e
Summary: This diff updates babel-eslint to the stable 9.0.0 version, which uses babel 7.0.0 so we can get rid of babel-7.0.0-beta.52
Reviewed By: rubennorte
Differential Revision: D9894311
fbshipit-source-id: b5276ea7d1b10725fffef13eb1338fe6415dbd36
Summary:
They are bad :D
And they affect us when trying to migrate to the babel runtime helpers
Reviewed By: pvdz
Differential Revision: D9829462
fbshipit-source-id: 15240a56e707e13775d57714646e4960cfe202df
Summary: This diff adds support for image views in Android
Reviewed By: shergin
Differential Revision: D9757712
fbshipit-source-id: 8d33e04c8ac4a670af6ca49bb3b9dccc69d52e40
Summary: This diff fixes the compilation error: "implicit instantiation of undefined template std::hash" when using TextAttributes in Android
Reviewed By: shergin
Differential Revision: D9849407
fbshipit-source-id: 7fcb94b1d4f7715d8037ecbf302d8f345e99e9fd
Summary: This diff introduces the concept of Local Data in Android Fabric C++ and as an example we uses it to implement Text View.
Reviewed By: shergin
Differential Revision: D9583970
fbshipit-source-id: ab7478b16ef4327ff574ca1467870ab9cb684ea0
Summary: In this diff I added support to be able to measure C++ shadowNode in Android. As an example I implemented the measurement of TextViews
Reviewed By: shergin
Differential Revision: D9583972
fbshipit-source-id: 1344782d4c586c94a4576b18a4acfa4775e46952