Summary:
Fixes Xcode console output for web socket connections. Apple uses OSLog for logging within libnetworking starting 11.3+. The old way we hook into logging to prevent it will not work anymore.
Let's hook into `__nwlog_pack` that is exclusively used by libnetworking and prevent the logging in there.
Closes https://github.com/facebook/react-native/pull/18948
Reviewed By: fkgozali
Differential Revision: D7940969
Pulled By: mmmulani
fbshipit-source-id: a61beea34377044bfad7e3c446b2ec1138d6d1f5
Summary:
`FlatList` (actually `VirtualizedList`) allows recursive nesting of itself for easy and complex composition of lists such that it can support seemless virtualization and VPV events. It does this by only rendering a `ScrollView` for the outermost `VirtualizedList` and simply stacking `View`s for all the internal ones.
However, if a `Modal` is in a `FlatList` and also hosts a `FlatList`, e.g.:
```
<FlatList ListFooterComponent={<Modal><Foo /></Modal>} />
```
Then React context will propogate through to the inner `FlatList` and cause it to render as a plain `View`. Because the `Modal` actually portals the views into a different native hierarchy, one without a `ScrollView`, the `FlatList` won't scroll as expected.
The fix is to wipe out the context - not sure if there is a better way, but this doesn't seem terrible.
Differential Revision: D7863625
fbshipit-source-id: 38f41d72ed32b9f0eb1c9c82893f21d83a83f9ad
Summary:
VirtualizedList sets high priority rendering when scrolled to the top of a list even if the bottom of the rendered list is still far away and there's nothing further to render above. This causes severe non-responsiveness while dozens of items are waiting to be rendered and user inputs can't get through.
The fix is simply to not consider it high priority to render more items when we reach the top and the first item has already been rendered, or when we reach the bottom and the last item has been rendered.
The code change just splits the two cases (hitting the top and bottom) instead of combining them into one.
I wrote a small application that switches between two FlatLists.
Demo of the original VirtualizedList
<img src="https://user-images.githubusercontent.com/3090032/39456709-2c87069e-4d1b-11e8-8535-5bda6d59400c.gif" width="270" height="480">
I'm clicking pretty often on the button, but you can see that it only switches lists a split second after the rendering is all done because the javascript thread was being blocked.
Demo of the fixed VirtualizedList
<img src="https://user-images.githubusercontent.com/3090032/39456844-00312448-4d1c-11e8-805f-cbe17aa3f95e.gif" width="270" height="480">
You can see this one is significantly more responsive than the previous one.
The source code for the demo application is available [here](https://gist.github.com/jabbawookiees/ba93a4e7b4f9b8f3acbc157e4fd04877)
[ GENERAL ] [ ENHANCEMENT ] [ Libraries/Lists/VirtualizedList.js ] - Prevent high priority rendering at the top or bottom of a list.
Closes https://github.com/facebook/react-native/pull/19081
Differential Revision: D7933994
Pulled By: sahrens
fbshipit-source-id: 13c9f73baeb3487620b720854a753287ac0aa1fa
Summary:
To prevent people from linking file:// or other URLs inside RN WebViews, default <WebView> to not allowing those types of URLs.
This adds the originWhitelist to specify other schemes or domains to be allowed.
If the url is not allowed, it will be opened in Safari/by the OS instead.
Reviewed By: yungsters
Differential Revision: D7833203
fbshipit-source-id: 6881acd3b434d17910240e4edd585c0a10b5df8c
Summary:
Moves `PlatformViewPropTypes` to the end of `ViewPropTypes` so platforms can override prop type values. An example of this is in `react-native-windows`, we want to support additional values for the `importantForAccessibility` prop type that are specific to Windows (more details in [this PR](https://github.com/Microsoft/react-native-windows/pull/1807)).
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.
<!--
Required: Write your motivation here.
If this PR fixes an issue, type "Fixes #issueNumber" to automatically close the issue when the PR is merged.
-->
<!--
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!
-->
Run jest tests, test RNTester on iOS and Android. Did not test tvOS, but this should not impact tvOS as the only props included from `PlatformViewPropTypes` are unique (i.e., are not overridden in this file).
<!--
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.
-->
https://github.com/Microsoft/react-native-windows/pull/1807
<!--
Required.
Help reviewers and the release process by writing your own release notes. See below for an example.
-->
[CATEGORY] [TYPE] [LOCATION] - Message
<!--
**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
-->
[GENERAL][Enhancement][View] - Make `ViewPropTypes` more friendly to platform extensions.
Closes https://github.com/facebook/react-native/pull/19090
Differential Revision: D7846438
Pulled By: shergin
fbshipit-source-id: e51ee3256d1c21001b371bd07da21319f3ecd810
Summary:
Drop in replacement for `React.PureComponent` or can replace `React.PureComponent` for all components.
Logs out what exactly triggered a re-render of a `PureComponent` to make it easier to track down why a component is re-rendering. With some other changes we'll also get component stacks in the YellowBox to make it even easier.
I thought about logging the values, but it's too easy to render something gross or cyclical like react components, so I figured people could break in the debugger to get more detail as needed.
Special flow type should cause errors if people try to commit any usage of this - it should only be used for local debugging.
Reviewed By: yungsters
Differential Revision: D7826325
fbshipit-source-id: fdf7910336452ac1c7acd328c04d441dfb186b59
Summary:
If someone has setup a subscription on AppState and we correct AppState via getCurrentAppState call, we need to notify all the subscribers of AppState.
1 ) Initial AppState.currentState = 'active'
2-start) Subscribe to AppState Changes
3-start) Fetch Current AppState
4 ) App Code subscribes to AppState module
5 ) App becomes backgrounded
2-finish) AppState listeners are setup (missing background event)
3-finish) AppState.currentState updated to background
At this point the subscription setup in 4) will never be called with the change.
AppState should always call subscribers on change
This is very difficult to formally test since it's due to a race condition. We've seen this condition via bug reports but have had no local repro.
[GENERAL][BUGFIX][AppState] - Fix a race condition that could prevent AppState subscription change listener from firing on initial launch
Closes https://github.com/facebook/react-native/pull/18236
Differential Revision: D7823370
Pulled By: hramos
fbshipit-source-id: 99b174df70262ceaf9da141d005131facd624594
Summary:
* Always log when PRINT_TO_CONSOLE true - o reason to also check DEV.
* Log when `clearExceptTimespans` is called.
* Type `PRINT_TO_CONSOLE: false` to prevent accidental commits setting it true.
Reviewed By: alexeylang
Differential Revision: D7816623
fbshipit-source-id: 47cf7e158133045e20b345139efb1a79e5e6553b
Summary:
Set default `underlineColorAndroid` to `transparent`.
<!--
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#18938
<!--
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!
-->
Use a TextInput in a component without defining `underlineColorAndroid`, the underline color should be transparent.
<!--
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.
-->
<!--
Required.
Help reviewers and the release process by writing your own release notes. See below for an example.
-->
[ANDROID] [BREAKING] [TextInput] - set default underlineColorAndroid to transparent
<!--
**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
-->
Closes https://github.com/facebook/react-native/pull/18988
Reviewed By: mdvacca
Differential Revision: D7765569
Pulled By: yungsters
fbshipit-source-id: f7ad57a46fc0d18b47271ca39faae8c635995fbb
Summary:
This PR removes the need for having the `providesModule` tags in all the modules in the repository.
It configures Flow, Jest and Metro to get the module names from the filenames (`Libraries/Animated/src/nodes/AnimatedInterpolation.js` => `AnimatedInterpolation`)
* Checked the Flow configuration by running flow on the project root (no errors):
```
yarn flow
```
* Checked the Jest configuration by running the tests with a clean cache:
```
yarn jest --clearCache && yarn test
```
* Checked the Metro configuration by starting the server with a clean cache and requesting some bundles:
```
yarn run start --reset-cache
curl 'localhost:8081/IntegrationTests/AccessibilityManagerTest.bundle?platform=android'
curl 'localhost:8081/Libraries/Alert/Alert.bundle?platform=ios'
```
[INTERNAL] [FEATURE] [All] - Removed providesModule from all modules and configured tools.
Closes https://github.com/facebook/react-native/pull/18995
Reviewed By: mjesun
Differential Revision: D7729509
Pulled By: rubennorte
fbshipit-source-id: 892f760a05ce1fddb088ff0cd2e97e521fb8e825
Summary: There are cases of race condition where the react component being mounted is calling a nativemodule from JS *right after* the test runner starts invalidating the bridge. This causes assertion failure deep in the RCTModuleData such that the bridge doesn't complete the invalidation. To avoid this, unmount and deallocate the RCTRootView before invalidating the bridge.
Reviewed By: sahrens
Differential Revision: D7727249
fbshipit-source-id: 8b82edc3b795ceb2e32441f16e225d723fcd9be1
Summary: This allows toggling fabric renderer via the same renderApplication()
Reviewed By: mdvacca
Differential Revision: D7682524
fbshipit-source-id: 59be1d2bea15f5e13e64e2d72304d79f9cb7d084
Summary: Still gross but less gross.
Reviewed By: sebmarkbage
Differential Revision: D7107180
fbshipit-source-id: 31f1639a8f44e4ab247c338001a4a5c9b4b83cdf
Summary:
Issue [#2088](https://github.com/facebook/react-native/issues/2088).
The basic desire is to have a declarative mechanism to transform text content to uppercase or lowercase or titlecase ("capitalized").
My test plan involves having added a test-case to the RNTester app within the `<Text>` component area. I then manually verified that the rendered content met my expectation.
Here is the markup that exercises my enhancement:
```
<View>
<Text style={{ textTransform: 'uppercase'}}>
This text should be uppercased.
</Text>
<Text style={{ textTransform: 'lowercase'}}>
This TEXT SHOULD be lowercased.
</Text>
<Text style={{ textTransform: 'capitalize'}}>
This text should be CAPITALIZED.
</Text>
<Text style={{ textTransform: 'capitalize'}}>
Mixed:{' '}
<Text style={{ textTransform: 'uppercase'}}>
uppercase{' '}
</Text>
<Text style={{ textTransform: 'lowercase'}}>
LoWeRcAsE{' '}
</Text>
<Text style={{ textTransform: 'capitalize'}}>
capitalize each word
</Text>
</Text>
</View>
```
And here is a screenshot of the result:
![screen shot 2018-03-14 at 3 01 02 pm](https://user-images.githubusercontent.com/575821/37433772-7abe7fa0-279a-11e8-9ec9-fb3aa1952dad.png)
[Website Documentation PR](https://github.com/facebook/react-native-website/pull/254)
https://github.com/facebook/react-native-website/pull/254
[IOS] [ENHANCEMENT] [Text] - added textTransform style property enabling declarative casing transformations
Closes https://github.com/facebook/react-native/pull/18387
Differential Revision: D7583315
Pulled By: shergin
fbshipit-source-id: a5d22aea2aa4f494b7b25a055abe64799ccbaa79
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.
-->
- This is most likely a merge issue?
- hasTVPreferredFocus was duplicated in the Flow types definition for the Button component, but the PropTypes are fine
<!--
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!
-->
Removing a duplicated prop can't really throw a Flow error. Anyway, I removed the duplicated prop and successfully ran `$ yarn flow`
<!--
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.
-->
[GENERAL] [ENHANCEMENT] [Button] - Remove duplicate prop definition
<!--
**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
-->
Closes https://github.com/facebook/react-native/pull/18845
Differential Revision: D7627621
Pulled By: mdvacca
fbshipit-source-id: 924522641a334212f5e2c1310d81da1e321f19b1
Summary:
BREAKING CHANGE
This change upgrades the React Native build pipeline from Babel 6 to Babel 7
If you use a `.babelrc` then you'll need to update it to Babel 7 (note that some plugins are no longer relevant, some plugins are automatically upgraded, and some will need some manual love).
Note that you may also need to upgrade your dev env, tests etc, to make sure they work with Babel 7.
Reviewed By: mjesun
Differential Revision: D7591303
fbshipit-source-id: 29cef21f6466633a9c366d1f3c0d3cf874c714db
Summary:
BREAKING CHANGE
This change upgrades the React Native build pipeline from Babel 6 to Babel 7
If you use a `.babelrc` then you'll need to update it to Babel 7 (note that some plugins are no longer relevant, some plugins are automatically upgraded, and some will need some manual love).
Note that you may also need to upgrade your dev env, tests etc, to make sure they work with Babel 7.
Reviewed By: cpojer
Differential Revision: D7097279
fbshipit-source-id: 9fb204cae733174a1c155669b7c17ddb70f7aecc
Summary:
The latest release of react-native (0.55.2) does not expose the new `InputAccessoryView` component; It can't be accessed at all. This change fixes this problem.
* Problem: Snack showing the problem: https://snack.expo.io/B1fDQRYif
* Proof: `RNTester` still works with adapted imports
No related PRs.
[IOS] [BUGFIX] [InputAccessoryView] - Expose `InputAccessoryView` so it can be imported
Closes https://github.com/facebook/react-native/pull/18780
Differential Revision: D7581729
Pulled By: hramos
fbshipit-source-id: d61ab1f167360e829e32b93fb5414d2f7e57e115
Summary:
Trying this again with a fresh pullrequest as the old one kept having issued due to rebasing.
Fixes#16635
the issue is a little serious if you use a scrollview which contains textinput, you will never get a chance to input something since keyboard will always be dismissed because of on-drag event if your scroll-view use the property: keyboardDismissMode ='on-drag'
verify the issue #16635 and tested this fix worked
[ANDROID] [BUGFIX] [ScrollView] - Check that isTouching is also set when dismissing keyboard with on-drag android.
Closes https://github.com/facebook/react-native/pull/18785
Differential Revision: D7569815
Pulled By: hramos
fbshipit-source-id: 2a07369297ce9ce5a7714e513ccb480ee7011a4d
Summary:
Changed StyleSheet.create to be the identity function. We no longer hide it behind an opaque number. Better for types and perf since we don't use it.
I don't really know if we have/need any safer way of rolling this out than just landing it.
It can break if the object passed to StyleSheet.create is mutated afterwards but that isn't a practice anywhere I've seen.
Reviewed By: sophiebits
Differential Revision: D7530023
fbshipit-source-id: bc1afa879c5a5d9cd95cb13bc8ff3347b3622851
Summary:
Android apps play a touch sound on press, as long as you have "Touch sounds" enabled in the settings. As and Android user, when building my app using React Native, one of the first things I noticed was that there were not any touch sounds. This is missing from React Native and there have been multiple PRs to have this implemented, but no success.
This PR iterates over [#6825](https://github.com/facebook/react-native/pull/6825) and [#11136](https://github.com/facebook/react-native/pull/11136)
This PR keeps it simple by only implementing the enhancement for Android, as iOS apps typically do not use touch sounds, and follows the users' system settings for whether or not the sound is played.
I have manually tested this on multiple devices and emulators with zero problems
[ANDROID] [ENHANCEMENT] [UIManagerModule.java]- Adds Android click sound to touchables
[ANDROID] [ENHANCEMENT] [Touchable] - Adds Android click sound to touchables
Closes https://github.com/facebook/react-native/pull/17183
Differential Revision: D7560327
Pulled By: hramos
fbshipit-source-id: ce1094c437541bc677c7d64b0dba343dd9574422
Summary:
This reverts commit b9be28915c.
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.
<!--
Required: Write your motivation here.
If this PR fixes an issue, type "Fixes #issueNumber" to automatically close the issue when the PR is merged.
-->
Fix#18696
<!--
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!
-->
Run Jest tests.
Run WebSocket example from RNTester on Android.
<!--
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.
-->
<!--
Required.
Help reviewers and the release process by writing your own release notes. See below for an example.
-->
[CATEGORY] [TYPE] [LOCATION] - Message
<!--
**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
-->
[ANDROID][BUGFIX][WebSocketModule] - revert change that regresses WebSocketModule
Closes https://github.com/facebook/react-native/pull/18733
Differential Revision: D7548850
Pulled By: hramos
fbshipit-source-id: b8c79810c1cd6e5a30ec4118bd5ff8ad719f04b9
Summary:
The reference needed to be updated after the file was moved in this commit:
06085d3836
Otherwise, results in the packager failing with the following error:
> Unable to resolve module TouchHistoryMath from /node_modules/react-native/Libraries/Interaction/PanResponder.js: Module TouchHistoryMath does not exist in the Haste module map
Closes https://github.com/facebook/react-native/pull/18732
Differential Revision: D7547181
Pulled By: sebmarkbage
fbshipit-source-id: 78028c2f46faa2ce130a1a0c25fcaca47d2516a8
Summary:
This pull request implements Image.defaultSource property on Android, using Fresco (http://frescolib.org/docs/placeholder-failure-retry.html), which will show placeholder image (local asset) while loading remote image. Implementation code is almost same with loadingIndicatorSource, but without rotation.
This requires release or production to bundle local images in an APK file.
This provides feature parity with iOS.
Set Image.defaultSource on Android, and will show it while loading Image.source.
```JSX
<Image
defaultSource={require('<path to image>')}
source={{uri: '<url to remote image>'}}
style={{ height: 300, width: 300 }}
/>
```
[ANDROID] [FEATURE] [IMAGE] - Image.defaultSource will show local image as placeholder while loading remote Image.source.
Closes https://github.com/facebook/react-native/pull/18588
Differential Revision: D7540489
Pulled By: himabindugadupudi
fbshipit-source-id: 908ceb659b3416e517bba64c76a31879d965ec09
Summary:
This hasn't been used by React core for a while. It's unclear why it was in the first place.
We can move it back next to the Panresponder.
https://github.com/facebook/react/pull/12557
Reviewed By: sophiebits
Differential Revision: D7529949
fbshipit-source-id: ef9892cfa8d2d6768da216b81befabe02795a245
Summary:
Some warnings don't have a good prefix that can be targeted using .startsWith, e.g. "Module $modulename requires main queue setup". It would be helpful to be able to select this warning using the much more specific middle part of the string ("requires main queue setup since it overrides `constantsToExport`) so I want to change this check from startsWith to includes to enable that.
Changing from .startsWith -> .includes should be completely backward compatible.
Reviewed By: TheSavior
Differential Revision: D7445309
fbshipit-source-id: 2c91dbe5ee3c3aa74be1bca091b20d294e64e853
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.
You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html
Happy contributing!
-->
In react-native v0.52 this warning shows:
```
"RCTImageLoader requires main queue setup
since it overrides `init` but doesn't implement `requiresMainQueueSetup`".
```
This removes the warning by implementing `requiresMainQueueSetup` on RCTImageLoader
* Create new react-native project
* Enable Remote JS Debugging
* Should see no warning regarding RCTImageLoader requiring main queue setup
<!--
Help reviewers and the release process by writing your own release notes
**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 ] [ {File} ]
[ IOS ] [ FEATURE ] [ {Directory} ] |-----------|
[ ANDROID ] [ MINOR ] [ {Framework} ] - | {Message} |
[----------] [-------------] [-------------] |-----------|
[CATEGORY] [TYPE] [LOCATION] - 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
-->
[IOS] [BUGFIX] [Libraries/Image/RCTImageLoader.m] - Implements `requiresMainQueueSetup`
Closes https://github.com/facebook/react-native/pull/17679
Reviewed By: shergin
Differential Revision: D7159601
Pulled By: fkgozali
fbshipit-source-id: e17bae67f4005d2c9ddd0d3701506521f3cac152
Summary:
`RCTSubtractionAnimatedNode.m` was not added to the tvOS build of RCTAnimation... this PR fixes the issue.
tvOS CI should succeed after this change.
[TVOS] [BUGFIX] [RCTAnimation] Fix build breakage
Closes https://github.com/facebook/react-native/pull/18663
Differential Revision: D7483586
Pulled By: hramos
fbshipit-source-id: 521152d829b064b7002dc8651a0558373c5505f8
Summary:
Setting `textContentType` will provide the keyboard and system with semantic meaning for inputs. Should enable password/username autofill in apps running on iOS 11+ as demonstrated here: https://developer.apple.com/videos/play/wwdc2017/206/
Also gives you the ability to disable autofill by setting `textContentType="none"`: https://stackoverflow.com/questions/48489479/react-native-disable-password-autofill-option-on-ios-keyboard
Adding `textContentType` equal to `username` or `password` should give you an autofill-bar over the keyboard which will let you fill in values from the device Keychain:
![image](https://user-images.githubusercontent.com/4932625/37848513-b2170490-2ed4-11e8-85bf-895823d4f98a.png)
Setting the appropriate `textContentType` will fill in the correct value in the `TextInput`.
I have only been able to get this to work on device, and not simulator.
Usage:
```jsx
<TextInput
value={this.state.username}
onChangeText={this.setUserName}
textContentType="username"
/>
```
```jsx
<TextInput
value={this.state.password}
onChangeText={this.setPassword}
secureTextEntry={true}
textContentType="password"
/>
```
To disable:
```jsx
<TextInput
value={this.state.password}
onChangeText={this.setPassword}
secureTextEntry={true}
textContentType="none"
/>
```
This will set `textContentType` to an empty string: https://stackoverflow.com/a/46474180/5703116
<!--
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.
-->
Docs PR coming up.
[IOS] [MINOR] [TextInput] - Added `textContentType` prop for iOS 10+. Will enable password autofill for iOS 11+.
Closes https://github.com/facebook/react-native/pull/18526
Differential Revision: D7469630
Pulled By: hramos
fbshipit-source-id: 852a9749be98d477ecd82154c0a65a7c084521c1
Summary:
Border radius already works properly with native animated but was not in the whitelisted props.
Tested in an app that animating border radius with native animated actually works.
[GENERAL] [ENHANCEMENT] [NativeAnimated] - Support border radius
Closes https://github.com/facebook/react-native/pull/18574
Differential Revision: D7415956
Pulled By: hramos
fbshipit-source-id: 6dd46bcdcb10c6a1956dd1f526212f33a4f44425
Summary:
We currently handle empty body poorly in the iOS blob implementation, this happens because of an early return that cause the blob response to not be processed by the blob module, resulting in an empty string as the body instead of a blob object. We also need to make sure to create an empty blob object when data is nil (empty body) as per the XMLHttpRequest spec. The Android implementation was already handling this properly.
Fixes#18223
Send a HEAD request
```js
fetch('https://apipre.monkimun.com/whoami', {
body: null,
method: 'HEAD',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
})
```
[IOS][BUGFIX][Blob] - Fix blob response parsing for empty body
Closes https://github.com/facebook/react-native/pull/18547
Differential Revision: D7415950
Pulled By: hramos
fbshipit-source-id: 56860532c6171255869f02a0960f55d155184a46
Summary:
This commit makes the websocket's delegate dispatch queue use `RCTWebSocketModule`'s method queue.
This fixes a bug where didReceiveMessage was called on the wrong queue, which is especially harmful if the websocket has a contentHandler expects to be running on the RCTWebSocketModule's method queue.
This also fixes the race condition where `_contentHandlers` and `_sockets` can be mutated from the main dispatch queue (the default in `RCTRSWebSocket`) and `RCTWebSocketModule`'s method queue.
Websockets still work, and hopefully crash less now.
- [iOS][BUGFIX][WebSocket] fix crashes caused by a race condition in websocket delegates.
Closes https://github.com/facebook/react-native/pull/18530
Differential Revision: D7394298
Pulled By: hramos
fbshipit-source-id: 230466ccb47ea532ced15cd7603256a19077b32b
Summary:
invertStickyHeaders was being set to "this.props.inverted" -- it should just inherit from the props of VirtualizedList instead, per discussion in https://github.com/facebook/react-native/issues/18471Fixes#18471
Pass "invertStickyHeaders: false" to a SectionList (or FlatList), and expect that your sticky headers stick to the bottom of the ScrollView, instead of the top.
none
[ANDROID] [BUGFIX] [SectionList] - invertStickyHeaders can now be set from SectionList or FlatList.
Closes https://github.com/facebook/react-native/pull/18524
Differential Revision: D7386163
Pulled By: hramos
fbshipit-source-id: 3b66dfca280e657303f69f98c5a8bc0df033f9f7
Summary: Simply moving it out of shims to not confuse React project
Reviewed By: bvaughn
Differential Revision: D7341846
fbshipit-source-id: b1a0cdb0caca977de744699521f42556699993a7
Summary:
Using platform checks can make it difficult to incorporate changes for other platforms (e.g. Windows).
Using a check for the underlying function accomplishes the same goal without relying on an Android-specific check. This change allows this JS file to be re-used instead of copied and modified.
[X] Run Jest tests
[X] Test in RNTester on simulators
[X] Test in Playground
No related PR's found :)
[GENERAL] [ENHANCEMENT] [Libraries/ReactNative/requireFabricComponent.js] - Simplified check against UIManager to support additional platforms, removing Android-specific check
Closes https://github.com/facebook/react-native/pull/18381
Differential Revision: D7336214
Pulled By: hramos
fbshipit-source-id: e936f1fdcf36556c528115ee3f79197883d7b7d4
Summary: The pull request that added this (#17397) simply forgot to remove the callback, which would cause crashes if the RCTNetInfo module was ever deallocated. While that usually doesn't happen in apps, it can if the user logs out and you need to wipe all the RCT modules (to remove user data, for instance).
Reviewed By: PeteTheHeat
Differential Revision: D7322999
fbshipit-source-id: e49ec7311b39920f7b7743a5854c0dda1dbccc73