Summary:
I ran into an issue trying to upload videos selected with ImagePickerIOS to S3. The file would upload just fine but would be reduced in size and have no duration. It appears to be just a thumbnail of the video. Using the media url resolves this.
Closes https://github.com/facebook/react-native/pull/5771
Reviewed By: svcscm
Differential Revision: D2905720
Pulled By: nicklockwood
fb-gh-sync-id: 4b0200652c3b6a62cdb65deb582fbc5829c577a6
shipit-source-id: 4b0200652c3b6a62cdb65deb582fbc5829c577a6
Summary:
public
Lazy export of module constants required a sync dispatch to the main thread, which was deadlocking in some of our projects.
This moves the constants export to the initial bridge init, which may slightly increase initial startup time, but avoids the deadlock.
Reviewed By: javache
Differential Revision: D2911295
fb-gh-sync-id: 0d14a629ac4fc7ee21acd293c09595c18232659b
shipit-source-id: 0d14a629ac4fc7ee21acd293c09595c18232659b
Summary:
public
- Intro new back action
- Add support in the two main reducers
- Use it in examples to support Android back button
- Disable NavigationCard gestures on Android
Reviewed By: hedgerwang
Differential Revision: D2914154
fb-gh-sync-id: d4dce6538e19613a2ffca21e2e3b2ecaded3d5dc
shipit-source-id: d4dce6538e19613a2ffca21e2e3b2ecaded3d5dc
Summary:
public
Navigator expects that the navigation bar implements the method to refresh itself.
NavigatorNavigationBar already has this method but not for NavigatorBreadcrumbNavigationBar.
Fix diff fixes this with the same fix as D2751922 did.
Reviewed By: wenjingw
Differential Revision: D2914475
fb-gh-sync-id: a2960bad5df3b403bdd2ab1dc4d349d7251b86c8
shipit-source-id: a2960bad5df3b403bdd2ab1dc4d349d7251b86c8
Summary:
We should use 4 spaces of indentation in the MainActivity template as this
is the most common setting outside fb.
public
Reviewed By: bestander
Differential Revision: D2911952
fb-gh-sync-id: 3b5285945f0033d7342348b7a7cbafa32809f7dc
shipit-source-id: 3b5285945f0033d7342348b7a7cbafa32809f7dc
Summary:
Turns out, even after discussion that was had in https://github.com/facebook/react-native/pull/5294#issuecomment-174397103, we really do need this transform.
I've just included it in the preset...let me know if you all would rather publish to npm.
The actual reason why this is necessary is because in the latest sync from FB, fbjs was updated to use the `Symbol.iterator` express in it's isEmpty function: 064a484e18
We use this in RN in the ListView...and this change (once #5084 is merged) will cause ListView to break on older JSC context's.
This resolves that, and is probably something we should have had all along.
Closes https://github.com/facebook/react-native/pull/5824
Reviewed By: svcscm
Differential Revision: D2913315
Pulled By: vjeux
fb-gh-sync-id: abaf484a9431b3111e8118d01db8d2c0d2dd73ca
shipit-source-id: abaf484a9431b3111e8118d01db8d2c0d2dd73ca
Summary:
public
KeyboardListener needs DisplayMetrics to be initialized when it is attached. At
the moment, this breaks easily whenever we change these components, since DisplayMetrics are intialized
in a module and KeyboardListener is created eagerly in ReactRootView, whereas
ReactRootView can exist without the instance.
This changes to create DisplayMetrics as soon as possible, when the react
instance is built. The KeyboardListener is created and attached after the ReactRootView is
attached to an existing instance, point at which DisplayMetrics have to be
initialized.
Reviewed By: dmmiller
Differential Revision: D2911351
fb-gh-sync-id: 64d1805c5d5b2f6876adb694b565a2df059b381d
Summary:
The bundler class had duplicated code and parts that were hard to follow, because functions accepted heterogenous arguments, leading to a lot of conditionals.
This commit tries to remove duplication between build steps of different type of bundles, and by accepting less different types of arguments. These differences are now handled further up the call stack.
public
Reviewed By: sebmarkbage
Differential Revision: D2905807
fb-gh-sync-id: ef85ea0d461a9a06a4a64480e014a5324c4ef532
Summary:
This is a cut down version of a previous pull request with just the 4 corners catered for.
Closes https://github.com/facebook/react-native/pull/4252
Reviewed By: svcscm
Differential Revision: D2911959
Pulled By: androidtrunkagent
fb-gh-sync-id: 7ddcd684d90d4d92ccefed906c0126e92818dcde
Summary:
Expose method to implement changing font family cache. Like ide suggested in #4420 , this will helpful for using remote font file (use `Typeface#createFromFile` to load downloaded font file).
iOS's CoreText already allow this in native code.
Closes https://github.com/facebook/react-native/pull/4696
Reviewed By: bestander
Differential Revision: D2911762
Pulled By: andreicoman11
fb-gh-sync-id: a931e2e711dd94fa0df6fdd066827756d862a4ba
Summary:
- Capitalise productFlavorName for target path
- Capitalise buildType in sourceName when flavour exists
- Fix the path the assets are added.
- Backward compatibility with bundleIn(buildTypeName) when flavours are added
Closes https://github.com/facebook/react-native/pull/5580
Reviewed By: svcscm
Differential Revision: D2911735
Pulled By: mkonicek
fb-gh-sync-id: 6fb391a12ee27ee2a503961d8779a85d31cf5367
Summary:
until we have an automated test in CI
Closes https://github.com/facebook/react-native/pull/5775
Reviewed By: svcscm
Differential Revision: D2911639
Pulled By: mkonicek
fb-gh-sync-id: 26d8194dd5a6fd7210f4b014787e6847217dd7f1
Summary:
public
Expose JS hooks to create flow events in systrace (the nice arrows to show async work flow) +
add support to the showing all the work enqueued from the JS thread as added in D2743733
Depends on D2743733
Reviewed By: jspahrsummers
Differential Revision: D2815293
fb-gh-sync-id: 4278f61a67a6e78cf2704bacce34b1389328c6df
Summary:
…while an event is dispatched
While it is guarded, a copy of the Set is created before listeners are added or removed. The event dispatch loop continues with the old Set of listeners.
This PR modifies `BackAndroid` to match the proposal at the end of #5781.
Closes https://github.com/facebook/react-native/pull/5783
Reviewed By: svcscm
Differential Revision: D2911282
Pulled By: foghina
fb-gh-sync-id: 34964ec3414af85eb9574bbcef081238fc67ffaf
Summary:
Now that String.prototype.includes is there, we should remove the .contains one which has not been standardized.
For fb reviewers, this needs to land after D2910339 which updates internal callsites.
Closes https://github.com/facebook/react-native/pull/5794
Reviewed By: svcscm
Differential Revision: D2910855
Pulled By: vjeux
fb-gh-sync-id: 8fd216222385f038995d1ed10e8a2c4c34c7e928
Summary:
RefreshControl did not start refreshing when refreshing was set to true initially. It also did not start refreshing on iOS when setting the prop from false to true without doing a pull to refresh gesture.
This was a pain in the ass to make work on iOS because UIRefreshControl seems super sensitive to when beginRefreshing can be called, for the initial render I need to call it in layoutSubviews. I also have to manually adjust the scrollview content offset when calling beginRefreshing. The code is a bit hacky but it was the only solution I found that was actually working.
Fixes#5716
Closes https://github.com/facebook/react-native/pull/5745
Reviewed By: svcscm
Differential Revision: D2910716
Pulled By: nicklockwood
fb-gh-sync-id: d60e73bcfe8d86bb01249ba5f17e6a23c5a5aff6
Summary:
The hex8 specified version is #rrggbbaa so it would be great to have the internal representation be 0xrrggbbaa to prevent confusion.
This pull request changes the internals of normalizeColor. It changes a lot of lines but there isn't any big changes.
Small changes:
- Use | instead of + for number operations
- Use x << 24 instead of x * (1 << 24)
- Have hslToRgb return pre shifted number
processColor is still sending colors the 0xaarrggbb format to native and tests still pass without changes.
Closes https://github.com/facebook/react-native/pull/5792
Reviewed By: svcscm
Differential Revision: D2910589
Pulled By: vjeux
fb-gh-sync-id: 6dd353f2edd5127f1762e7a57a65379d2a58e0c1
Summary:
Put the transform list up to date and add a polyfill section
Closes https://github.com/facebook/react-native/pull/5793
Reviewed By: svcscm
Differential Revision: D2910585
Pulled By: vjeux
fb-gh-sync-id: c67852654241def4a826d6d694ad6fc9cb849264
Summary:
fc94f1e6d0 and the following commits introduced some changes to the jni build but only changed the BUCK build files and not the gradle ones. This ports the changes to the gradle build files to fix the build.
Closes https://github.com/facebook/react-native/pull/5791
Reviewed By: svcscm
Differential Revision: D2910012
Pulled By: vjeux
fb-gh-sync-id: b6c7edfed6873d501e46e80a0c9f128d9df04ca4
Summary:
Everything below the bridge interacts with just a MessageQueueThread. The implementation (JMessageQueueThread) is injected from react/jni.
public
Reviewed By: astreet
Differential Revision: D2905178
fb-gh-sync-id: 8b138e746d5a96dd70837bb2149cd4e188fcdacc
Summary:
This just moves the jni code that actual figures out the cache dir into OnLoad.cpp and then passes it down to the JSCEXecutorFactory.
public
Reviewed By: astreet
Differential Revision: D2905176
fb-gh-sync-id: bedf52fbeaab6beabac25c87aad00a98ddf182f7
Summary:
So, this makes it so a set of behaviors that require accessing java can be injected from the jni/ folder. The behaviors are logging, perf logging, log markers and loading script from assets.
I'd argue that these should all actually be encapsulated by interfaces that are passed to the JSCExecutor/others (and I'd say that's regardless of whether they are injected from jni/ or not), but I wanted to stick to the least disruptive pattern for these changes.
public
Reviewed By: astreet
Differential Revision: D2905168
fb-gh-sync-id: 7c8c16cb77b8fc3d42750dacc6574259ad512ac2
Summary:
This adds a CountableJSExecutorFactory that derives from Countable. And uses that. Basically it allows code that doesn't need to know about jni or Countable not depend on it.
public
Reviewed By: astreet
Differential Revision: D2905163
fb-gh-sync-id: f2bfd5589a3185bb175ad51660b17be08ba62424
Summary:
Updates uses of FBLOG* and FBASSERT* to their glog equivalents.
public
Reviewed By: astreet
Differential Revision: D2905159
fb-gh-sync-id: 1f916283aa3de68d8469c8d4ca7fa0874cec28ef
Summary:
Native code accesses the Java Application through the ApplicationHolder. The application should be set on the holder as soon as possible. This change fixes a race in WebWorkersTest.
public
Reviewed By: astreet
Differential Revision: D2905157
fb-gh-sync-id: 7e488f4eecefedb8482276776b3a66e14a843f90
Summary:
My original implementation involved creating a `RCT_ENUM_CONVERTER` with `CLLocationAccuracy` on iOS and a Hashmap on Android that would convert `string` values to `doubles` for distance filtering.
I got this to work just fine but realized that I made things more complicated than they needed to be and simplified everything by just have the option be a decimal value (in meters) that works both for iOS and Android.
The only thing i'm not sure about is if we can set arbitrary values for CLLocationManager's distance filter.
nicklockwood Any idea?
Closes https://github.com/facebook/react-native/pull/5563
Reviewed By: svcscm
Differential Revision: D2908250
Pulled By: nicklockwood
fb-gh-sync-id: d83c12b3ce7c343f413749a2cd614b3bf04d6750
Summary:
the flush + optimized multiGet result in an obscure bug that results when two multiGet requests with overlapping key sets get issued. The result array for both requests ends up bigger than the key array (because it has duplicates)
Closes https://github.com/facebook/react-native/pull/5514
Reviewed By: svcscm
Differential Revision: D2908264
Pulled By: nicklockwood
fb-gh-sync-id: 60be1bce4acfc47083e4ae28bb8b63f9dfa56039
Summary:
`debugger.html` contained a ton of hacky code that was needed to ensure we have a clean JS runtime every time a client RN app connects. That was needed because we used the page's global environment as runtime. Some time ago WebWorker support was added and now we run RN code inside an isolated WebWorker instance, and we can safely get rid of all these hacks.
This has a bunch of nice side-effects: debug reload works faster, `console.log`s are preserved, `debuggerWorker.js` selection doesn't change.
Made sure the debugging (breakpoints, etc.) still works as before.
Small demo
![](http://g.recordit.co/FPdVHLHPUW.gif)
Closes https://github.com/facebook/react-native/pull/5715
Reviewed By: svcscm
Differential Revision: D2906602
Pulled By: frantic
fb-gh-sync-id: 1a6ab9a5655d7c32ddd23619564e59c377b53a35
Summary:
Introduced in a major lazy loading refactoring: 060664fd3d.
This is especially an issue when aborting a long-lived HTTP connection used as a notification channel, as it will use 1 of the maximum 4 connections per host (default limit defined by iOS' NSURLSession).
Closes https://github.com/facebook/react-native/pull/5782
Reviewed By: svcscm
Differential Revision: D2907600
Pulled By: nicklockwood
fb-gh-sync-id: 8406a045904a7ddb61fe1539a0474ec27b5e9e37