Граф коммитов

16066 Коммитов

Автор SHA1 Сообщение Дата
Valentin Shergin 136666e2e7 Fabric: Using stored inside ShadowNode pointer to Descriptor instead of table lookup
Summary:
Nowadays, every ShadowNode has a reference to a ComponentDescriptor, so now there is no need to do registry lookup for that.
That should save us 0.5-1.0 ms in my non-scientific measurements.

Reviewed By: mdvacca

Differential Revision: D14348369

fbshipit-source-id: 57f6a6f2f8bf0b7e58d89a414fec20b2db8876f7
2019-03-06 20:06:08 -08:00
Mack Browne 903d52551c Fix broken links in table of contents Readme (#23795)
Summary:
I noticed the links under `## Contents` weren't clickable in the README.md file. This PR makes the links in table of contents clickable again.

[General] [Fixed] - Fix broken links for the table of contents in `README.md`
Pull Request resolved: https://github.com/facebook/react-native/pull/23795

Differential Revision: D14350857

Pulled By: hramos

fbshipit-source-id: ddc02e7905b653cf65ad6ad631bccdbbca936a7f
2019-03-06 17:13:35 -08:00
George Zahariev 35d2dfcabf Deploy 0.94 to xplat
Summary:
Update Flow version in xplat (https://our.intern.facebook.com/intern/wiki/Flow/Flow_Release_Process/#update-xplat-js)

allow-large-files
bypass-lint

Reviewed By: nmote

Differential Revision: D14317820

fbshipit-source-id: 07ec22c0745321db036f4e10a502009a4b640652
2019-03-06 14:57:30 -08:00
Maxiee bc0bb2c88e Fix small typo in InteractionManager-test.js (#23782)
Summary:
Fix small typo in InteractionManager-test.js

[General] [Fixed] - Fix small typo in InteractionManager-test.js
Pull Request resolved: https://github.com/facebook/react-native/pull/23782

Differential Revision: D14349443

Pulled By: hramos

fbshipit-source-id: aefa6ec2ed861d23dbc77af7b4918ddff9078ccd
2019-03-06 12:14:32 -08:00
Héctor Ramos c53d918c4e Use Markdown extension in SUPPORT file (#23791)
Summary:
Followup to fe80a0c01d. Use a Markdown extension to let GitHub know this can be rendered as a Preview, otherwise GitHub will display the plaintext version.

[General] [Fixed] - Use Markdown in SUPPORT file
Pull Request resolved: https://github.com/facebook/react-native/pull/23791

Differential Revision: D14349422

Pulled By: hramos

fbshipit-source-id: 836746f35c6e962f3ca64a138bbf764529a6e043
2019-03-06 12:09:13 -08:00
Héctor Ramos 2715898cb9 Trivial: Fix typo in README link (#23792)
Summary:
Link to docs repo is broken in markdown.
Pull Request resolved: https://github.com/facebook/react-native/pull/23792

Differential Revision: D14348403

Pulled By: hramos

fbshipit-source-id: 76cfd620ec87250df77e535b3c215d682b19c8f7
2019-03-06 11:38:28 -08:00
Alexey Lang a9b3ca7fa7 Use global or scoped performance loggers everywhere
Summary:
I'm changing all callsites to use either global or scoped perf logger explicitly in one diff.
`GlobalPerformanceLogger` is basically a singleton
`scopedPerformanceLogger` is scoped to the React tree by using a React Context

Reviewed By: sahrens

Differential Revision: D14186694

fbshipit-source-id: 062c76eea8fce9d9b531f0eddf153bb79d52f68d
2019-03-06 09:51:56 -08:00
Héctor Ramos ea8571b0eb Update README (#23779)
Summary:
Clean up and make the README look a bit nicer. Inspired by https://github.com/gatsbyjs/gatsby/blob/master/README.md.

This PR brings back an introduction to React Native that focuses on our strengths. I'm happy to punt updates to the marketing copy for later, if we want to focus on updating the README layout first.

![readme](https://user-images.githubusercontent.com/165856/53846592-59f3b700-3f62-11e9-95cf-4391c74460f4.png)

[General][Changed] - Nicer README.
Pull Request resolved: https://github.com/facebook/react-native/pull/23779

Differential Revision: D14341562

Pulled By: hramos

fbshipit-source-id: 87dba4fe4e3598f638fdc499347a2c9aedde8f8d
2019-03-06 06:20:06 -08:00
Héctor Ramos fe80a0c01d Add SUPPORT document, update other GitHub templates (#23778)
Summary:
See https://help.github.com/en/articles/adding-support-resources-to-your-project. The SUPPORT file is surfaced by GitHub in several useful places. The goal is to increase discoverability of all support resources, giving the reader an opportunity to find the help they need before they open an issue in the              repository. A secondary goal is to use a friendlier tone when communicating our processes.

The issue templates have been standardized to follow the format used by GitHub's template tool. A bug in the "Regressions" template, due to its use of multiple labels, is fixed as well.
The bot will explain how a changelog can be fixed when it nags a PR.

[General][Added] - Added SUPPORT resources, friendlier messaging.
Pull Request resolved: https://github.com/facebook/react-native/pull/23778

Differential Revision: D14333911

Pulled By: hramos

fbshipit-source-id: d4b3e75194ea7d5c932dd8df2393d5b189f30f35
2019-03-05 17:08:24 -08:00
Héctor Ramos 427b94b56b Docker: Use the new community image, and update instructions. (#23723)
Summary:
The `Dockerfile.android` had fallen out of date. We now point to the new community image being used in the Circle CI `test_android` workflow. After spending an hour or two working with these Docker images, I saw some opportunities to clean up the docs as well.

[ANDROID] [Fixed] - Use new React Native Community Android base image for local Docker tests.
Pull Request resolved: https://github.com/facebook/react-native/pull/23723

Differential Revision: D14331737

Pulled By: hramos

fbshipit-source-id: cf42820021c997c3c06cc8b3671f67c9d2650ee5
2019-03-05 15:37:13 -08:00
Luna Wei cba75cf12d EditText turn off hardware acc. for Oreo
Summary:
Research into this error led us to this: https://issuetracker.google.com/issues/67102093

which refers to a very similar stack trace as our error:
* Both errors have a bad access in `android.text.DynamicLayout.getBlockIndex` due to a negative array index
* The report mentions it only affecting Oreo devices, this aligns with our [LogView](https://our.intern.facebook.com/intern/logview/details/facebook_android_crashes/80ce327664e6696ef03f951a9268ac29/?trace_key=cc916846a500b6efb5c68ae1a2e6b5c3) where ~99% of affected device os versions are Oreo.

As a workaround mentioned in discussion, this diff turns off hardware acceleration for Oreo devices in `ReactEditText`

Reviewed By: mdvacca

Differential Revision: D14291369

fbshipit-source-id: 797d3123bcb240abd2401ca0d7d3a5a3ef8e22e3
2019-03-05 14:39:34 -08:00
Rick Ratmansky f43f48fce1 Fixing robolectric tests by not skipping androidx instrumentation
Summary:
androidx files were not being instrumented properly which meant we would have exceptions thrown by powermock

Robolectric Instrumentation config was changed by hand, the remainder is a codemod using abgs + xargs + sed

Differential Revision: D14323745

fbshipit-source-id: 56aa97dad5d7197f4eb0ba1fdd80b1583bcad6ac
2019-03-05 14:33:42 -08:00
Valentin Shergin 393bf8aaad Fabric: Fixed a bug in ShadowViewMutation constructor
Summary:
Clowntown.
This fixes a recent regression happened becasuse wrong order of parameters in ShadowViewMutation constructor.

Reviewed By: JoshuaGross

Differential Revision: D14329164

fbshipit-source-id: 5a0dc04b889fb3357050b951d56c3e436dbeefb1
2019-03-05 14:07:20 -08:00
Rick Hanlon d48bd1759e Use codegen for Slider props + events
Summary: Use the codegen for the Slider component with the new `inferfaceOnly` option

Reviewed By: TheSavior

Differential Revision: D14295981

fbshipit-source-id: 0482572892fbcffada43c7c6fbf17e70546300b8
2019-03-05 11:53:56 -08:00
Rick Hanlon 9098bc7749 Remove activityindicator files
Summary: These were moved to the codgen

Reviewed By: TheSavior

Differential Revision: D14307470

fbshipit-source-id: 49030c245f11bd595bb97e1b2f34a7c454be5c56
2019-03-05 11:53:56 -08:00
Rick Hanlon f43703bdb5 Add #pragma once to Props.h generator
Summary: We need this in the Props.h files

Reviewed By: TheSavior

Differential Revision: D14307476

fbshipit-source-id: 34a86ced30e04bfb6d7f85dc292e43d2a1a0ac3e
2019-03-05 11:53:56 -08:00
Rick Hanlon f72776e8dc Add inferfaceOnly option to CodegenSchema
Summary: In some cases the implementation for native modules are more advanced and we cannot currently generate some of the files. We've decided in these cases to only generate the props + events for now, so this flag `interfaceOnly` will only generate those files 👍

Reviewed By: TheSavior

Differential Revision: D14295980

fbshipit-source-id: 1790825143206a84469015e08958bf6f00ffde52
2019-03-05 11:53:56 -08:00
zhongwuzw b7b8836a7f Implement the nativeID functionality in a more efficient way (#23662)
Summary:
Implement TODO, implement the nativeID functionality in a more efficient way instead of searching the whole view tree.

[iOS] [Fixed] - Implement the nativeID functionality in a more efficient way
Pull Request resolved: https://github.com/facebook/react-native/pull/23662

Differential Revision: D14323747

Pulled By: shergin

fbshipit-source-id: 3d45dbf53ad2b6adb79b4331600d53b51ede76d4
2019-03-05 09:41:19 -08:00
empyrical 50d095ce32 Fabric: Remove designated initializer in LayoutMetrics.h (#23758)
Summary:
This pull request removes the designated initializer in `LayoutMetrics.h`. This will help improve the portability of this file.

[General] [Changed] - Fabric: Remove designated initializer in LayoutMetrics.h
Pull Request resolved: https://github.com/facebook/react-native/pull/23758

Differential Revision: D14320526

Pulled By: shergin

fbshipit-source-id: 076ad389d0985d5213b521a2ffaca4ca7ae31599
2019-03-05 05:34:02 -08:00
Sunny Luo d2153fc58d Text: Implement textAlign justify for android O+ (#22477)
Summary:
Add textAlign justify for android O+(api level >=26)
Resolves https://github.com/facebook/react-native/issues/22475

<img src="https://user-images.githubusercontent.com/615282/49341207-35e3b980-f685-11e8-91ab-dbc19c1ee4d0.gif" width="400" />

Changelog:
----------
[Android] [Added] - Implement textAlign justify for android O+
Pull Request resolved: https://github.com/facebook/react-native/pull/22477

Differential Revision: D13512004

Pulled By: cpojer

fbshipit-source-id: e20f4976bfd957a5faeae0bbed2ff27c03023bb1
2019-03-05 00:35:08 -08:00
zhongwuzw af52693e9c Keep placeholder paragraph style same with single line text input (#23765)
Summary:
Keep placeholder paragraph style same with text input.

[iOS] [Fixed] - Keep placeholder paragraph style same with single line text input
Pull Request resolved: https://github.com/facebook/react-native/pull/23765

Differential Revision: D14321255

Pulled By: cpojer

fbshipit-source-id: 2b8cbb7f2c7ceb40a9a2b142065dd6f5eb3d62eb
2019-03-05 00:10:44 -08:00
zhongwuzw debd4462e0 Keep placeholder paragraph style same with text input (#23763)
Summary:
Keep placeholder paragraph style same with text input.

[iOS] [Fixed] - Keep placeholder paragraph style same with text input
Pull Request resolved: https://github.com/facebook/react-native/pull/23763

Differential Revision: D14320996

Pulled By: cpojer

fbshipit-source-id: 07c20722809395a74a48300fbb7cadebb8707b03
2019-03-04 23:09:55 -08:00
zhongwuzw 8491cc36dd Remove class check and make data constraint to NSData (#22633)
Summary:
We always use `NSData` to send, for the `NSString` support, we already transform to `NSData` before call `_sendFrameWithOpcode` method. So we can remove these class check.

Changelog:
----------
[iOS] [Changed] [RCTSRWebSocket] - Remove class check and make data parameter of `_sendFrameWithOpcode` constraint to `NSData`
Pull Request resolved: https://github.com/facebook/react-native/pull/22633

Differential Revision: D14320451

Pulled By: cpojer

fbshipit-source-id: 63ac194d08965d7518a8ac38eea77fd5b43b6147
2019-03-04 22:35:08 -08:00
Sharon Gong 1889b797d3 Create a cross-platform accessibility example module (#23722)
Summary:
This PR divides the accessibility tests into two activities-- a cross-platform activity for accessibility features which are expected to work on all platforms, and platform specific tests for Android and iOS.

We believe that most, if not all, accessibility features should be cross-platform, with fallback implementations where the underlying concept doesn't exist on a particular platform.

This division of the tests makes it clearer for developers which features are expected to work on all supported platforms, and which are platform-specific.

[CATEGORY] general, Android, iOS
[TYPE] change

Message

Refactor the RNTester accessibility activities to better represent where the features are expected to work. Moves all cross-platform tests to AccessibilityExample.js,  Android-specific tests to AccessibilityAndroidExample.android.js, and iOS-specific tests to AccessibilityIOsExample.ios.js.
Pull Request resolved: https://github.com/facebook/react-native/pull/23722

Differential Revision: D14320696

Pulled By: cpojer

fbshipit-source-id: b5ab7a82a90f06d55a24262e86bd69fbdc890427
2019-03-04 22:08:09 -08:00
zhongwuzw ba6f818d7d Fixed singleline text input placeholder size (#23745)
Summary:
After #23738 , we can add more text attributes to placeholder, so now, let's update the calculation of placeholder size based on placeholder attributes.

[iOS] [Fixed] - Fixed singleline text input placeholder size
Pull Request resolved: https://github.com/facebook/react-native/pull/23745

Differential Revision: D14320630

Pulled By: cpojer

fbshipit-source-id: 2d9e8b59ba70228202add762cfc9c6cbc77e5e95
2019-03-04 21:56:53 -08:00
zhongwuzw fd954cda55 Add lineHeight support of placeholder for multiline text input (#23760)
Summary:
After some refactor of text input attributes, we can now add style attributes  the same as text input's attributes, from https://github.com/facebook/react-native/issues/19002#issuecomment-467171589, user wants placeholder to support line-height , I think we can add it now for multiline text input.

[iOS] [Added] - Added lineHeight support of placeholder for multiline text input
Pull Request resolved: https://github.com/facebook/react-native/pull/23760

Differential Revision: D14320600

Pulled By: cpojer

fbshipit-source-id: ededeaa11560af089ca15ffc188e2e70db2ad7d4
2019-03-04 21:50:09 -08:00
zhongwuzw aa3b0d99f4 Fixed multiline text input placeholder size (#23742)
Summary:
After #23738 , we can add more text attributes to placeholder, so now, let's update the calculation of placeholder size based on placeholder attributes.

[iOS] [Fixed] - Fixed multiline text input placeholder size
Pull Request resolved: https://github.com/facebook/react-native/pull/23742

Differential Revision: D14320489

Pulled By: cpojer

fbshipit-source-id: 6b0f07fe7406d5c99c7280d584f8b8e51fc84c00
2019-03-04 21:30:05 -08:00
A C SREEDHAR REDDY cd18527e77 Fix breaking of PickerAndroid when child is null. (#23748)
Summary:
when conditional rendering is used then picker breaks when the child is null.

This conditional rendering inside Picker fails when a is 1, because child will be null in PickerAndroid.android.js.
```
{
   this.state.a === 2 && <Picker.Item label="value" value="value" />
}
```

[ANDROID] [FIXED] - When child is null it returns.
Pull Request resolved: https://github.com/facebook/react-native/pull/23748

Differential Revision: D14319140

Pulled By: cpojer

fbshipit-source-id: 07d48cd054a131e6984cfe3bdce7538ffbc50622
2019-03-04 18:44:30 -08:00
Héctor Ramos 8721ef0916 Kill Switch tests (#23753)
Summary:
This component is being extracted.

These are flaky and constantly fail on Circle.

[General] [Removed] - Removed Detox e2e Switch tests
Pull Request resolved: https://github.com/facebook/react-native/pull/23753

Differential Revision: D14319130

Pulled By: cpojer

fbshipit-source-id: d0ea276440e034afbb11aa31762922532ad06402
2019-03-04 18:38:50 -08:00
aleclarson dc893756b8 Properly validate JS->native method calls (#23658)
Summary:
Between invalidating a bridge and suspending its JS thread, native modules may have their methods called.

Only warn when a native module has been invalidated, which happens right before its JS thread is suspended.

Avoid initializing a native module's instance if its bridge is invalidated.

/cc fkgozali f945212447 (commitcomment-32467567)

[iOS] [Fixed] - Properly validate JS->native method calls
Pull Request resolved: https://github.com/facebook/react-native/pull/23658

Differential Revision: D14287594

Pulled By: fkgozali

fbshipit-source-id: 89dd1906a0c55f3f48ba4ff220aac0cddf2eb822
2019-03-04 17:39:53 -08:00
empyrical ddd5b25768 Fabric: Remove null coalescing operators in ShadowNode (#23438)
Summary:
This pull request removes the use of the GCC extension null coalescing operators (`?:`) and replaces them with ternary operators. This improves the portability of `ShadowNode.cpp` (and enables MSVC to build it)

[General] [Fixed] - Fabric: Removed null coalescing operators in `ShadowNode`
Pull Request resolved: https://github.com/facebook/react-native/pull/23438

Differential Revision: D14304958

Pulled By: shergin

fbshipit-source-id: 7d8e6778a72dabf09b1d99bc091a7578598b79c3
2019-03-04 14:47:28 -08:00
empyrical b30b10326e Fabric: Remove designated initializers in RootShadowNode (#23715)
Summary:
This pull request removes the designated initializers in `RootShadowNode.cpp`. This will help improve the portability of this file.

[General] [Fixed] - Removed designated initializers in `RootShadowNode`
Pull Request resolved: https://github.com/facebook/react-native/pull/23715

Differential Revision: D14305167

Pulled By: shergin

fbshipit-source-id: e394580f103fdb59cf078828b5d2ee6df6cc534d
2019-03-04 14:41:30 -08:00
empyrical 2ca8c94559 Fabric: Remove designated initializers in '/uimanager/' (#23717)
Summary:
This pull request removes the designated initializers under the `fabric/uimanager/` folder. This will help improve the portability of these files.

[General] [Fixed] - Removed designated initializers under the `fabric/uimanager/` folder
Pull Request resolved: https://github.com/facebook/react-native/pull/23717

Differential Revision: D14305203

Pulled By: shergin

fbshipit-source-id: 370911682e22cbb20c4bfd7382ed4da0ce1a598d
2019-03-04 12:58:59 -08:00
Amir Sharif d4300cb59b Update typing for YellowBox patterns
Summary: To satisfy Flow, we want to account for RegExp as a valid ignore pattern.

Reviewed By: TheSavior

Differential Revision: D14303072

fbshipit-source-id: 4988fff5c6c6a12da99027e47216cedcf5a4db5a
2019-03-04 12:18:38 -08:00
empyrical 2c0125995d Fabric: Remove designated initializers in ShadowNodeTest (#23714)
Summary:
This pull request removes the designated initializers in `ShadowNodeTest.cpp`. This will help improve the portability of this file.

[General] [Fixed] - Removed designated initializers in `ShadowNodeTest`
Pull Request resolved: https://github.com/facebook/react-native/pull/23714

Differential Revision: D14305162

Pulled By: shergin

fbshipit-source-id: 81803652ece734a9b223d7a8b462a8b62cde7d1d
2019-03-04 11:28:02 -08:00
empyrical 74870d71a6 Fabric: Remove designated initializers in ComponentDescriptorTest (#23713)
Summary:
This pull request removes the designated initializers in `ComponentDescriptorTest.cpp`. This will help improve the portability of this file.

[General] [Fixed] - Removed designated initializers in `ComponentDescriptorTest`
Pull Request resolved: https://github.com/facebook/react-native/pull/23713

Differential Revision: D14305123

Pulled By: shergin

fbshipit-source-id: 64cfc76dd7eaf74b4b4395bac18a9fc370a3b322
2019-03-04 11:13:37 -08:00
Valentin Shergin 56501dcc47 Fabric: Changing the shape of ShadowViewNodePair class
Summary:
I am not sure why it compiled before, it clearly should not, IMO. The `const` types (and references!) are not allowed inside `std::vector` because they are not assignable.
Some experiments that I did caused compilation errors here, so I am changing that to be actually correct.

Reviewed By: JoshuaGross

Differential Revision: D14249199

fbshipit-source-id: 07a22ef13f5de9dfc7ab307493419e6006994bc2
2019-03-04 10:00:01 -08:00
David Aurelio b9a7880434 Fix problems with GCC < v8
Summary:
@public

GCC up until v7 flags our way of reading edges in `YGNodeSetStyleInputs` as unused variables. I managed to work around that by rearranging the casts a bit.

Reviewed By: SidharthGuglani

Differential Revision: D14299439

fbshipit-source-id: eec0266185504d1b790b9ef574bd4a83c0059d3a
2019-03-04 02:37:34 -08:00
David Aurelio fb329fbf86 Encapsulate all used java classes
Summary:
@public

Moves all Java classes used from C++ to their own header + implementation file. In `YGJNI.cpp`, we only call methods on these objects deriving from `jni::JavaClass`.

This is only a bit of cleanup, no functional change.

Reviewed By: SidharthGuglani

Differential Revision: D14261043

fbshipit-source-id: 2db1d81cb7f56a4cdc24b182b2166e1d7e24ba3c
2019-03-04 01:30:49 -08:00
empyrical 9e3a1f0e70 Fabric: Remove designated initializers in View (#23440)
Summary:
This pull request removes the designated initializers in `react/components/view/**` to improve portability.

[General] [Changed] - Fabric: Remove designated initializers in View
Pull Request resolved: https://github.com/facebook/react-native/pull/23440

Differential Revision: D14298887

Pulled By: shergin

fbshipit-source-id: 074a038cdacd448911b39441d84e341a56b666cf
2019-03-03 22:43:11 -08:00
empyrical 4936a663ae Fabric: Remove designated initializers in Image (#23439)
Summary:
This pull request removes the designated initializers in `react/components/image/**` to improve portability.

[General] [Changed] - Fabric: Remove designated initializers in Image
Pull Request resolved: https://github.com/facebook/react-native/pull/23439

Differential Revision: D14298888

Pulled By: shergin

fbshipit-source-id: 9b6ad5fdcec4d3b19b8d69afac80ce18d37f31e6
2019-03-03 22:38:11 -08:00
empyrical cf2a289372 Fabric: Remove designated initializers in Events and Mounting (#23441)
Summary:
This pull request removes the designated initializers in `react/mounting/**` and `react/events/**` to improve portability.

A destructor was also defined for `ShadowView` to fix this error:

```
ShadowViewMutation.cpp:14: error: undefined reference to 'facebook::react::ShadowView::~ShadowView()'
ShadowViewMutation.cpp:24: error: undefined reference to 'facebook::react::ShadowView::~ShadowView()'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
```

[General] [Changed] - Fabric: Remove designated initializers in Events and Mounting
Pull Request resolved: https://github.com/facebook/react-native/pull/23441

Differential Revision: D14298890

Pulled By: shergin

fbshipit-source-id: f5d8fc6e1f5968b94e8bb3ca0c3f0e81cf892f83
2019-03-03 22:32:37 -08:00
Bartol Karuza a2f11cb01f Add warning that CameraRoll has been moved to RNC (#23733)
Summary:
Adds a moved warning to the CameraRoll import directing people to the react-native-community/cameraroll package.

[Lean Core] [Warning] add warning that CameraRoll has been moved to RNC
Pull Request resolved: https://github.com/facebook/react-native/pull/23733

Differential Revision: D14298485

Pulled By: cpojer

fbshipit-source-id: cf03660c604a7337f234da107d7069c0ccf99f36
2019-03-03 21:07:20 -08:00
zhongwuzw 17ae61e14c Fixed method invoke when both nullable and __unused exist (#23726)
Summary:
We have parse code to try to support exported method parameter annotated `__unused` and `nullable`, but actually, seems we don't support it entirely, for example, we parse `__unused` firstly, then we parse `nullable`, actually, this case not exist, because `nullable` macro must appear right after `(`, before `__unused`, so we can't parse success, leads to error signature and crash.

[iOS] [Fixed] - Fixed method invoke when both nullable and __unused exist
Pull Request resolved: https://github.com/facebook/react-native/pull/23726

Differential Revision: D14298563

Pulled By: cpojer

fbshipit-source-id: 934e1d384a5d67b7bbf117fd2dec51f50979c979
2019-03-03 20:45:06 -08:00
michalchudziak 1ed2b82693 Rename eslint config to 'eslint-config-react-native-community' (#23718)
Summary:
Renamed `eslint-config-react-native` to `eslint-config-react-native-community`, due to the fact, that initial name is already taken on `npm`. Additionally, I added very simple `README.md` file, to prepare the package to be published.

[General] [Changed] - Changed `eslint-config-react-native` name to `eslint-config-react-native-community`
Pull Request resolved: https://github.com/facebook/react-native/pull/23718

Differential Revision: D14298553

Pulled By: cpojer

fbshipit-source-id: bad5a42502ccdebf5f95d8217187be23bbf8f26c
2019-03-03 20:39:43 -08:00
Vojtech Novak 929908f287 make sure to check array bounds in VirtualizedSectionList (#23710)
Summary:
SectionList accesses items outside of the array bounds.

This was discovered when using mobx, which warns you: `[mobx.array] Attempt to read an array index (${index}) that is out of bounds`. This is because `section.data[itemIndex + 1]` goes beyond array length.

This PR adds an array length check and simplifies the code a bit to avoid repetitive `this.props.`
Pull Request resolved: https://github.com/facebook/react-native/pull/23710

Differential Revision: D14298557

Pulled By: cpojer

fbshipit-source-id: fee3422ad5b053d91a097c5842f46e78a149c3d5
2019-03-03 20:34:37 -08:00
zhongwuzw 7025cce3f4 Fixed crash if event doesn't have body parameter (#23711)
Summary:
We need to check `body[@"target"]` wether equal to `nil`, if it is, return to prevent crash.

[iOS] [Fixed] - Fixed crash if event doesn't have body parameter
Pull Request resolved: https://github.com/facebook/react-native/pull/23711

Differential Revision: D14298543

Pulled By: cpojer

fbshipit-source-id: d5e8cd69438f323ae102e61618c0371a01bee347
2019-03-03 20:29:58 -08:00
Ryan Stelly ced155327e chore: update comment in DrawerLayoutAndroid (#23730)
Summary:
...referencing stale function component limitations

While preparing a short tutorial on the DrawerLayoutAndroid using the v59 RC, I came across a comment that we can update that states refs as being available only in Class components. This updates that with both class and function components.

If we'd rather delete the comment entirely and move both examples to the website, I'm fine with that too. The current docs page doesn't address the imperative API. https://facebook.github.io/react-native/docs/drawerlayoutandroid

[General] [fixed] - Update stale comment to provide both class and functional component ref example for DrawerLayoutAndroid
Pull Request resolved: https://github.com/facebook/react-native/pull/23730

Differential Revision: D14298527

Pulled By: cpojer

fbshipit-source-id: 3e9f0d6ae49588045fd9d924996fe7cff3d6a156
2019-03-03 20:16:44 -08:00
zhongwuzw d8d42c7310 Added support of __nullable and __nonnull for module exported method signature (#23731)
Summary:
For the `NullabilityPostfix`, we can use `_Nullable` or `__nullable`. Please see https://developer.apple.com/swift/blog/?id=25 , and we also use it in our code.

[iOS] [Added] - Added support of __nullable and __nonnull for module exported method signature
Pull Request resolved: https://github.com/facebook/react-native/pull/23731

Differential Revision: D14298483

Pulled By: cpojer

fbshipit-source-id: 4dd3188f51be3808ea2b97ce19aa7a85ea1f4a9e
2019-03-03 20:06:21 -08:00
zhongwuzw 65c014d19f Keep placeholder attributes sync with text input text's attributes (#23738)
Summary:
We need to keep placeholder attributes sync with text input's text attributes, like `font`,`kern` ....., to keep style the same.

Also fixes #19002 .

[iOS] [Fixed] - Keep placeholder attributes sync with text input text's attributes
Pull Request resolved: https://github.com/facebook/react-native/pull/23738

Differential Revision: D14298482

Pulled By: cpojer

fbshipit-source-id: 3555091bf3bc01e4b026d5a4cdbe93b4122106e8
2019-03-03 19:59:57 -08:00