Commit Graph

14355 Commits

Author SHA1 Message Date
Simon Jensen 966bb63a80 make Object.assign polyfill conditional and spec compliant
Summary: Replace the non-compliant `Object.assign` with a spec compliant version from Mozilla. Since its spec compliant we can apply conditionally only when a native version is not available.

Reviewed By: yungsters

Differential Revision: D8896359

fbshipit-source-id: 4999fe3094eba2206293bbe28760a4e46cbee6aa
2018-08-23 14:02:10 -07:00
Eli White 1329d18c6a Require that JS defined Component Attributes match Native ones in dev
Summary: As we move these configs to JS from native, until we have codegen that ensures everything stays up to date, this adds a dev mode check to ensure they are consistent.

Reviewed By: yungsters

Differential Revision: D9475011

fbshipit-source-id: 9d6f7b6c649229cae569d840eda3d5f7b7aa7cb2
2018-08-23 13:01:41 -07:00
gengjiawen e2f2e41f09 refine android config (#20731)
Summary:
By this change we can unify version early, like we can make kotlin version share in buildscript and app dependency the same time ([butterknife](https://github.com/JakeWharton/butterknife/blob/master/build.gradle) use the same).
pass all current ci and one of my project https://github.com/gengjiawen/ReactNative64bitDemo.
none
 [GENERAL] [ANDROID] [TEMPLATE] - refine android config
Pull Request resolved: https://github.com/facebook/react-native/pull/20731

Differential Revision: D9482954

Pulled By: hramos

fbshipit-source-id: d864adbdbc624bc311ccc5f44a15d0334d2d8a59
2018-08-23 12:17:57 -07:00
Vladimir Timofeev 3949e937cc Make SafeAreaView to work on iOS < 11 (#18534)
Summary:
Currently `SafeAreaView` works only on iOS 11, because implemented in terms of native safeArea API, that not exists in older iOS versions. But this make it hard to use the component in real applications, because content will be under top bars on older versions of iOS and no reliable way to workaround this in js. More motivation in #17638

This changeset emulate safe area in terms of `UIViewController` layout guides API if safeArea not available.

Fixes #17638, #18255

I run RNTester with these simulators: iPhone6 (9.3), iPhone6 (10.0), iPhone6 (11.2), iPhoneX (11.2)
- Start RNTester application
- Look on top header, it should not overlap status bar
- Go to the `<SafeAreaView>` example, open modal
- Modal area should not overlap status bar

<img src="http://vovkasm.skitch.vovkasm.org/iPhone6_10_20662C5B.png" width="40%"> <img src="http://vovkasm.skitch.vovkasm.org/iPhone6_11_20662CC8.png" width="40%">

<img src="http://vovkasm.skitch.vovkasm.org/iPhone6_10_pr_20662DE6.png" width="40%"> <img src="http://vovkasm.skitch.vovkasm.org/iPhone6_11_pr_20662DA8.png" width="40%">

[IOS] [BUGFIX] [SafeAreaView] - Make SafeAreaView to work on iOS < 11
Pull Request resolved: https://github.com/facebook/react-native/pull/18534

Reviewed By: PeteTheHeat, shergin

Differential Revision: D9166052

Pulled By: hramos

fbshipit-source-id: c086e1ae4af13110a7453b770ca75b6e0d5321ea
2018-08-23 12:02:35 -07:00
Eli White 97472892d7 Back out "[react-native][PR] Make Flow and PropType types checks consistent for view style props."
Summary: Reverting due to problems with prepack.

Reviewed By: gaearon

Differential Revision: D9482931

fbshipit-source-id: 0ec5d0fb80dab32a07521a465dd2a501e6bb4d30
2018-08-23 11:34:26 -07:00
Héctor Ramos 0bad11b610 Bump iOS min in Readme (#20805)
Summary:
iOS 8 was dropped as of 0.56.
Pull Request resolved: https://github.com/facebook/react-native/pull/20805

Differential Revision: D9481968

Pulled By: hramos

fbshipit-source-id: 23e74ac3145ba92e2c119be365f2435e290c3f61
2018-08-23 10:47:30 -07:00
Tim Yung 055c941c40 A11Y: Leverage New `AccessibilityProps` Props
Summary: Adds new accessibility props more widely.

Reviewed By: TheSavior

Differential Revision: D9466018

fbshipit-source-id: 63ce58f725c7fd924d979d821037011d83c0334e
2018-08-23 00:18:47 -07:00
Héctor Ramos aae3a7816e Use one time password when publishing to npm (#20701)
Summary:
This pull request addresses the failing publish-npm.js script from earlier this week. For background, last month we reset all npm access tokens for any package related to Facebook, and we now require all accounts with publish permissions to have two factor enabled.

The publish-npm.js script relied on one such token that is configured in Circle CI as a envvar. The token has been updated in Circle CI, but we now need a way of passing the one time password to npm.

With this PR, we can now grab the otp from Circle CI's envvars. Considering otps are ephemeral, this requires the NPM_CONFIG_OTP envvar to be set by someone with publishing permissions anytime a new release will be pushed to npm. The token is short lived, but it would still be good to clear the envvar after the package is published. Circle CI envvars are not passed on to PR/forked builds.

This PR is effectively a breaking change for the release process, as the publish step will not succeed if the OTP is not valid.

OTPs are short-lived, and the publish_npm_package job will definitely outlive the token. Unfortunately this will require some timing to get right, but the alternative is to ssh into the Circle CI machine and re-run the `npm publish --otp` command, which again would still require someone with publish access to provide the otp.
Pull Request resolved: https://github.com/facebook/react-native/pull/20701

Differential Revision: D9478488

Pulled By: hramos

fbshipit-source-id: 6af631a9cb425271b98c03d158aec390ebc95304
2018-08-22 23:32:27 -07:00
Caleb (Rojuinex) Bartholomew 8103c431c8 Removing development team from Xcode project. (#20054)
Summary:
Fixes #16881

Removing development team from Xcode project.
Pull Request resolved: https://github.com/facebook/react-native/pull/20054

Differential Revision: D9440144

Pulled By: hramos

fbshipit-source-id: 5cb4cf24c5f7562632006f0d0143f762fed04295
2018-08-22 23:19:43 -07:00
gengjiawen 6e356895e7 bump android gradle to 3.1.4 (#20767)
Summary:
Bump android gradle plugin to 3.1.4. We have been stay to 2.x too long. With 3.x we can have instant run and great performance and new features brought by google.

Also thanks to CFKevinRef great pr to make this possible.
pass all current ci. I have also tested RNTester release version works without crash.
https://github.com/facebook/react-native/pull/17967.
 [GENERAL] [ANDROID] [FEATURE] - bump android gradle to 3.1.4
Pull Request resolved: https://github.com/facebook/react-native/pull/20767

Differential Revision: D9437576

Pulled By: hramos

fbshipit-source-id: 6084056a1390582a75a879918f2538b0480f6299
2018-08-22 23:19:42 -07:00
Dulmandakh 044b399e65 Bump compileSdkVersion to 27 and buildToolsVersion to 27.0.3 (#20777)
Summary:
I found that android support library 27.x (874cca1ac2) requires compileSdkVersion to be 27. Also found that many FB projects use SDK 27.
Pull Request resolved: https://github.com/facebook/react-native/pull/20777

Differential Revision: D9478431

Pulled By: hramos

fbshipit-source-id: ca100f6b5b39e7d112926124423f9510a0efc291
2018-08-22 23:19:42 -07:00
Michael Crook e3165c6506 added extra sinopia config to support packages (#20789)
Summary:
[DOCS] [BUGFIX] [react-native-cli/README.md] - fixed sinopia configuration docs

now that babel uses scoped packages the extra sinpoia config also
requires the rule to cover ** which will satisfy such repositories like
babel/core

The only other issue I had with getting started using this doc was node-gyp being an absolute horror to get running (a dependancy of sinpoia) I don't really know if writing debugging tips/links for macos in these docs is relevant.
Pull Request resolved: https://github.com/facebook/react-native/pull/20789

Differential Revision: D9468340

Pulled By: hramos

fbshipit-source-id: c7a41f384655b36e5e46b39d1e7e14313cab9f68
2018-08-22 23:19:42 -07:00
Sergei Dryganets 79fe925f1d Android. OkHttp crash fixed on upload re-try. (#20802)
Summary:
This change fixes this issue:
https://github.com/facebook/react-native/issues/10423
Pull Request resolved: https://github.com/facebook/react-native/pull/20802

Differential Revision: D9478422

Pulled By: hramos

fbshipit-source-id: ce3a098a71c8f50a62b011a2a277004ab7a7b655
2018-08-22 23:04:56 -07:00
Héctor Ramos 43cd6f7579 Update lock file for open source (#20800)
Summary:
Should fix CI failure.
Pull Request resolved: https://github.com/facebook/react-native/pull/20800

Differential Revision: D9470366

Pulled By: hramos

fbshipit-source-id: 7269876be14f9260cc984ab0737a2e32218f4715
2018-08-22 23:04:56 -07:00
Elias Toivanen e61176d650 Bugfix: Check NodeJS version successfully even for old runtimes (Fixes #20769) (#20779)
Summary:
Fixes #20769

Release notes
--------------
[CLI] [BUGFIX] [local-cli/server/checkNodeVersion.js] - Disable auto-formatting in `local-cli/server/checkNodeVersion.js` since it introduces ES6 and ES7 syntax (trailing comma in argument list) which in turn makes ES5 engines crash with a `SyntaxError`.
Pull Request resolved: https://github.com/facebook/react-native/pull/20779

Differential Revision: D9468346

Pulled By: hramos

fbshipit-source-id: 24761a377a5fd104e11ed6b6e86da15e96a0e38b
2018-08-22 20:34:41 -07:00
Rafael Oleza 9a77ff593b Fix default projectRoot + watchFolders computation
Summary:
@public

This diff fixes the `projectRoot` calculation on React Native when the app does not have a config file. This should fix the issues reported in https://github.com/facebook/react-native/issues/20712

Reviewed By: hramos

Differential Revision: D9444982

fbshipit-source-id: 4cb41fa5224d2addf92976cc119e49dea6a6346b
2018-08-22 20:34:39 -07:00
Eli White b620ccab49 Deprecate View prop-type definitions
Summary: This diff moves the prop-type definitions for View out into it's own file. We will be able to do this with a bunch of the prop-type definitions and then move them out into a deprecated npm package.

Reviewed By: yungsters

Differential Revision: D9444394

fbshipit-source-id: 4fd0a78533211b598ba2da4eb5015ffcc20bb675
2018-08-22 18:31:36 -07:00
Tim Yung 3aea678c38 RN: Reduce ForwardRef(View) Noise in Systrace
Summary: When running a trace, reduce the noise from the `__DEV__`-only `ForwardRef(View)` elements.

Reviewed By: ejanzer

Differential Revision: D9445865

fbshipit-source-id: 7cfe87bab6dd62d3800d2ca239724b5063c55c89
2018-08-22 17:49:32 -07:00
Emily Janzer bce77c8b3b Convert ReactMarkerConstants enum to consts
Summary: Converting ReactMarkerConstants enum to consts + stringdef annotation

Reviewed By: mdvacca

Differential Revision: D9304307

fbshipit-source-id: db9d170e80593131bd4ebd6937d2f6ce6e694e4e
2018-08-22 14:02:56 -07:00
Kohei TAKATA 88be0cefac Fix eslint errors and warnings in preprocessor.js
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/20632

Differential Revision: D9367291

Pulled By: hramos

fbshipit-source-id: bdb823db132dcbb07ad02389a3246e5314de2b17
2018-08-22 13:48:53 -07:00
Janic Duplessis 123dac252a Allow animating the elevation style (#20739)
Summary:
Elevation should be supported by the native driver as it's a non-layout prop.
Pull Request resolved: https://github.com/facebook/react-native/pull/20739

Differential Revision: D9468318

Pulled By: hramos

fbshipit-source-id: f8b8ca7536968ab8f6229c134fd169c321ccc651
2018-08-22 13:48:53 -07:00
Dulmandakh 7ff9352a88 Remove TextLayoutBuilder from ReactAndroid dependency (#20600)
Summary:
This PR removes TextLayoutBuilder, which is not used anywhere.
Pull Request resolved: https://github.com/facebook/react-native/pull/20600

Reviewed By: achen1

Differential Revision: D9367345

Pulled By: hramos

fbshipit-source-id: 407a6a80f5c69650fcc7167b28214f7315beed2f
2018-08-22 13:48:53 -07:00
Eli White f5be89b8b9 Require all Android View Attributes are defined in flow prop types
Summary: This caught a few flow types that weren't defined for attributes that Android exposes. Ensuring that these stay in sync will be necessary for codegen in the future.

Reviewed By: sahrens

Differential Revision: D9444165

fbshipit-source-id: 8ee00af7b732c35d7f6befcdf79f77b73eac6a1b
2018-08-22 13:03:15 -07:00
Eli White 158e9c4dde Adding a more complete type for ReactNativeBaseComponentViewConfig
Summary:
As we add js view configs to our view managers, we want this type to be a little bit more strict.

This will be especially useful as we start removing certain keys (like NativeProps) which aren't actually necessary, this will make sure we remove them everywhere.

Reviewed By: yungsters

Differential Revision: D9416905

fbshipit-source-id: 6b12e38b9d56969a81ec5d4f2920298e4919f7be
2018-08-22 13:03:15 -07:00
Eli White d0eb8ff858 Put View ViewConfig in JS
Summary: Moving this config to native for android so we skip the native lookup for the config.

Reviewed By: yungsters

Differential Revision: D9415726

fbshipit-source-id: 84cac3f0dfa4f6ea8800de77676f1e2896ee463d
2018-08-22 13:03:15 -07:00
Alexander Perepelitsyn 2b6599e9c8 Make Flow and PropType types checks consistent for view style props. (#20773)
Summary:
Description:
------------
While creating a custom component I added a prop `style: ?ViewStyleProp`. When I tried to pass the following object
```
style={{
  opacity: new Animated.Value(0),
}}
```
to this `style` prop I received a yellow box with the warning:
```
Warning: Failed prop type: Invalid prop `opacity` of type `object` supplied to `MyComponent`, expected `number`.
```

Then I browsed through the source code and found an inconsistency in types checks. Namely,
https://github.com/facebook/react-native/blob/master/Libraries/StyleSheet/StyleSheetTypes.js#L158 has the following declaration `opacity?: number | AnimatedNode`, whereas https://github.com/facebook/react-native/blob/master/Libraries/Components/View/ViewStylePropTypes.js#L50 is willing to accept **only** a `number`: `opacity: ReactPropTypes.number`.
Pull Request resolved: https://github.com/facebook/react-native/pull/20773

Differential Revision: D9464634

Pulled By: TheSavior

fbshipit-source-id: fa21f706cb890dbeec136f1c4fab468904cd284b
2018-08-22 12:31:20 -07:00
Nick Graef b4a8630ea5 ignore babelrc in git-upgrade (#20790)
Summary:
Per [this comment on the issue](https://github.com/facebook/react-native/issues/20710#issuecomment-414631827):

> Babel by default tries to find .babelrc files to configure itself, and once it finds the one from the RN app (which links to the RN preset that only works on Babel 7) it fails.
> The easiest patch to fix this issue is to add babelrc: false to the babel-register method, so Babel does not read any additional .babelrc file.

Fixes #20710
Pull Request resolved: https://github.com/facebook/react-native/pull/20790

Differential Revision: D9458502

Pulled By: hramos

fbshipit-source-id: 3a0ed7261322fdd9e0c0840f8a3944974f38b233
2018-08-22 12:31:19 -07:00
Rafael Oleza 8a21abcd6b Prevent cross origin requests to development server
Summary:
This diff adds a middleware to the RN development server to prevent processing requests coming from a third-party website.

The way we choose to do it is to block any request that has an origin header and it's different than localhost. This will still allow simulators to work properly while blocking potential external websites to do malign CORS requests.

This is just a first quick measure to block a potential attack vector while we implement full authentication in the RN development server

Reviewed By: mjesun

Differential Revision: D9238674

fbshipit-source-id: b7bdc40dabc2f4d92f5ac84515f93b89efa4e833
2018-08-22 12:31:19 -07:00
Héctor Ramos 6af3b161c0 Run failing tests in CI, without turning CI red (#20775)
Summary:
We have several disabled tests in Circle, and they are not running at all.
This prevents us from seeing when a disabled test might actually be fixed, as enabling the test requires uncommenting the correct line in Circle CI's config.

In this PR, we use the existing swallow_error script to run known-failing steps, without failing the job. This will let us see the step's output in CI, without polluting PRs that have not introduced new failures to CI.
Pull Request resolved: https://github.com/facebook/react-native/pull/20775

Differential Revision: D9442412

Pulled By: hramos

fbshipit-source-id: 83c930811a559fdcf6d7b926b4073343e862d2b3
2018-08-22 12:31:19 -07:00
Pritesh Nandgaonkar d85226f539 Solve the bug related to baseline height
Summary:
This diff fixes the height calculation logic for the nodes with baseline. Before height calculation for baseline was done at wrong place.

The task was created due to the regression caused by D9219678.

Reviewed By: IanChilds

Differential Revision: D9421551

fbshipit-source-id: 3fbb738314130b346c4186ec45d00c9ea63bc9f4
2018-08-22 12:31:19 -07:00
Dulmandakh f884a1be69 use latest infer-annotations from maven (#20599)
Summary:
This PR removes infer-annotation from the repo and uses latest version of it from maven.
Pull Request resolved: https://github.com/facebook/react-native/pull/20599

Differential Revision: D9437594

Pulled By: hramos

fbshipit-source-id: 93c33041dd8a61b220c352fb187a23bb2dd1b4db
2018-08-22 12:31:19 -07:00
Andrew Chen (Eng) 833954a669 Append LayoutUpdateListener to UIViewOperationQueue
Summary:
There are multiple UI thread passes during the layout process. The first is with all of the operations from React (createView, manageChildren, etc). The second is during onCollectExtraUpdates after the layout pass, when things like Text need to be precomputed before later being sent over to the views.

The onLayoutUpdateListener needs to run AFTER onCollectExtraUpdates operations are executed, so this is now queued up in the UIViewOperationQueue

Reviewed By: mdvacca

Differential Revision: D9416260

fbshipit-source-id: d1a4eaf38a4f6c82d41def34ffb94d303e8f50d4
2018-08-22 12:31:18 -07:00
Héctor Ramos f7a11fcd97
Merge pull request #20796 from hramos/yarn-lock
[ShipIt Sync] Add Yarn lockfile
2018-08-22 12:23:05 -07:00
Hector Ramos 06ab76a6b2
Add Yarn lockfile 2018-08-22 12:20:56 -07:00
Keaton Greve 9c1ea45d38 Generate ip.txt before SKIP_BUNDLING check (#20554)
Summary:
Fixes #20553.

Re-applies the change as described in https://github.com/facebook/react-native/pull/16533, which was closed for being stale. Thanks to emusgrave for the original PR/change.
Pull Request resolved: https://github.com/facebook/react-native/pull/20554

Differential Revision: D9414933

Pulled By: hramos

fbshipit-source-id: 8ebca57e32b905c4ecfd661524ca415f51162545
2018-08-20 18:32:04 -07:00
Dulmandakh 874cca1ac2 Bump Android Support Library to 27.1.1 (#20586)
Summary:
This PR bumps Android Support Library version to 27.1.1.

FYI, originally was a part of https://github.com/facebook/react-native/pull/20026.
Pull Request resolved: https://github.com/facebook/react-native/pull/20586

Differential Revision: D9414901

Pulled By: hramos

fbshipit-source-id: 580338e62a924c214accc5d944f17c81ad9e3f9f
2018-08-20 18:08:52 -07:00
Héctor Ramos 91bba30312 WIP: Add Node 10 job to workflow
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/19299

Differential Revision: D9413583

Pulled By: hramos

fbshipit-source-id: 61ac48e46feaba5f1ec80362b5e1c7f2787ee167
2018-08-20 17:48:14 -07:00
EUROPE\laprosek 1658a4c080 Implement Image.queryCache on iOS (#18782)
Summary:
The API was available only on Android (with no mention to that effect in the docs, AFAICT).
This commit adds a simple iOS implementation based on NSURLCache. It should be possible to
query the decoded image cache as well to provide higher fidelity (i.e. "disk", "memory",
"decoded") if the caller passes size, scale, etc. in addition to the image URL, but it's
probably not worth the complexity. The assumption is that callers are interested in the
durability rather than performance aspect of the returned information.

Tested with RNTester on iPhone emulator.

[IOS] [ENHANCEMENT] [Image] - Implemented queryCache
Pull Request resolved: https://github.com/facebook/react-native/pull/18782

Differential Revision: D9411533

Pulled By: hramos

fbshipit-source-id: b430263959bb5f9b8ed9e28bb0a95f8879df881a
2018-08-20 16:17:18 -07:00
jamsch d846696f49 Add missing "--terminal" argument to run-android (#20584)
Summary:
Commit 79e498b7fb claims that "--terminal" has been added as an argument to the "run-android" script which it hasn't. Instead it adds a new environment variable "process.env.REACT_TERMINAL" which seems to be undocumented and nowhere else in the repository.

This commit now allows Linux and OSX users to specify their custom terminal :

    react-native run-android --terminal=x-terminal-emulator

Additionally the metro bundler child process "detached" option has been set to false if no terminal has been specified on Linux which fixes an issue where the packager would be running in the background and would have to manually be closed by finding the process.

Fixes #18122
Pull Request resolved: https://github.com/facebook/react-native/pull/20584

Differential Revision: D9234990

Pulled By: hramos

fbshipit-source-id: 60e4cc57b2790c419d5a4f9027add04313ddf6f8
2018-08-20 15:02:42 -07:00
janczer 24c0dc3013 Add to PixelRation documentation information about iPhone SE and iPho… (#20695)
Summary:
Release Notes:
--------------

[DOCS] [BUGFIX][PixelRatio.js] - Add information about iPhone SE and iPhone X
Pull Request resolved: https://github.com/facebook/react-native/pull/20695

Differential Revision: D9408433

Pulled By: hramos

fbshipit-source-id: 917390e30801ce353fd999b375c788bd38568a05
2018-08-20 14:48:40 -07:00
Héctor Ramos 8e95f72ea5 Disable Podspec tests
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/20755

Differential Revision: D9408317

Pulled By: hramos

fbshipit-source-id: 7799cf8ee4c99662299ef9cf1a26913cdf0d8b39
2018-08-20 14:48:40 -07:00
Tim Yung 322d0e00e2 Animated: Create Components Lazily
Summary: Changes `Animated` so that the convenience components are lazily initialized.

Reviewed By: TheSavior

Differential Revision: D9394785

fbshipit-source-id: 1a2c9a9af500c02d6c91ccb5ddff341c94b17bd1
2018-08-20 14:17:02 -07:00
Haseeb Saeed 139559fc07 Fix accessibility role crash
Summary: We were using a locale-specific `toUpperCase()` for accessibility roles. In the Turkish locale, `"image".toUpperCase()` does not become `"IMAGE"`; it becomes some weird turkish alphabet word, and we throw an error. This diff uses US-locale to avoid the error.

Reviewed By: YaoPersonal

Differential Revision: D9402330

fbshipit-source-id: a3fd7c54eec4b313c7e9df9236adb7ae42854ed8
2018-08-20 12:17:59 -07:00
Eric Rozell 7062e5bdb5 Apply `--reset-cache` argument to `bundle` command (#20706)
Summary:
The `--reset-cache` argument was not working correctly with the `bundle` command. This ensures the `--reset-cache` arg is passed to metro.

Fixes #20703

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/20706

Differential Revision: D9400548

Pulled By: hramos

fbshipit-source-id: 2c7ed0226cfcdffa8cc77506500c314552baef3f
2018-08-20 10:02:58 -07:00
gengjiawen a84785cc34 Fixes #20712 on unix-like OS (#20751)
Summary:
add `packager.sh` for run-android task for unix like system. This only fix on linux and macOS.
pass all current ci.
none
 [GENERAL] [BUGFIX] [CLI] - add `packager.sh` back for run-android task
Pull Request resolved: https://github.com/facebook/react-native/pull/20751

Differential Revision: D9398197

Pulled By: hramos

fbshipit-source-id: 213b066c0c034136c5ad5bbf8d45c6f331b1d185
2018-08-20 07:32:01 -07:00
Pritesh Nandgaonkar 5be1726d28 Solve width bug when the size is less than min
Summary:
This diff updates the logic which reassigns `remainingFreeSpace` when the node's calculated dimension falls below min width of the node.

So we will have to update the `remainingFreeSpace` as there is more available space since the calculated nodes width is less than the min width.

I have also added comments at relevant places in the code so that it is clearer.

This diff solves the issue raised in litho support grp. The details can be found here T32199608. This diff also makes sure that it doesn't break fblite, as the earlier version broke it, details of which can be found here T32881750.

Reviewed By: IanChilds

Differential Revision: D9359026

fbshipit-source-id: 4168e385e962c168a9de9370220c75f14a6726a7
2018-08-20 06:20:52 -07:00
Panagiotis Vekris d4870babe6 v0.79.1 in xplat/js
Summary: The controller you requested could not be found.

Reviewed By: gabelevi

Differential Revision: D9390604

fbshipit-source-id: 68ba89ba197f74322e4c85c3bfc1f334fb740852
2018-08-18 22:19:34 -07:00
Jeff Thomas 5c160e5ded Way to register RCT_MODULE in Plugin2.0 instead of +load
Summary:
[RFC] WIP: Way to register RCT_MODULE in Plugin2.0 instead of +load

This seemed like the simplest way to do this to register in the existing
didNotFindModule callback so that we don't have to touch any opensource code.

NOTE: The new version of this fixes the problems with dylibs, but not the -ObjC flag removal. This seems like the right call to avoid users having to implement c-functions to return their classes; instead we used objc_getClass.

Reviewed By: dshahidehpour

Differential Revision: D9112719

fbshipit-source-id: cf8df97d7c443cafa0e06a1e61bdf2612944ed87
2018-08-18 10:01:57 -07:00
Eric Rozell c5297c75cb Do not override `metro.config.js` settings (#20705)
Summary:
React Native overrides the `metro.config.js` settings for, e.g., `hasteImplModulePath`, which prevents us from adding a `metro.config.js` file to the repo for `react-native-windows` to allow us to resolve Haste modules at the top-level of the repo. This change ensures that if a user has a `metro.config.js` file, those settings are not overwritten by React Native.
Pull Request resolved: https://github.com/facebook/react-native/pull/20705

Differential Revision: D9390146

Pulled By: hramos

fbshipit-source-id: 5ccc137490410ace72d7b0e68f2bafcbb233c59f
2018-08-18 05:31:41 -07:00
Tim Yung 735be8b24d RN: Support Cached Bundles in Systrace
Summary:
When running Systrace, we currently only surface the JavaScript bundle that is pre-packaged in the binary.

This changes `ReactInstanceManager` so that we prefer a cached bundle if one exists. This allows running Systrace with local changes (as long as you load them into the client before running Systrace).

Differential Revision: D9389704

fbshipit-source-id: 031321b2e07539efc7f47a7c6947ab7b82dc7dfc
2018-08-17 23:16:46 -07:00