Summary:
*Pressable* is a component which is intended to replace the Touchable* components such as *TouchableWithoutFeedback* and *TouchableOpacity*. The motivation is to make it easier to create custom visual touch feedback so that React Native apps are not easily identified by the “signature opacity fade” touch feedback.
We see this component as eventually deprecating all of the existing Touchable components.
Changelog:
[Added][General] New <Pressable> Component to make it easier to create touchable elements
Reviewed By: yungsters
Differential Revision: D19674480
fbshipit-source-id: 765d657f023caea459f02da25376e4d5a2efff8b
Summary:
Fabric debugging.
I also have an agenda of removing all instances of `ReactConstants.TAG`, because it's overly broad and not helpful during debugging.
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D20016401
fbshipit-source-id: 91e5cd7e8eb662b1a4a887c1e4e66a31ec741b46
Summary:
motivation: there are cases where one'd like to control the radius of the ripple effect that's present on TouchableNativeFeedback - in my case, I want to make sure that both icons and text have the same ripple appearance, but that's currently not possible as far as I can tell.
Currently (afaik) the only way to set (upper) ripple limits is by specifying width, height and border radius ( + `overflow: hidden`), and this works well for icons which can usually be bounded by a square, but not for text which can have rectangular shape.
This PR adds `rippleRadius` parameter to `SelectableBackground()`, `SelectableBackgroundBorderless()` and `Ripple()` static functions present on `TouchableNativeFeedback`. It can make the ripple smaller but also larger. The result looks like this:
added to RNTester:
![SVID_20200219_182027_1](https://user-images.githubusercontent.com/1566403/74858131-147ff380-5345-11ea-8a9e-2730b79eec38.gif)
difference from the other ripples:
![SVID_20200209_110918_1](https://user-images.githubusercontent.com/1566403/74109152-4513a080-4b81-11ea-8ec3-bb5862c57244.gif)
I'm ofc open to changing the api if needed, but I'm not sure there's much space for manoeuvring. While I was at it, I did a slight refactor of the class into several smaller, more focused methods.
It's possible that in some cases, this might help to work around this issue https://github.com/facebook/react-native/issues/6480.
## Changelog
[Android] [Added] - allow setting custom ripple radius on TouchableNativeFeedback
Pull Request resolved: https://github.com/facebook/react-native/pull/28009
Test Plan: I tested this locally using RNTester
Reviewed By: TheSavior
Differential Revision: D20004509
Pulled By: mdvacca
fbshipit-source-id: 10de1754d54c17878f36a3859705c1188f15c2a2
Summary:
Addresses deprecation warnings from `octokit/rest`. This is a follow up to https://github.com/facebook/react-native/issues/28019.
## Changelog
[Internal] [Fixed] - Address deprecation warnings from `octokit/rest`
Pull Request resolved: https://github.com/facebook/react-native/pull/28050
Test Plan: PRs should still get app bundle sizes report, but the warnings in the build logs should be gone.
Reviewed By: cpojer
Differential Revision: D20008805
Pulled By: hramos
fbshipit-source-id: 891d14fd9d55f217194a095d2736494416dacda2
Summary:
As we don't link modules manually anymore it's better to point the user in another direction when they face this issue.
## Changelog
[Internal] [Changed] - tweak missing RCTAnimation warning message
Pull Request resolved: https://github.com/facebook/react-native/pull/28139
Reviewed By: cpojer
Differential Revision: D20009264
Pulled By: hramos
fbshipit-source-id: 114cae4fe908186eab3d8d9e79c2016015406821
Summary:
The accessibility roles and states description strings are not able to be localized on iOS platform. Those strings are exposed to the end users so it should be localized. This PR is to add localized strings as a resource bundle to the React Core Pod so that any React Native app integrating the React Native dependencies using CocoaPods can get the localized accessibility roles and states description.
## Changelog
[iOS] [Added] - Add localized accessibility strings to React Core pod
Pull Request resolved: https://github.com/facebook/react-native/pull/27995
Test Plan: Verified with RNTester app.
Differential Revision: D19975587
Pulled By: PeteTheHeat
fbshipit-source-id: f8eb4e25194f0cd603c98a6221ec87503a2826ed
Summary:
`AccessibilityInfo.isScreenReaderEnabled().then()` fails by default in tests because that function is mocked and it doesn't return a promise (the default return value is `undefined`). Returning `Promise.resolve(false)` is a good default in this case so it doesn't break any code relying on it.
Changelog: [General] [Fixed] - Fix `AccessibilityInfo.isScreenReaderEnabled` mock in Jest setup
Reviewed By: lunaleaps, motiz88
Differential Revision: D19972921
fbshipit-source-id: 3c8498d5aeeac54d1f5cf333ae39658e22c180a1
Summary:
The [PlatformColor PR](https://github.com/facebook/react-native/pull/27908) is currently open to implement the [PlatformColor proposal](react-native-community/discussions-and-proposals#126). When that PR was imported into Facebooks internal builds it was found that the change to the `processColor()` function to return an opaque type or `number` instead of just `number` breaks internal components.
This PR is a simplification of the PlatformColor PR only changing the return type of `processColor()` from `?number` to `?number | NativeColorType` where `NativeColorType` is just an empty but opaque type. This will allow changes to be made to these internal components but with less risk than the larger PR.
## Changelog
[General] [Changed] - Add NativeColorType opaque type to normalizeColor() ahead of PlatformColor PR
Pull Request resolved: https://github.com/facebook/react-native/pull/28040
Test Plan: Flow checks, Jest test, iOS unit tests, iOS integration tests, and manual testing performed on RNTester for iOS and Android.
Differential Revision: D19860205
Pulled By: TheSavior
fbshipit-source-id: 799662c6621d3974158b375ccccfa136982c43b4
Summary:
This method isn't necessary for the migration to LogBox because we have a YellowBoxDeprecated module instructing users to use LogBox.ignoreLogs (so no old code should be calling LogBox.ignoreWarnings).
Changelog: [Internal]
Reviewed By: motiz88
Differential Revision: D19950302
fbshipit-source-id: 4850884e770f812273978b9a205f5b914e5a9d2f
Summary:
This diff replaces YellowBox with YellowBoxDeprecated, adding warnings for using the module directly instead of YellowBox. Also adds a no-op message for unstable_enableLogBox.
Changelog: [Internal]
Reviewed By: motiz88
Differential Revision: D19949700
fbshipit-source-id: 269c341a2cedcdb2f7a80947d3239db078238201
Summary:
This diff replaces YellowBox with LogBox so that it can be deprecated and removed.
After this diff, it will no longer be possible to go back to YellowBox and all paths referencing it will be gone.
Changelog: [Internal]
Reviewed By: motiz88
Differential Revision: D19949695
fbshipit-source-id: 28a55866e514020bdcc6854aae565cffbbe8af58
Summary:
Make iOS use Commands instead of UIManager.{focus,blur}. This makes these apis compatible with Fabric and paper at the same time.
Changelog:
[Internal] Switch iOS focus/blur calls to use new commands
Reviewed By: mdvacca
Differential Revision: D19458995
fbshipit-source-id: 8c4aacd41941f54a887aeec1a17d9ce0b6878ab1
Summary:
This makes Android dispatch focus/blur through the Fabric view manager when running in Fabric.
Changelog:
[Internal] Switch Android focus/blur calls to use new commands
Reviewed By: JoshuaGross, mdvacca
Differential Revision: D19458362
fbshipit-source-id: 23e1d989ec55bc8abff4279e259f4b6c953ac0a3
Summary:
This diff is just here to make it easier for me to work on the stack. It needs to be ripped out of the stack before landing
Changelog:
[Breaking][General] The `target` field of events is now a native component, not a react tag
Reviewed By: mdvacca
Differential Revision: D19458361
fbshipit-source-id: 1d03a58553cf96dc72f6d1323dfb37b1a8cdca75
Summary:
Make the script ready for picking in 0.62.0-rc.3.
* Rename the script to remove ambiguity. “autolinking” is a CLI feature where 3rd-party pods are automatically discovered: https://github.com/react-native-community/cli/blob/master/docs/autolinking.md
* Make the Flipper version of the pods configurable, as requested [here](https://github.com/facebook/react-native/pull/28044#discussion_r378662636).
* Make RNTester’s Podfile use the same form as the template–including enabling Flipper by moving the CPP define into the right place in the Xcode project and out of the Podfile.
* Get rid of Podfile.lock thrashing by making the default CDN spec source explicit.
## Changelog
[iOS] [Changed] - Disambiguate autolinking-ios.rb script from CLI’s “autolinking” feature and bring RNTester & template in line.
Pull Request resolved: https://github.com/facebook/react-native/pull/28077
Test Plan: RNTester builds, as does a new application.
Reviewed By: PeteTheHeat
Differential Revision: D19956392
Pulled By: TheSavior
fbshipit-source-id: 6c800ddb646b49fc45c088978e2794cd7b60ea48
Summary:
Changelog: [internal]
Repro steps:
1. Go to fbsource/fbobjc.
2. Run following focus command P124860753.
3. Enable Address Sanitizer in Xcode.
3. Run the app from Xcode.
5. Make sure `react_fabric.enable_marketplace_home_ios` and `react_fabric.enabled_state_reconciliation_ios` Mobile Config flags are set to true.
6. Navigate to Marketplace Home and observe use of freed memory exception. You have to wait until second page of marketplace home feed is loaded.
{F228880980}
# Root cause
`ChangedShadowNodePairs` being a vector of pairs of references.
Those `shared_ptr` do not outlive the the run of `reconcileStateWithTree` (that's what I originally thought when I made them references).
This was introduced in D19814500.
Reviewed By: JoshuaGross
Differential Revision: D19977784
fbshipit-source-id: 8c4a381137baa08a6af9d3c1cb295fe6c2b2bf95
Summary:
1/4 of https://github.com/facebook/react-native/issues/28103
## Changelog
[JavaScript][Removed] - Remove leftover `Incremental` component.
Pull Request resolved: https://github.com/facebook/react-native/pull/28107
Test Plan: In RNTester `Incremental` component is no longer used so I modified one of existing examples to use it.
Reviewed By: rickhanlonii
Differential Revision: D19960536
Pulled By: TheSavior
fbshipit-source-id: 791bda7138ac23916957577ed5f5c465c5e96299
Summary:
Changelog: [Internal]
This allows to block queue until image is fetched.
In paper, the photo of dog will not appear unless the network request is "fast enough".
{F228670428}
Reviewed By: shergin
Differential Revision: D19907906
fbshipit-source-id: 98d68abf1255388f9b97fb9da367d8f583a4220d
Summary:
The current AppVeyor test is failing on node v8. Since v8 is no longer active (https://nodejs.org/en/about/releases/), updated to the current LTS versions.
## Changelog
[Internal] [Changed] - Changed AppVeyor Node test versions to 10 & 12
Pull Request resolved: https://github.com/facebook/react-native/pull/27980
Test Plan: Hopefully makes the tests green �
Differential Revision: D19873610
Pulled By: hramos
fbshipit-source-id: 6f42a6046a1c015d327b15dc9537d0c2bb27e978
Summary:
TextInput’s `InputAccessoryView` was using a [deprecated] prop-type as a Flow type, which TheSavior asked me to fix [here](6ba4b28a22 (r37343692)).
## Changelog
[iOS] [Fixed] - Fixes the `InputAccessoryView.backgroundColor` prop’s typing to use `ColorValue`.
Pull Request resolved: https://github.com/facebook/react-native/pull/28105
Test Plan:
Passes:
```bash
yarn flow-check-ios
```
Differential Revision: D19956401
Pulled By: TheSavior
fbshipit-source-id: 0c16f292b0143e83235a23712a0a7a11b8317f4e
Summary:
I just stumbled upon [This PR](https://github.com/facebook/react/pull/18039) and thought it would be great for react-native repo to have the same.
This creates a link in issue template that will lead people who found error in the documentation to the appropriate repo, and people who has questions about react-native will be lead to the support page.
<img width="1034" alt="Screen Shot 2020-02-15 at 13 44 02" src="https://user-images.githubusercontent.com/6936373/74582027-ce9bf600-4ff9-11ea-9dc5-21601c4007c4.png">
## Changelog
[Internal] [Changed] - Add links to Issue template
Pull Request resolved: https://github.com/facebook/react-native/pull/28079
Test Plan: This pr does not contain any change in the functionality of react-native.
Differential Revision: D19954747
Pulled By: hramos
fbshipit-source-id: 7cce094e2519c0f508858a034f053d058d801f35
Summary:
Right now, `requestFocus()` is a no-op if the EditText view thinks it's already focused. In certain cases, though, we still want to focus the view even if it's already focused - for example, if TalkBack is enabled and you dismiss the keyboard, you want to be able to tap on the TextInput again to bring back the keyboard, even though the View never thinks it lost focus.
What I'm doing instead is basically disregarding the View's current focus state if we *would* focus the TextInput, which is in 3 circumstances:
- When the view is attached to a window, if autofocus is true
- When the focus is being requested by JS
- When the focus is being requested by an accessibility action from the OS
Changelog: [Android][Fixed] Change how TextInput responds to requestFocus to fix a11y focus issue
Reviewed By: mdvacca
Differential Revision: D19750312
fbshipit-source-id: 30b9fab40af4a083fa98f57aba7e586540238bea
Summary:
This diff replaces some YellowBox references with LogBox so we can remove it.
Changelog: [Internal]
Reviewed By: motiz88
Differential Revision: D19948126
fbshipit-source-id: b26ad1b78d86a8290f7e08396e4a8314fef7a9f3
Summary:
Migrates internal calls from ignoreWarnings to ignoreLogs so we can remove YellowBox.
Changelog: [Internal]
Reviewed By: TheSavior
Differential Revision: D19813781
fbshipit-source-id: 16c7b3f2cd38cba1901eccb4d5b9a2396a37ba1b
Summary:
We need to export this so that users can call methods like:
```
LogBox.ignoreAllLogs();
LogBox.ignoreLogs([/whatever/]);
```
Changelog: [General] [Added] Export LogBox module
Reviewed By: TheSavior
Differential Revision: D19813773
fbshipit-source-id: 8c301c16247c5b9f4b23e8afaf6a9783b4b4c724
Summary: This diff reverts the iOS LogBox module back to the UIWindow strategy used by Redbox.
Reviewed By: sammy-SC
Differential Revision: D19941390
fbshipit-source-id: 4aea09137ea9e8bfc166a733272647a79102bf35
Summary:
Changelog: [Internal]
Switching queue here is not necessary if we are already on the main queue.
This is important for Fabric SSTs, otherwise images are missing.
Reviewed By: shergin
Differential Revision: D19907908
fbshipit-source-id: 52e82484afc8e2f591d0c5cc126952990d992e96
Summary:
Both the UIManagers use ReactConstants.TAG currently, so certain logs are ambiguous. Use FabricUIManager's tag instead for all logs to disambiguate.
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D19945587
fbshipit-source-id: 0a9d62b5c0276688b2ad3acf8d893b523c26560a
Summary:
Moves the LogBox images from base64 data to files since base64 is not supported everywhere.
Changelog: [Internal]
Reviewed By: fkgozali
Differential Revision: D19879323
fbshipit-source-id: 2dc03eebfc712ed863ed76322e133fcad5b00bb4
Summary:
ChangeLog: [Both] Adds perf markers for `XMLHttpRequest`s
Makes it easier to see JS-based network operations in performance traces.
Reviewed By: zackargyle
Differential Revision: D19903143
fbshipit-source-id: c5ce60163569e003830d8079cb2b580469d5bd5d
Summary:
We've updated the version of plugin to 1.7.0 that includes similar fix to D19910353
## Changelog:
Changelog: [Internal]
Reviewed By: kassens
Differential Revision: D19912264
fbshipit-source-id: 973d4211bf56e33da427e01c9c561e15f7406ffb
Summary:
https://github.com/facebook/react-native/pull/22166 removed inline styles from TextInputTestModule but applied the incorrect style to some of the TextInputs - instead of setting the text color, it set the margin. This caused the test to fail because no color was applied.
Changelog: [Android] [Fixed] Fixed style in TextInputTestCase
Reviewed By: zackargyle
Differential Revision: D19912362
fbshipit-source-id: d5068114b726ee7583842e5f6f323862b0c28e44
Summary:
Same as rickhanlonii’s 2c89e51507, but for the application template.
## Changelog
Changelog: [Android] [Fixed] Template instacrash from missing androidx dependency
Pull Request resolved: https://github.com/facebook/react-native/pull/28071
Test Plan: Apps build with the template from v0.62.0-rc.2 don’t instacrash.
Differential Revision: D19908895
Pulled By: mdvacca
fbshipit-source-id: 63337f4c0c0ffeb3b024682744610c7915e2b742