Summary:
Just updating the docs as .18 is quite old :)
Closes https://github.com/facebook/react-native/pull/7824
Differential Revision: D3371417
Pulled By: javache
fbshipit-source-id: 91b8249f814eeef68cbeff4b481624644dc7be73
Summary:
Previously, only Text and Image could be nested within Text. Now, any
view can be nested within Text. One restriction of this feature is
that developers must give inline views a width and a height via
the style prop.
Previously, inline Images were supported by using iOS's built-in support
for rendering images with an NSAttributedString via NSTextAttachment.
However, NSAttributedString doesn't support rendering arbitrary views.
This change adds support for nesting views within Text by creating one
NSTextAttachment per inline view. The NSTextAttachments act as placeholders.
They are set to be the size of the corresponding view. After the text is
laid out, we query the text system to find out where it has positioned each
NSTextAttachment. We then position the views to be at those locations.
This commit also contains a change in `RCTShadowText.m`
`_setParagraphStyleOnAttributedString:heightOfTallestSubview:`. It now only sets
`lineHeight`, `textAlign`, and `writingDirection` when they've actua
Closes https://github.com/facebook/react-native/pull/7304
Reviewed By: javache
Differential Revision: D3365373
Pulled By: nicklockwood
fbshipit-source-id: 66d149eb80c5c6725311e1e46d7323eec086ce64
Summary:
The API for `ActivityIndiatorIOS` and `ProgressBarAndroid` is very similar and can be merged in a cross platform component that displays a circular indeterminate loading indicator.
This deprecates `ActivityIndiatorIOS` and non-horizontal `ProgressBarAndroid` in favor of this new component.
**Test plan (required)**
Tested with the ActivityIndicator example in UIExplorer on android and ios. Also made sure that `ActivityIndicatorIOS` still works and displays a deprecation warning. Also tested that `ProgressBarAndroid` with `indeterminate == true` and `styleAttr != 'Horizontal'` displays a deprecation warning.
Closes https://github.com/facebook/react-native/pull/6897
Differential Revision: D3351607
Pulled By: dmmiller
fbshipit-source-id: b107ce99d966359003e8b3118cd97b90fa1d3d7d
Summary:
Based on https://github.com/facebook/react-native/pull/7470, fixing the case when an existing Android app uses React Native as well as 3rd-party React Native modules.
With this PR Gradle should always pick up React Native binaries from node_modules rather than fetching old binaries from JCenter.
Closes https://github.com/facebook/react-native/pull/7759
Differential Revision: D3348640
fbshipit-source-id: 7509eb54bba6e59cf7f4a116bf444fc4983d2d33
Summary:
Currently XHR also supports Android platform, so document should include this information.
Closes https://github.com/facebook/react-native/pull/7729
Differential Revision: D3345168
fbshipit-source-id: 8dee7d573a47aede5dc5be97640fc711747df65c
Summary:
Fixing JSX tag in DirectManipulation section of the docs
Closes https://github.com/facebook/react-native/pull/7622
Differential Revision: D3321130
fbshipit-source-id: e315529dc94c88597e4855a63ba6931301d4dba7
Summary:
Right now, if you do a search and select a document in Getting Started, it will
always default to iOS/Mac. This adds a bit of JavaScript to do a best effort
selection based on the hashtags of the headers.
If a header is associated with multiple environments (e.g., Android Studio), we
just choose the first one. So it is not 100% perfect, but it is decent.
ref: https://github.com/facebook/react-native/issues/7574
** Test Plan **
Test locally by adding hash tags to the end of a doc URL and ensured that the toggler had the right
selection.
e.g., `http://localhost:8079/react-native/docs/getting-started.html#chocolatey` had `Android` and `Windows` chosen.
Closes https://github.com/facebook/react-native/pull/7608
Differential Revision: D3316802
Pulled By: JoelMarcey
fbshipit-source-id: 6e94d76725fb97b19b3708ddee8fba5df9350cdd
Summary:
Create the initial Core Components tutorial. The core components are `Text`, `Image`, `View`, `TextInput`, `ListView`.
1. Provide a summary for each core component, including a runnable sample.
2. Allow the tutorials for each component to be extended with more details and detailed examples, particularly after we add other tutorials (i.e., around state and props).
3. The samples should be runnable in a React Native simulator, if we can get that going in the docs.
4. Reorganize the docs sidebar to make the current Tutorial actually a Sample App, etc.
Closes https://github.com/facebook/react-native/pull/7593
Differential Revision: D3313563
Pulled By: JoelMarcey
fbshipit-source-id: cfe1d397d60822b8c531405d66b4e73694c7dbf9
Summary:
Previously, only Text and Image could be nested within Text. Now, any
view can be nested within Text. One restriction of this feature is
that developers must give inline views a width and a height via
the style prop.
Previously, inline Images were supported by using iOS's built-in support
for rendering images with an NSAttributedString via NSTextAttachment.
However, NSAttributedString doesn't support rendering arbitrary views.
This change adds support for nesting views within Text by creating one
NSTextAttachment per inline view. The NSTextAttachments act as placeholders.
They are set to be the size of the corresponding view. After the text is
laid out, we query the text system to find out where it has positioned each
NSTextAttachment. We then position the views to be at those locations.
This commit also contains a change in `RCTShadowText.m`
`_setParagraphStyleOnAttributedString:heightOfTallestSubview:`. It now only sets
`lineHeight`, `textAlign`, and `writingDirection` when they've actua
Closes https://github.com/facebook/react-native/pull/7304
Differential Revision: D3269333
Pulled By: nicklockwood
fbshipit-source-id: 2b59f1c5445a4012f9c29df9f10f5010060ea517
Summary:
Motivation: Fix the documentation so that others don't stumble.
**Test plan**: Integrating RN into an existing Android app doesn't cause the `ConnectivityManagerCompat` exception anymore.
---
The instructions where still pointing at maven central. This updates the dependency and provides instructions on how to reference the local maven folder in `node_modules`.
Closes https://github.com/facebook/react-native/pull/7586
Differential Revision: D3309932
fbshipit-source-id: 8e4fc4c0ae5641af886c9d9a0feb1c8172e94fcf
Summary:
1. Remove note about upgrading Homebrew packages. That was kind of noisy.
2. Use local images instead of those stored on Akamai.
3. Add wording for modifying test project about actually opening a file.
4. Add note about keeping initial defaults for Android Studio install in tact.
Tested site locally. Images and new wording appeared as expected.
Closes https://github.com/facebook/react-native/pull/7477
Reviewed By: vjeux
Differential Revision: D3281639
Pulled By: JoelMarcey
fbshipit-source-id: ca956d97293ac3793431cb54f3560ee3e52c0dce
Summary:
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:
(You can skip this if you're fixing a typo or adding an app to the Showcase.)
Explain the **motivation** for making this change. What existing problem does the pull request solve?
Prefer **small pull requests**. These are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.
**Test plan (required)**
Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI.
Make sure tests pass on both Travis and Circle CI.
**Code formatting**
Look around. Match the style of the rest of the codebase. See also the simple [style guide](https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md#style-guide).
For more info, see the ["Pull Requests" section of our "Contributing" guidelines](https://github.com/facebook/react-native/blob/mas
Closes https://github.com/facebook/react-native/pull/7485
Differential Revision: D3281418
Pulled By: vjeux
fbshipit-source-id: 287b66f1ed9690bf488cf646f8eaf02e2956caa5
Summary:
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:
(You can skip this if you're fixing a typo or adding an app to the Showcase.)
Explain the **motivation** for making this change. What existing problem does the pull request solve?
Prefer **small pull requests**. These are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.
**Test plan (required)**
Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI.
Make sure tests pass on both Travis and Circle CI.
**Code formatting**
Look around. Match the style of the rest of the codebase. See also the simple [style guide](https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md#style-guide).
For more info, see the ["Pull Requests" section of our "Contributing" guidelines](https://github.com/facebook/react-native/blob/mas
Closes https://github.com/facebook/react-native/pull/7471
Differential Revision: D3276360
Pulled By: JoelMarcey
fb-gh-sync-id: 30edd7086a3c4b88695dc91af76ef56d43306ce9
fbshipit-source-id: 30edd7086a3c4b88695dc91af76ef56d43306ce9
Summary:
Hi,
The [commit](156d3ed7a2?_pjax=%23js-repo-pjax-container) by JoelMarcey is much appreciated. However, when you click on the nav buttons in Firefox (v46.0.1, I'm on El-Capitan), it will switch the content but also navigate you to the React-Native homepage. This doesn't happen in Chrome, so that's how it probably slipped through.
I propose these changes to fix that.
**Test plan**
Tested locally on FF and Chrome on El-Capitan
Closes https://github.com/facebook/react-native/pull/7435
Differential Revision: D3276285
Pulled By: vjeux
fb-gh-sync-id: c9a14059e609297fe273d02fe6c0a5f98ec7060c
fbshipit-source-id: c9a14059e609297fe273d02fe6c0a5f98ec7060c
Summary:
This simplifies the Quick Start section of the React Native documentation into
two pages. A Getting Started and a Tutorial.
The Getting Started page uses some CSS and Javascript magic (thanks vjeux for
the initial infra for this!!) to allow selection between platforms and have
instructions for Getting Started with React Native be shown according to the
selection -- all within the same page, realtime. A much cleaner interface.
I have made a pretty large presentation and information overhaul for each
platform as well. For example, requiring Android Studio for Android
development to make the Android SDK and build tools installation easier.
I added more screenshots to the Android sections since they are more complicated
than the more straightforward iOS. Screenshots for Android for Windows, Linux and
iOS are available now.
Some of the other pages such as `GettingStartedOnLinux` are now obsolete and deleted.
** Test Plan **
Tested locally and navigation works.
Closes https://github.com/facebook/react-native/pull/7418
Differential Revision: D3268621
Pulled By: vjeux
fb-gh-sync-id: 65f9181c9f959fadeffd254efddc5b64816eb1f4
fbshipit-source-id: 65f9181c9f959fadeffd254efddc5b64816eb1f4
Summary:
This simplifies the Quick Start section of the React Native documentation into
two pages. A Getting Started and a Tutorial.
The Getting Started page uses some CSS and Javascript magic (thanks @vjeux for
the initial infra for this!!) to allow selection between platforms and have
instructions for Getting Started with React Native be shown according to the
selection -- all within the same page, realtime. A much cleaner interface.
I have made a pretty large presentation and information overhaul for each
platform as well. For example, requiring Android Studio for Android
development to make the Android SDK and build tools installation easier.
I added more screenshots to the Android sections since they are more complicated
than the more straightforward iOS. Screenshots for Android for Windows, Linux and
iOS are available now.
Some of the other pages such as `GettingStartedOnLinux` are now obsolete and deleted.
Test Plan:
Video demo (it's a 1m20s or so, peruse at your pace): https://www.facebook.com/pxlcld/nKW3
Inspection
Reviewers: lacker, bestander, mkonicek, vjeux
Reviewed By: vjeux
Subscribers: cdykes, vjeux, mjohnston, sema, balpert, tomocchino, hramos, caabernathy, jpearce
Differential Revision: https://phabricator.intern.facebook.com/D3265822
Signature: t1:3265822:1462479878:5453ec81808b59fd71c288b6cc79268fccd921bc
Summary:
Debugging tools won't work if you're using a custom configuration and Cocoapods and didn't specify the configuration to be a `debug` configuration using the `xcodeproj` setting in your Podfile. When integrating React Native into an existing Xcode project, this is a common situation to encounter.
See https://github.com/facebook/react-native/issues/2246#issuecomment-217187621
Closes https://github.com/facebook/react-native/pull/7407
Differential Revision: D3268032
fb-gh-sync-id: f46c4a1f927128fd34c2f8ce4be4c275468f2355
fbshipit-source-id: f46c4a1f927128fd34c2f8ce4be4c275468f2355
Summary:
Just a simple word repetition fix in docs.
Closes https://github.com/facebook/react-native/pull/7352
Differential Revision: D3257587
fb-gh-sync-id: a54f38f3bbed9b50cb9c1f8a35d5718bad3deb33
fbshipit-source-id: a54f38f3bbed9b50cb9c1f8a35d5718bad3deb33
Summary:
* Copy-pasting into a terminal _can_ be dangerous. [See this](https://thejh.net/misc/website-terminal-copy-paste). Thus I've changed "paste" to "type". People are probably going to do this anyway but there is not need to suggest copy-pasting `sudo`commands.
* `sudo` is not required to do a global npm install (of course you can do it). Thus I've removed the "sudo" for the flow install command. This is consistent with the general getting started page where `sudo` isn't used in front of `npm install -g` either.
Closes https://github.com/facebook/react-native/pull/7330
Differential Revision: D3252286
fb-gh-sync-id: 7d4580b6bf828e4a833e02365045f3bb9276cfef
fbshipit-source-id: 7d4580b6bf828e4a833e02365045f3bb9276cfef
Summary:
Doc changes only. Updating example code to reflect the new requirements discussed in this [issue](https://github.com/facebook/react-native/issues/4605).
In short, in the JS code that registers your new native view, you need to explicitly include the `propTypes` that come default for views or else you get an error.
Closes https://github.com/facebook/react-native/pull/7281
Differential Revision: D3240654
Pulled By: mkonicek
fb-gh-sync-id: f7571ce7435c5b241a17af2822e7e350ce3186cb
fbshipit-source-id: f7571ce7435c5b241a17af2822e7e350ce3186cb
Summary:
Documentation on iOS about triggering events from native components was outdated.
Let me know what you think.
Closes https://github.com/facebook/react-native/pull/6739
Differential Revision: D3240665
Pulled By: mkonicek
fb-gh-sync-id: f62d52bebd58aae6f93388734338ef74ae536ec5
fbshipit-source-id: f62d52bebd58aae6f93388734338ef74ae536ec5
Summary:
This is a documentation-only change: currently the docs imply that nested text formatting only works on iOS (via `NSAttributedString`). But the code (and my tests!) indicate it also works fine on Android via `SpannableString`, so clarify this in the documentation for the `Text` component.
Closes https://github.com/facebook/react-native/pull/7215
Differential Revision: D3223732
fb-gh-sync-id: 4e796e493ba6c48f05b812a12761ddb3851e06e1
fbshipit-source-id: 4e796e493ba6c48f05b812a12761ddb3851e06e1
Summary:
Kudos to frantic for this amazing idea! Works really well (yet so simple!)
Basically we had a discussion with vjeux and frantic and others in the PR #7033 how to handle platform-specific stylesheets in a similar to F8 app way.
There were quite a few nice ideas there, however that one seems to be the smallest yet the most powerful.
Basically there's a `Platform.select` method that given an object, will select a `obj[Platform.OS]` value.
It works with styles:
`Platform.select({ ios: {}, android: {} })`
with messages:
`<Text>{Platform.select({ ios: 'Check the App Store', android: 'Check Google Play' })}</Text>`
and also works well with components (similar to Wallmart idea of <PlatformSwitch />) - relevant example included in diff.
Closes https://github.com/facebook/react-native/pull/7220
Differential Revision: D3221709
Pulled By: vjeux
fb-gh-sync-id: 0a50071f2dcf2273198bc6e2c36e19bca97d7be9
fbshipit-source-id: 0a50071f2dcf2273198bc6e2c36e19bca97d7be9
Summary:Fixes #7131
I believe it's easier if we just link to this file so it's less confusing what to edit actually. I was originally thinking about linking to specific line, but that will be hard to keep in sync.
Closes https://github.com/facebook/react-native/pull/7139
Differential Revision: D3212912
Pulled By: mkonicek
fb-gh-sync-id: 4f272d8bc922b273b961707d9ebf18a3efda31be
fbshipit-source-id: 4f272d8bc922b273b961707d9ebf18a3efda31be
Summary:As mentioned in #7121 by javache, this can already be disabled. Might be useful if users upgrade to 0.25 and want to hide warnings about wrong React imported (something they can't really control until community upgrades).
This should be mentioned in the release notes once it's merged.
Closes https://github.com/facebook/react-native/pull/7140
Differential Revision: D3212212
fb-gh-sync-id: 7a7afa2b7925e16d6ebfd20f4fe26d1cb9d603e5
fbshipit-source-id: 7a7afa2b7925e16d6ebfd20f4fe26d1cb9d603e5
Summary:**Motivation:** I don't like storing credentials in config files and a safer solution is to store them in the Keychain Access app.
Therefore I added a link that describes how one may go about to store the passwords in the Keychain Access app in OSX instead.
Found a [stackoverflow post](http://stackoverflow.com/a/24480579/1836121) but it wasn't very detailed so I decided to write it up myself. I understand if you have some policy against external links to blogs and I guess we could link to the stackoverflow explanation then instead.
Closes https://github.com/facebook/react-native/pull/7089
Differential Revision: D3207215
fb-gh-sync-id: 8011b55efe41ec6d54ad665e0e6a79cb9d806779
fbshipit-source-id: 8011b55efe41ec6d54ad665e0e6a79cb9d806779
Summary:Earlier on in the tutorial it was recommended to pull in mock data from Github instead of making Rotten Tomato API calls, this change will update the final code to match the rest of the tutorial.
Closes https://github.com/facebook/react-native/pull/7025
Differential Revision: D3190334
fb-gh-sync-id: e699f756d81d0436bac6a4938d54fcaada5d878c
fbshipit-source-id: e699f756d81d0436bac6a4938d54fcaada5d878c