Summary:
Nothing about the web prevents people from providing good visual feedback on touch events. I'm not trying to be a punk, just coming across this language (several times now) gives me weird feelings since I come from "the web".
Closes https://github.com/facebook/react-native/pull/12484
Differential Revision: D4608430
Pulled By: hramos
fbshipit-source-id: 9ab72bffb300aa7bd76b6e07470dfe9763e50556
Summary:
Created a containerized environment to run unit and integration tests for both javascript and android as well as a Jenkinsfile using the new 2.0 Pipeline syntax for integration into a Jenkins CI cluster.
Here is a quick summary of the changes:
* The android image is built from two separate dockerfiles. There is a base image that handles the heavy lifting of dependencies that are infrequently changed while the secondary image extends the base and allows for much quicker incremental builds on code updates.
* The javascript image is simple and is relatively quick to build, therefore there is no base image for any react specific javascript dependencies and it is all packaged in a single docker image.
* A new `scripts/docker` has been created including some javascript files and shell scripts to aid in the running of the tests
* The instrumentation test runner script can be passed various flags to control which tests run since the entire suite takes a significant amount of time to run synchronously
* Jen
Closes https://github.com/facebook/react-native/pull/11902
Differential Revision: D4609238
Pulled By: ericvicenti
fbshipit-source-id: a317f3ac3be898180b009254a9604ca7d579a8b9
Summary:
Fix Apple TV breakage. This should allow scripts/objc-test-tvos.sh to run normally.
Closes https://github.com/facebook/react-native/pull/12565
Differential Revision: D4612182
Pulled By: hramos
fbshipit-source-id: 77fd3eeabc6757b23e4f5efbd46e9948b61b1ab6
Summary:
This decouples non-UI logic from RCTDevMenu into a new module RCTDevSettings.
**Motivation**: This allows developers to change dev settings without depending on the built-in dev menu, e.g. if they want to introduce their own UI, or have other devtools logic that doesn't depend on an action sheet.
It also introduces the RCTDevSettingsDataSource protocol for storing dev tools preferences. This could allow a developer to implement alternative behaviors, e.g. loading the settings from some other config, changing settings based on the user, deciding not to persist some settings, or something else.
The included data source implementation, RCTDevSettingsUserDefaultsDataSource, uses NSUserDefaults and is backwards compatible with the older implementation, so **no workflows or dependent code will break, and old saved settings will persist.**
The RCTDevMenu interface has not changed and is therefore also backwards-compatible, though
some methods are now deprecated.
In order to ensure that RCTDevSettings
Closes https://github.com/facebook/react-native/pull/11613
Reviewed By: mmmulani
Differential Revision: D4571773
Pulled By: javache
fbshipit-source-id: 25555d0a6eaa81f694343e079ed02439e5845fbc
Summary:
This PR will:
- add missing documentation for `caretHidden` prop to the docs
- add `caretHidden` prop implementation for Android
I noticed this by accident when looking at `RCTTextFieldManager.m` and there is `RCT_EXPORT_VIEW_PROPERTY(caretHidden, BOOL)` which hides caret on iOS. Then I realised that the docs were missing for this prop and implementation on Android side :)
Render `TextInput` with prop `caretHidden`. After this caret is not visible anymore.
`<TextInput style={styles.input} caretHidden />`
If you omit the prop then caret is visible again
`<TextInput style={styles.input} />`
Closes https://github.com/facebook/react-native/pull/11863
Differential Revision: D4448402
fbshipit-source-id: 456e1df3e2cbb8af32540d2c7a8f4e7da219f5c3
Summary:
When creating Native UI Component per docs, it results in duplicate symbols error as explained in issue #12404
Instead of using RCT prefix, it is suggested to use RN prefix to avoid any duplicate symbols.
Closes https://github.com/facebook/react-native/pull/12523
Differential Revision: D4608532
Pulled By: hramos
fbshipit-source-id: 353cfee4bf2cea30706863af51cabe11e9394222
Summary:
**Motivation**:
The `CameraRoll.getPhotos()` documentation is lacking, I've simply exposed the shapes of the params object and returned object, as defined and documented in `getPhotosParamChecker` and `getPhotosReturnChecker`.
**Test plan**:
Built the website and checked the documentation.
Closes https://github.com/facebook/react-native/pull/12524
Differential Revision: D4608419
Pulled By: hramos
fbshipit-source-id: 887d32b32312a492e57bf65fca503891de0bd661
Summary:
Just a little nit pick to add extra information to this doc. I spent a few hours trying to fix this problem because I had not placed the code in build.gradle correctly. I think this small addition would be useful to others.
Closes https://github.com/facebook/react-native/pull/12475
Differential Revision: D4608443
Pulled By: hramos
fbshipit-source-id: eb719d5cf9d905c4f043ec71f1a3e28e0219626e
Summary:
I guess we could ask Håkon Wium Lie if indeed it was unintended to have a set of rules be inherited or not, but this paragraph is a little bit weird 🤷♀️
Closes https://github.com/facebook/react-native/pull/12485
Differential Revision: D4608425
Pulled By: hramos
fbshipit-source-id: a346b1e65c9fc7b06634e529c1ef6f9e24794cca
Summary:
> Explain the **motivation** for making this change. What existing problem does the pull request solve?
I was reading the documentation and noticed this broken link.
Closes https://github.com/facebook/react-native/pull/12535
Differential Revision: D4608413
Pulled By: hramos
fbshipit-source-id: 5d3edfaf4e5c16f42a50e203b979b90afe101954
Summary: Update the props to allow not passing in an onScroll callback
Reviewed By: zjj010104
Differential Revision: D4604474
fbshipit-source-id: 9371776d1451f7bd0247fbafaf4bf7198291d1b1
Summary:
Just a small fix: change css-layout in LayoutPropTypes to Yoga.
Closes https://github.com/facebook/react-native/pull/12509
Differential Revision: D4606716
fbshipit-source-id: c4f6c05c50d241c988604137fd12086d8a1ffb94
Summary:
These are not modules and don't need a `providesModule` annotation.
`sed -i -e '/providesModule/d' packager/src/Resolver/polyfills/*.js`
Reviewed By: cpojer
Differential Revision: D4605374
fbshipit-source-id: 5045a9664bc105dab15936f408d373da8d9322fe
Summary:
Fix for #413. This was a hangover from a previous attept to fix other align-content problems.
Closes https://github.com/facebook/yoga/pull/417
Reviewed By: astreet
Differential Revision: D4604727
Pulled By: emilsjolander
fbshipit-source-id: 92fd31a385d8182c6b201c891d5ae478372d525d
Summary:
HTTP request URLs don’t include protocol, host and port. Stack frames URLs, on the other hand, contain full URLs. These full URLs are used to get the correct bundle to build the source map from.
The method that creates option objects from URLs therefore now discards leading protocol, host and port to ensure that cached bundles can be reused for symbolication rather than triggering rebuilds.
Reviewed By: jeanlauliac, cpojer
Differential Revision: D4598077
fbshipit-source-id: 262df187bcdf7099011371e8b55ae692c6e1a942
Summary:
In the .flowconfig in the starter project, we're missing the correct suppression comments.
This should fix the flow issues in the e2e tests.
Closes https://github.com/facebook/react-native/pull/12533
Differential Revision: D4603657
Pulled By: ericvicenti
fbshipit-source-id: a07ec947d3ba746279c58e2d95c2293f54e06933
Summary:
When a touch responder gets unmounted, it can still get events dispatched to it.
We used to ignore those errors but in the new model we read the props instead of the event listener bank. The props still exist after unmount.
Instead, I check that the rootNodeID is still set since this gets reset during unmount.
Reviewed By: spicyj, bvaughn
Differential Revision: D4597127
fbshipit-source-id: b405e4ef1bcb14970be76d9ab7203cebf1f4d6c9
Summary:
The actual badgeColor prop causes the following error when run on device with a version inferior to iOS 10 like iPad 2 and iPad mini 1.
`*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UITabBarItem setBadgeColor:]: unrecognized selector sent to instance 0x7968be80'`
This PR fixes it by checking at runtime if the selector is available for the current running version.
It also makes the color available at start by using the variable `self.barItem`. Currently, the color appears only after a reload.
Closes https://github.com/facebook/react-native/pull/12354
Differential Revision: D4598036
Pulled By: shergin
fbshipit-source-id: 9f104fc27db51213a54273e33c5a22f1b350c55e
Summary:
I extracted all the dependencies (using jest-haste-map) and copied them from the package.json in react-native to RNP. There is some duplication here for now but we can later go back and remove the duplicated dependencies from react-native that aren't needed there.
I also removed a mock file that hasn't been in use for a long time.
Reviewed By: jeanlauliac
Differential Revision: D4598155
fbshipit-source-id: 850b6dfa6fc2eec138ebdd7208cd34bee21f7927
Summary:
In some cases, the accessibilityLabel contains a leading space. This is because `RCTRecursiveAccessibilityLabel` adds a space before every iteration of the loop including the first.
After this change, the contract is that:
- `RCTRecursiveAccessibilityLabel` always returns a string with a leading space.
- `accessibilityLabel` never returns a string with a leading space.
**Test plan**
I created a test app with the following code:
```
<View style={{height: 100, width: 100, backgroundColor: 'steelblue'}} accessible={true}>
<View style={{height: 20, width: 20, backgroundColor: 'red'}} accessibilityLabel='One' />
<View style={{height: 20, width: 20, backgroundColor: 'yellow'}} accessibilityLabel='Two' />
<View style={{height: 20, width: 20, backgroundColor: 'green'}} accessibilityLabel='Three' />
</View>
```
Before this change, the accessibilityLabel of the outermost View was " One Two Three" (notice the leading space).
After this change, it is "One Two Three" as desired.
Adam
Closes https://github.com/facebook/react-native/pull/12269
Reviewed By: javache
Differential Revision: D4596761
Pulled By: shergin
fbshipit-source-id: 7d5ff704e858d9f277d1547339a2831ffa90f592
Summary:
Developers are complaining about horrible lag (https://github.com/facebook/react-native/issues/11809) caused by PR https://github.com/facebook/react-native/pull/11222.
The issue was that hasNewLayout in yoga is actually a dirty bit and indicates that either you OR one of your children has a new layout. We still need to manually check whether the component's layout actually is different from before.
Reviewed By: sahrens
Differential Revision: D4597545
fbshipit-source-id: 27d4605afd00badfdcdacae740ee2e477adee929
Summary: This temporarily fixes redbox when using Inspector before Fiber is fully ready.
Reviewed By: sebmarkbage
Differential Revision: D4593324
fbshipit-source-id: 287df97f5ecf30c15890f7f7bca4646421bb41c8
Summary:
118e88393e broke autodoc generation because autodoc isn't smart enough to understand some patterns.
I'm working around it by using the same trick as this file was using previously: reassigning the class variable.
Similarly, using a property initializer produces bad output so I had to remove it:
<img width="146" alt="screen shot 2017-02-20 at 19 00 36" src="https://cloud.githubusercontent.com/assets/810438/23138561/09ebb476-f7a0-11e6-8fad-92c5a01503c3.png">
cc ericnakagawa mkonicek for review
Closes https://github.com/facebook/react-native/pull/12479
Differential Revision: D4591285
Pulled By: gaearon
fbshipit-source-id: 5884620a08874298b1b2c810e8fb769eba4e1199