Skip to content
Permalink
Branch: master
Commits on Apr 15, 2019
  1. Add support for cancelling fetch requests with AbortController (#24419)

    janicduplessis authored and facebook-github-bot committed Apr 15, 2019
    Summary:
    This adds https://github.com/mysticatea/abort-controller to polyfill [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). This is used to cancel requests when using `fetch`.
    
    This also updates `event-target-shim` to 5.0 to make sure we only have one version of this dependency. This updates required adding a polyfill for `console.assert` which is used by the new version. I made one based on https://github.com/gskinner/console-polyfill/blob/master/console.js#L74.
    
    The polyfill is very small, especially since we already use `event-target-shim` so I think it makes sense to include in core.
    
    Depends on #24418 so that the fetch polyfill supports the `signal` parameter.
    
    Fixes #18115
    
    [General] [Added] - Add support for cancelling fetch requests with AbortController
    Pull Request resolved: #24419
    
    Differential Revision: D14912858
    
    Pulled By: cpojer
    
    fbshipit-source-id: 8a6402910398db51e2f3e3262f07aabdf68fcf72
Commits on Mar 27, 2019
  1. BREAKING - RCTEvent improvements, remove deprecated [sendInputEventWi…

    janicduplessis authored and facebook-github-bot committed Mar 27, 2019
    …thName:body:] (#15894)
    
    Summary:
    This makes the RCTEvent protocol more generic to make it easier to use the event coalescing feature for type of events other than components. This does a few other improvements that will be useful in follow up PRs.
    
    - Add `RCTComponentEvent` which is used instead of deprecated `[sendInputEventWithName:body:]` and remove that method completely (was only used at 2 places).
    - Make `coalescingKey` optional for events that return NO from `canCoalesce`.
    - Make `viewTag` optional for events that are not related to views.
    - Fast path for events that return NO from `canCoalesce`.
    - Add a missing test for event coalescing with different view tags.
    
    Ended up making only one PR for all this since the changes are related and hard to separate.
    
    **Migration**
    Use a custom RCTEvent subclass with `[sendEvent:]` (preferred way to allow type safe events) or `RCTComponentEvent`.
    
    **Test plan**
    - Ran RCTEventDispatcher unit tests
    - Tested manually in RNTester
    
    Changelog:
    
    [iOS] [Changed] - Remove deprecated RCTEvent method, sendInputEventWithName:body:
    Pull Request resolved: #15894
    
    Reviewed By: shergin
    
    Differential Revision: D13726194
    
    Pulled By: hramos
    
    fbshipit-source-id: 11f63a99e08f46ec6b4f16f8d9949cdbf5c3fe13
Commits on Feb 4, 2019
  1. Allow changing the project path in react-native-xcode.sh (#23273)

    janicduplessis authored and facebook-github-bot committed Feb 4, 2019
    Summary:
    When using react-native inside a monorepo with yarn workspaces the react-native installation can get hoisted and the assumption that the project is located in the folder where node_modules is is no longer true.
    
    To handle this case I added an option to pass the path of the project root.
    
    For example when using yarn workspace we can use something like this in the xcode scripts:
    
    Assumes the following folder structure
    /packages/myapp
    /node_modules/react-native
    
    ```sh
    export NODE_BINARY=node
    export PROJECT_ROOT=$PWD/..
    ../../../node_modules/react-native/scripts/react-native-xcode.sh
    ```
    
    It could be possible to change the default to `$PWD/..` since pwd is where the xcode project is located but then it would break if the native project structure is not the one we assume. To avoid the breaking change I decided to just keep the existing behaviour and allow changing the path with `PROJECT_ROOT`.
    
    [ios] [added] - Allow changing the project path in react-native-xcode.sh
    Pull Request resolved: #23273
    
    Differential Revision: D13941793
    
    Pulled By: cpojer
    
    fbshipit-source-id: f394641b1c9d01f32bc4169097e39fc14df8191f
Commits on Jan 28, 2019
  1. Disable no-inline-styles lint rule for RNTester (#23169)

    janicduplessis authored and facebook-github-bot committed Jan 28, 2019
    Summary:
    We have a million of inline styles in RNTester which causes a lot of noise with the lint bot in PRs. The rule makes sense for the main libraries but for RNTester it usually makes examples easier to read to just use inline styles.  Also reduces lint warnings from 357 to 77.
    
    Changelog:
    ----------
    
    [General] [Changed] - Disable no-inline-styles lint rule for RNTester
    Pull Request resolved: #23169
    
    Differential Revision: D13838529
    
    Pulled By: cpojer
    
    fbshipit-source-id: 474e159e0b0c07bce42878db2b214b8903b49c08
Commits on Jan 25, 2019
  1. Fix textTransform when used with other text styles on Android (#22670)

    janicduplessis authored and facebook-github-bot committed Jan 25, 2019
    Summary:
    On Android `textTransform` breaks other styles applied to the text. It seems related to the usage of `ReplacementSpan` which allows drawing the text manually but seems to throw away some changes made by other span applied to the text.
    
    To fix it I removed the usage of `ReplacementSpan` and simply transform the text before appending it to the `Spannable` string. To make sure textTransform is inherited correctly I added it to TextAttributes which handles this.
    Pull Request resolved: #22670
    
    Differential Revision: D13494819
    
    Pulled By: cpojer
    
    fbshipit-source-id: 1c69591084aa906c2d3b10153b354d39c0936340
Commits on Jan 17, 2019
  1. Use RCTBridgeDelegate in the new project template (#23031)

    janicduplessis authored and facebook-github-bot committed Jan 17, 2019
    Summary:
    The main goal of this change is to fix an issue that happens on iOS when the native app starts before the packager server is available which causes app reloads to fail continually until the app is restarted.
    
    What happens is that with the current setup we call `RCTBundleURLProvider#jsBundleURLForBundleRoot` once in `AppDelegate#didFinishLaunchingWithOptions`. If at that point the packager server is not running yet it will return nil (expected behaviour) and that will be passed to the bridge constructor. Subsequent reloads will keep trying to load this nil bundle url since it has no way to ask `RCTBundleURLProvider` for a new url now that the packager is actually running.
    
    We can fix this by using `RCTBridgeDelegate` instead which is a lot more flexible. Instead of passing the bundle url at construction time it will call the `sourceURLForBridge` method each time the bridge is reloaded. This means that even if the packager is not running yet and that `RCTBundleURLProvider` returns nil for the first invocation, subsequent reloads will call `RCTBundleURLProvider` again for a new value.
    
    Changelog:
    ----------
    
    [iOS] [Added] - Use RCTBridgeDelegate in the new project template
    Pull Request resolved: #23031
    
    Differential Revision: D13710048
    
    Pulled By: cpojer
    
    fbshipit-source-id: 0059c5c962d508737ae410a82315c11ad305efe8
Commits on Dec 18, 2018
  1. Make TextInput event prop types less strict (#22673)

    janicduplessis authored and facebook-github-bot committed Dec 18, 2018
    Summary:
    Similar to what was done here #22376
    
    This allows using things like async functions with text input event props.
    
    Changelog:
    ----------
    
    [General] [Fixed] - Make TextInput event prop types less strict
    
    Pull Request resolved: #22673
    
    Reviewed By: TheSavior
    
    Differential Revision: D13492029
    
    Pulled By: hramos
    
    fbshipit-source-id: 84e1a776a7ac1ae7567fbf4105b2be9be330610e
Commits on Dec 3, 2018
  1. Make type of RefreshControl.onRefresh less strict (#22376)

    janicduplessis authored and facebook-github-bot committed Dec 3, 2018
    Summary:
    I think a common pattern is to use async functions with the onRefresh prop to reload data. I made the type `mixed` since we don't care about what the function returns. Could also be `void | Promise<void>` I haven't really seen a pattern for those in the codebase.
    Pull Request resolved: #22376
    
    Differential Revision: D13310372
    
    Pulled By: TheSavior
    
    fbshipit-source-id: 445f28cf2c37f9c937e72d76716002deaf9d9c94
Commits on Sep 26, 2018
  1. Remove global babelHelpers and regenerator (#21283)

    janicduplessis authored and facebook-github-bot committed Sep 26, 2018
    Summary:
    Follow up to facebook/metro@8932a9c
    
    Babel helpers and regenerator runtime will be imported automatically from `babel/runtime`. We still need to add the global regeneratorRuntime for jest tests since we disable babel-runtime currently.
    Pull Request resolved: #21283
    
    Reviewed By: mjesun
    
    Differential Revision: D10010963
    
    Pulled By: rafeca
    
    fbshipit-source-id: da5e23dd901f8f8940d46816b4fc9290d0e28c76
Commits on Sep 23, 2018
  1. Fix flow type for maxFontSizeMultiplier on TextInput (#21271)

    janicduplessis authored and facebook-github-bot committed Sep 23, 2018
    Summary:
    This flow type is wrong, probably just a copy paste mistake.
    Pull Request resolved: #21271
    
    Differential Revision: D10006741
    
    Pulled By: TheSavior
    
    fbshipit-source-id: eba0116ec39ba00f000d9bf789ae9214990355a1
Commits on Sep 21, 2018
  1. Use babel runtime instead of relying on global babelHelpers and regen…

    janicduplessis authored and facebook-github-bot committed Sep 21, 2018
    …erator (#198)
    
    Summary:
    **Summary**
    
    The RN transformer currently relies on the enviroment providing babelHelpers and regeneratorRuntime as globals by using 'babel-external-helpers'. This wasn't really a problem before since helpers were stable and we could maintain our copy easily but it seems like there are more now with babel 7 and it makes sense to include only those used by the app.
    
    This is exactly what babel/transform-runtime does. It will alias all helpers and calls to regeneratorRuntime to files in the babel/runtime package.
    
    This will solve issues like this #20150 caused by missing babelHelpers. This solution also avoids bloating babelHelpers to fix OSS issues like the one linked before.
    
    **Test plan**
    
    - Updated tests so they all pass.
    - Tested that it actually works by applying the changes locally in an RN app.
    - Added a test for async functions, to make sure regenerator is aliased properly and doesn't depend on the global.
    - Made sure require-test.js still fails if the require implementation contains babel helpers (by adding an empty class in the file).
    Pull Request resolved: facebook/metro#198
    
    Reviewed By: mjesun
    
    Differential Revision: D8833903
    
    Pulled By: rafeca
    
    fbshipit-source-id: 7081f769f288ab358ba89ae8ee72a513bb12e225
  2. Create Renderer README (#21251)

    janicduplessis authored and facebook-github-bot committed Sep 21, 2018
    Summary:
    I've seen quite a few PRs try to change sync'ed files so let's add this warning and hope people read it.
    
    Not sure if it's better / possible to put it in the oss folder instead.
    Pull Request resolved: #21251
    
    Differential Revision: D9993401
    
    Pulled By: hramos
    
    fbshipit-source-id: 05d22c7f8da1eba97a83d2b7dbc66d9324695a1b
Commits on Sep 20, 2018
  1. Support the `Slow Animations` option of the iOS simulator (#21157)

    janicduplessis authored and facebook-github-bot committed Sep 20, 2018
    Summary:
    RN animations currently ignore the `Slow Animations` option on the iOS simulator because we don't use UIKit animations directly. This uses a private api to get the slow coefficient and use it in the native animated driver. We only compile the private api code on simulator so this won't cause issues for app store approval. One possible issue is that the api changes in new iOS versions but I think it's reasonable to do this.
    
    Note that this won't work with JS driven animations, we could expose the slow coefficient as a constant and use that in JS but I decided not to implement it.
    Pull Request resolved: #21157
    
    Differential Revision: D9980306
    
    Pulled By: sahrens
    
    fbshipit-source-id: bdbce2e469261a75cb4b9a251e8e8f212bb9c4e7
  2. Decode gzip body if not handled by okhttp (#21187)

    janicduplessis authored and facebook-github-bot committed Sep 20, 2018
    Summary:
    When looking at enabling gzip content encoding on Android I stumbled on this old issue where the body content is not decoded. It happens because okhttp only handles gzip decoding if the user does NOT provide an accept-encoding header. This is pretty confusing because on iOS we need to pass the header manually if we want to receive a gzipped response. I think it makes sense to handle the decoding no matter what.
    
    See the comment in code for more details.
    
    Fixed #5297
    Pull Request resolved: #21187
    
    Differential Revision: D9978889
    
    Pulled By: hramos
    
    fbshipit-source-id: b86791fb7d3157f325a0904225d2f63d166080d5
Commits on Sep 19, 2018
  1. Fix InputAccessoryView safe area when not attached to a TextInput (#2…

    janicduplessis authored and facebook-github-bot committed Sep 19, 2018
    …1179)
    
    Summary:
    When using an InputAccessoryView attached to a TextInput the safe area insets are not applied properly. This uses different autolayout constraints that works in all cases I tested, roughly based on the technique used here https://github.com/stockx/SafeAreaInputAccessoryViewWrapperView/blob/master/SafeAreaInputAccessoryViewWrapperView/Classes/SafeAreaInputAccessoryViewWrapperView.swift#L38.
    Pull Request resolved: #21179
    
    Differential Revision: D9928503
    
    Pulled By: hramos
    
    fbshipit-source-id: b1b623334558093042fd94ac85e1b52dd16aa1a0
  2. Fix warning in InputAccessoryView (#21174)

    janicduplessis authored and facebook-github-bot committed Sep 19, 2018
    Summary:
    Currently the warning is always triggered, even on iOS. This simply adds a platform check and tweak the message.
    Pull Request resolved: #21174
    
    Differential Revision: D9929679
    
    Pulled By: hramos
    
    fbshipit-source-id: 383f4a820cf5bf261dbfdcff3b950f9812a65e00
Commits on Aug 22, 2018
  1. Allow animating the elevation style (#20739)

    janicduplessis authored and facebook-github-bot committed Aug 22, 2018
    Summary:
    Elevation should be supported by the native driver as it's a non-layout prop.
    Pull Request resolved: #20739
    
    Differential Revision: D9468318
    
    Pulled By: hramos
    
    fbshipit-source-id: f8b8ca7536968ab8f6229c134fd169c321ccc651
Commits on Aug 10, 2018
  1. Enable metro hmr server in local-cli (#20605)

    janicduplessis authored and facebook-github-bot committed Aug 10, 2018
    Summary:
    The `hmrEnabled` flag was not passed to the metro runServer config which caused HMR to be broken.
    Pull Request resolved: #20605
    
    Differential Revision: D9272070
    
    Pulled By: hramos
    
    fbshipit-source-id: 3765031d9e7806be11781fba92663ce7c4ff2ffb
Commits on Aug 6, 2018
  1. Un-deprecate TextInput.State.focusTextInput and TextInput.State.blurT…

    janicduplessis authored and facebook-github-bot committed Aug 6, 2018
    …extInput (#20326)
    
    Summary:
    In #18936 we decided to deprecate `focusTextInput` and `blurTextInput` but since then I found a valid use case for it that is pretty much impossible to implement otherwise.
    
    React Navigation uses it to blur / re-focus the input during the swipe back gesture. Blur can be done with Keyboard.dismiss but without this api we cannot re-focus the text field that was focused if the swipe back gesture is cancelled. See https://github.com/react-navigation/react-navigation/blob/master/src/navigators/createKeyboardAwareNavigator.js#L21-L34
    
    I think it is best to just bring back this api.
    Pull Request resolved: #20326
    
    Differential Revision: D9182810
    
    Pulled By: hramos
    
    fbshipit-source-id: 3740421ffafb8f814522d15788f3466324177c16
Commits on Aug 3, 2018
  1. Enable nullish coalescing in flow config (#20516)

    janicduplessis authored and facebook-github-bot committed Aug 3, 2018
    Summary:
    Follow up to a9792ac. I assume it's enabled for fb flow config so we can avoid future breakages if someone decide to use this syntax.
    Pull Request resolved: #20516
    
    Differential Revision: D9169244
    
    Pulled By: TheSavior
    
    fbshipit-source-id: 3736d2aed65a0cb4392c175f7d652594cf6a1518
  2. Enable optional chaining and nullish coalescing in flowconfig template (

    janicduplessis authored and facebook-github-bot committed Aug 3, 2018
    #20517)
    
    Summary:
    Follow up to a9792ac and #20516
    
    This makes sure new projects typecheck properly since RN can use this syntax.
    Pull Request resolved: #20517
    
    Differential Revision: D9169268
    
    Pulled By: TheSavior
    
    fbshipit-source-id: f2b08598bdc6979931e987c9a275d75f08751754
Commits on Jul 20, 2018
  1. Fix `currentlyFocusedField` by Removing `this` usage in TextInputState (

    janicduplessis authored and facebook-github-bot committed Jul 20, 2018
    #19834)
    
    Summary:
    I broke `currentlyFocusedField` when adding it back in ce3b7b8 because `this` no longer refers to the proper object because it is assigned here ce3b7b8#diff-b48972356bc8dca4a00747d002fc3dd5R330. This code was pretty prone to breaking so I simply removed the `this` usage and rely on a top level variable instead. Also moved everything to named functions.
    Pull Request resolved: #19834
    
    Differential Revision: D8943088
    
    Pulled By: hramos
    
    fbshipit-source-id: 24d1470f6117138a5978fb7e467147847a9f3658
Commits on Jul 18, 2018
  1. Fix local-cli assetRegistryPath and middlewares (#20162)

    janicduplessis authored and facebook-github-bot committed Jul 18, 2018
    Summary:
    This fixes some regressions with local-cli introduced in c4a66a8.
    
    - We didn't pass `assetRegistryPath` which caused the following error when loading the bundle:
    ```
    error: bundling failed: Error: Unable to resolve module `missing-asset-registry-path` from `/Users/janic/Developer/react-native/RNTester/js/uie_thumb_normal@2x.png`: Module `missing-asset-registry-path` does not exist in the Haste module map
    ```
    - The middlewares were not added to the metro server. This causes some packager server features to fail. The one I noticed is that the /status endpoint didn't exist anymore which causes CI to fail and also Android to not load the bundle from the packager initially. The remote debugging feature was also broken.
    Pull Request resolved: #20162
    
    Differential Revision: D8867610
    
    Pulled By: hramos
    
    fbshipit-source-id: 8a08b7f3175692ab6ee73c0a7c25075091ae4792
Commits on Jul 2, 2018
  1. Remove the deprecated `isIPhoneX_deprecated` constant (#19920)

    janicduplessis authored and facebook-github-bot committed Jul 2, 2018
    Summary:
    Cleanup the `isIPhoneX_deprecated` constant which was said to be removed by June 1st 2018.
    Closes #19920
    
    Differential Revision: D8714400
    
    Pulled By: hramos
    
    fbshipit-source-id: 0b0b3a2d7b8098baf0474afea230780c79b2fe14
Commits on May 29, 2018
  1. Vendor fetch polyfill, remove default blob response type

    janicduplessis authored and facebook-github-bot committed May 29, 2018
    Summary:
    While investigating an issue about blobs (#18223), I noticed that the fetch polyfill (https://github.com/github/fetch) uses blobs as the response type by default if the module is available (https://github.com/github/fetch/blob/master/fetch.js#L454). This surfaced some issue with the blob implementation on iOS that has since been fixed.
    
    However after further review of the fetch polyfill and the way Blobs work in RN, I noticed a major issue that causes blobs created by fetch to leak memory. This is because RN blobs are not deallocated automatically like in the browser (see comment https://github.com/facebook/react-native/blob/master/Libraries/Blob/Blob.js#L108) and the fetch polyfill does not deallocate them explicitly using the close method.
    
    Ideally we should implement automatic blob cleanup when the instance is garbage collected but implementing that is probably somewhat complex as it requires integrating with JSC. For now I suggest disabling the default handling of requests as blobs in the fetch polyfill. This will mitigate the issue for people not using Blobs directly. I'm not sure how well documented the Blob module is but we should make it clear that they currently require explicit deallocation with the close method for people using them directly.
    
    Run a simple http request using fetch and make sure it does not use the Blob module anymore.
    
    [GENERAL] [BUGFIX] [fetch] - Do not use blobs to handle responses in the fetch polyfill, fixes potential memory leak.
    Closes #19333
    
    Differential Revision: D8125463
    
    Pulled By: hramos
    
    fbshipit-source-id: 8f4602190dfc2643606606886c698e8e9b1d91d1
Commits on May 17, 2018
  1. Bring back TextInput.State, deprecate focusTextInput and blurTextInput

    janicduplessis authored and facebook-github-bot committed May 17, 2018
    Summary:
    a275eac removed TextInput.State but we should keep it as it was a public-ish API and we don't have any migration plan off it. Also bring back `focusTextInput` and `blurTextInput` with a deprecation warning.
    
    Tested TextInput.State is back
    
    [GENERAL][ENHANCEMENT][TextInput] - Bring back TextInput.State, deprecate focusTextInput and blurTextInput
    Closes #18936
    
    Differential Revision: D8044439
    
    Pulled By: hramos
    
    fbshipit-source-id: fde145f04bb1d46ef58b5954cb7963adf495b21c
Commits on May 15, 2018
  1. Fix keyboard handling with keyboardShouldPersistTaps: never

    janicduplessis authored and facebook-github-bot committed May 15, 2018
    Summary:
    When `keyboardShouldPersistTaps` is `"never"` it would break when doing the following steps:
    
    - Tap input 1, keyboard goes up
    - Tap input 2, keyboard stays down (The bug I expected without the isTextInput check was that it would dismiss instead :o )
    - Tap outside, keyboard stays down. It should dismiss here since it should never persist taps (unless tapping another input)
    
    What seems to happen is that RN `currentlyFocusedTextInput` goes out of sync with the focused text input and is null even if there is still a text input focused. I haven't had time to investigate the cause of that (probably some race condition because of trying to focus and blur at the same time) but we should not try to dismiss the keyboard when tapping another TextInput in the first place.
    
    I reproduced the bug mentioned by setting `keyboardShouldPersistTaps` to `"never"` in RNTesterPage.js and then using the steps described above. I made sure that the bug did not happen after this change.
    
    [GENERAL][BUGFIX][ScrollResponder] - Fix keyboard handling with keyboardShouldPersistTaps: never
    Closes #19255
    
    Differential Revision: D8002818
    
    Pulled By: mdvacca
    
    fbshipit-source-id: 6ecb8d2c30eb9338529471a958b5dc04037c7ec6
Commits on Mar 27, 2018
  1. Native Animated - Support border radius

    janicduplessis authored and facebook-github-bot committed Mar 27, 2018
    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 #18574
    
    Differential Revision: D7415956
    
    Pulled By: hramos
    
    fbshipit-source-id: 6dd46bcdcb10c6a1956dd1f526212f33a4f44425
  2. Fix blob response parsing for empty body on iOS

    janicduplessis authored and facebook-github-bot committed Mar 27, 2018
    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 #18547
    
    Differential Revision: D7415950
    
    Pulled By: hramos
    
    fbshipit-source-id: 56860532c6171255869f02a0960f55d155184a46
Commits on Mar 26, 2018
  1. Use afterEvaluate to make gradle bundle task work with configureondemand

    janicduplessis authored and facebook-github-bot committed Mar 26, 2018
    Summary:
    The js bundle task does not run when `org.gradle.configureondemand` is set to true. This uses `afterEvaluate` instead of `gradle.projectsEvaluated` which is executed properly.
    
    Add `org.gradle.configureondemand=true`, run RNTester in release mode and make sure the bundle task is run.
    
    [ANDROID] [BUGFIX] [LOCATION] - Fix release bundle task when org.gradle.configureondemand=true
    Closes #18557
    
    Differential Revision: D7396744
    
    Pulled By: mdvacca
    
    fbshipit-source-id: 9ea134cb49e8a087cec16f82b990cd19af76785a
Commits on Mar 14, 2018
  1. Don't wrap ListEmptyComponent in an extra view

    janicduplessis authored and facebook-github-bot committed Mar 14, 2018
    Summary:
    A common UI pattern for list empty states is some text/images centered inside the visible part of the list. This is pretty hard to do currently because we wrap ListEmptyComponent with an extra view with no way to style it so we cannot just use `flex: 1` to make it fill the available space.
    
    - Added an example of ListEmptyComponent in the FlatList example in RNTester
    
    Before (no way to make ListEmptyComponent fill the space):
    <img width="377" alt="screen shot 2018-03-05 at 5 24 15 pm" src="https://user-images.githubusercontent.com/2677334/37003152-129db3ac-209a-11e8-9600-110f10d57144.png">
    
    After:
    <img width="377" alt="screen shot 2018-03-05 at 5 09 20 pm" src="https://user-images.githubusercontent.com/2677334/37002809-e6971178-2098-11e8-8cf7-74bfb2f6a992.png">
    
    - Tested some edge cases like returning null from the ListEmptyComponent
    
    - Tested in an app that uses FlatList + ListEmptyComponent
    
    [GENERAL] [MINOR] [VirtualizedList] - Don't wrap ListEmptyComponent in an extra view
    Closes #18206
    
    Differential Revision: D7266274
    
    Pulled By: sahrens
    
    fbshipit-source-id: 4636d2418474a4c86ac63e5e18a9afc391a518c5
Commits on Mar 5, 2018
  1. Use react.gradle from repo root instead of copy in RNTester

    janicduplessis authored and facebook-github-bot committed Mar 5, 2018
    Summary:
    RNTester used a copy of the main react.gradle file instead of the real one. Recent changes to the real file caused builds to fail with older gradle versions but was not caught by CI because it wasn't using that file for RNTester. That copy of react.gradle is just a leftover from when projects included a copy instead of importing the one in RN directly.
    
    Note: CI WILL fail with this PR, if we have trouble landing this I can add the revert in this commit too but wanted to keep it as 2 separate commits.
    
    Tested that building RNTester actually fails now that it uses react.gradle with recent changes, then tested that is builds properly when reverting d16ff3b.
    
    [INTERNAL] [MINOR] [RNTester] - Use react.gradle from repo root instead of copy in RNTester
    Closes #18188
    
    Differential Revision: D7155179
    
    Pulled By: hramos
    
    fbshipit-source-id: 15b461a63b841bf807e7d11ba3ead005ca5e33b0
  2. Revert "Better Android Gradle Plugin 3.x integration"

    janicduplessis authored and facebook-github-bot committed Mar 5, 2018
    Summary:
    This reverts commit d16ff3b.
    
    Currently breaks with the gradle version used by RN, I think there has been some work to update that to a more recent one but for now I think we should just revert it.
    
    It errors with:
    
    ```
    Could not find method registerGeneratedResFolders() for arguments [file collection] on object of type com.android.build.gradle.internal.api.ApplicationVariantImpl.
    ```
    
    Tested that RN tester now builds when using the right react.gradle (#18188)
    
    [ ANDROID ] [ BUGFIX ] [ react.gradle ] - REVERT "Support Android Gradle Plugin 3.x and AAPT2"
    [ ANDROID ] [ FEATURE ] [ react.gradle ] - REVERT "Expose the bundling task and its outputs via ext properties"
    Closes #18189
    
    Differential Revision: D7155176
    
    Pulled By: hramos
    
    fbshipit-source-id: 87b7b80b39cd345eebac4631efe6697971a1dbdf
Commits on Feb 14, 2018
  1. Verify that the component passed to createAnimatedComponent is not fu…

    janicduplessis authored and facebook-github-bot committed Feb 14, 2018
    …nctional
    
    Summary:
    Stateless functional components don't support refs and we need that for the component to work, it used to crash with this error message: `undefined is not an object (evaluating 'this._component.getScrollableNode')`. This makes it clear what the issue is.
    
    Fixes some of the errors in #10635, not sure if it fixes all the cases described in the issue though.
    
    **Test plan**
    Tested that passing a component with createClass or extends Component works but passing a function causes an error.
    
    [GENERAL] [ENHANCEMENT] [Animated] - Verify that the component passed to createAnimatedComponent is not functional
    Closes #15019
    
    Differential Revision: D6988096
    
    Pulled By: sahrens
    
    fbshipit-source-id: ec0ffa763245e786f44b4a1d56c0738876c25782
  2. Bundle download progress on Android

    janicduplessis authored and facebook-github-bot committed Feb 14, 2018
    Summary:
    Android equivalent of #15066
    
    Tested that download progress shows up properly when reloading the app.
    
    [ANDROID] [FEATURE] [DevSupport] - Show bundle download progress on Android
    Closes #17809
    
    Differential Revision: D6982823
    
    Pulled By: hramos
    
    fbshipit-source-id: da01e42b8ebb1c603f4407f6bafd68e0b6b3ecba
Older
You can’t perform that action at this time.