Summary:
Several changes here. The `Text.md` and `PixelRatio.md` files were appended to the autodocs during site generation. This seemed excessive for just two files, so I've just merged the content into the autodocs themselves. It should help us simplify the website generation process in the future.
I've also merged IssueGuidelines.md and PullRequestGuidelines.md into the Contribution/Maintainers guidelines to improve their visibility.
Finally, I renamed Help to Community in the nav bar.
Ran the website locally, and verified every page rendered as expected: the Community page, Contributing page, Maintainers page.
Closes https://github.com/facebook/react-native/pull/15374
Differential Revision: D5567400
Pulled By: hramos
fbshipit-source-id: e06056edb12c9a17319fe1af46b2ef3a2e1b5854
Summary:
I added troubleshooting docs for connection to the development server from device, otherwise it's maybe hard to find out why it's not working.
Due to a disparity in what GitHub's API return the original PR (https://github.com/facebook/react-native/pull/14885) couldn't get imported, so I created a new PR as hramos suggested.
Closes https://github.com/facebook/react-native/pull/15304
Differential Revision: D5537615
Pulled By: hramos
fbshipit-source-id: b94e887b1b771be9e93854124bd0a56b27fd0097
Summary:
Adds a new maintainers guide, and updates the contributor's guide to be consistent with regards to this new guide.
Some additional style changes made in order to support the display of bot commands. Changed the wording for the "Edit this page on GitHub" link.
Finally, the contributor's guide is now synced to `CONTRIBUTING.md` on the repo.
```
cd website && npm start
```
Verify that `CONTRIBUTING.md` is updated whenever the website is regenerated.
Verify everything rendered correctly. Expand the details below to see screenshots.
<details>
![screencapture-localhost-8079-react-native-docs-contributing-html-1501016495792](https://user-images.githubusercontent.com/165856/28593706-33d1e03c-7142-11e7-9878-04ead7561abc.png)
![screencapture-localhost-8079-react-native-docs-maintainers-html-1501016508744](https://user-images.githubusercontent.com/165856/28593719-3812d7fa-7142-11e7-9db2-f9599057d726.png)
</details>
Closes https://github.com/facebook/react-native/pull/15202
Differential Revision: D5494246
Pulled By: hramos
fbshipit-source-id: e28d5624d1e4795e212f10e8d5713d91a0eae15f
Summary: We're focusing the React Native core on a set of high quality essential components and will be removing any modules that do not belong in that set. If you're currently using AdSuppportIOS, it will remain available in the react-native-deprecated-modules archive. There's also alternative implementations such as https://github.com/ptomasroos/react-native-idfa/.
Reviewed By: hramos
Differential Revision: D5388632
fbshipit-source-id: ce6204512b61242a0ba8c731836f3b3b7239b4b0
Summary:
Fixed#12327
- Run the website locally
- Navigate to: http://localhost:8079/react-native/docs/statusbar.html
- Click the StatusBarAnimation and the StatusBarStyle in the Method section
- The links will now go to the correct in page anchor tags instead of the getting started page
The `website/layout/*.js` files could use some serious love. I would really like the opportunity to do that with the react team I run. Let me know :)
Closes https://github.com/facebook/react-native/pull/14028
Differential Revision: D5478418
Pulled By: hramos
fbshipit-source-id: b565847da3c280466ed088fd820b5bfe0474bba0
Summary:
It's very important in complex UIs to be able to apply alpha channel-based masks to arbitrary content. Common use cases include adding gradient masks at the top or bottom of scroll views, creating masked text effects, feathering images, and generally just masking views while still allowing transparency of those views.
The original motivation for creating this component stemmed from work on `react-navigation`. As I tried to mimic behavior in the native iOS header, I needed to be able to achieve the effect pictured here (this is a screenshot from a native iOS application):
![iOS native navbar animation](https://slack-imgs.com/?c=1&url=https%3A%2F%2Fd3vv6lp55qjaqc.cloudfront.net%2Fitems%2F0N3g1Q3H423P3m1c1z3E%2FScreen%2520Shot%25202017-07-06%2520at%252011.57.29%2520AM.png)
In this image, there are two masks:
- A mask on the back button chevron
- A gradient mask on the right button
In addition, the underlying view in the navigation bar is intended to be a UIBlurView. Thus, alpha masking is the only way to achieve this effect.
Behind the scenes, the `maskView` property on `UIView` is used. This is a shortcut to setting the mask on the CALayer directly.
This gives us the ability to mask any view with any other view. While building this component (and testing in the context of an Expo app), I was able to use a `GLView` (a view that renders an OpenGL context) to mask a `Video` component!
I chose to implement this only on iOS right now, as the Android implementation is a) significantly more complicated and b) will most likely not be as performant (especially when trying to mask more complex views).
Review the `<MaskedViewIOS>` section in the RNTester app, observe that views are masked appropriately.
![example](https://d3vv6lp55qjaqc.cloudfront.net/items/250X092v2k3f212f3O16/Screen%20Recording%202017-07-07%20at%2012.18%20PM.gif?X-CloudApp-Visitor-Id=abb33b3e3769bbe2f7b26d13dc5d1442&v=5f9e2d4c)
Closes https://github.com/facebook/react-native/pull/14898
Differential Revision: D5398721
Pulled By: javache
fbshipit-source-id: 343af874e2d664541aca1fefe922cf7d82aea701
Summary:
A couple of npm dependencies are unused (grepped for them or their variants since some are Babel presets/plugins) and there were also some missing that are listed in react-native's package.json but are directly required by the website.
Closes https://github.com/facebook/react-native/pull/14880
Differential Revision: D5383816
Pulled By: hramos
fbshipit-source-id: 704cea500d92542078fddbb8777e6855d70e4659
Summary:
This replaces all uses of `React.createClass` with `createReactClass` from the `create-react-class` package, attempting to match use of `var` and `const` according to local style.
Fixes#14620
Refs #14712
Closes https://github.com/facebook/react-native/pull/14729
Differential Revision: D5321810
Pulled By: hramos
fbshipit-source-id: ae7b40640b2773fd89c3fb727ec87f688bebf585
Summary:
Fixes#14566, as suggested by hramos. Only change from our convo is that I set the height to 180 in this pull request instead of 240. This to respect the aspect ratio of the source image.
- run website, visit in browser, verify that second example code section renders correctly
- copy and paste example code of second example into the App.js of a freshly created react native app
- prepend "export default" to line 4 of the pasted code
- run the app for ios or android (npm start ios)
- verify that the image of that terrible high-five actually renders in the app now
Closes https://github.com/facebook/react-native/pull/14571
Differential Revision: D5330093
Pulled By: hramos
fbshipit-source-id: a0afcd16d07ac25080af41f9619df0703f11b152
Summary:
Consolidate tips on CONTRIBUTING.md, and reduce the wall of text when opening a new issue. Hoping this will encourage more people to read through the text.
Closes https://github.com/facebook/react-native/pull/14518
Differential Revision: D5250443
Pulled By: hramos
fbshipit-source-id: 91213c4ceca12225d9f54d1e1e81e020c6e463b3
Summary:
Finally, a place where `Button` is properly introduced. This is based on the old Handling Touches guide, which has been simplified (with some content moved over to the scroll views tutorial).
I've also updated the ordering of the guides into something that makes more sense to someone just getting started with React Native.
Closes https://github.com/facebook/react-native/pull/14371
Differential Revision: D5201127
Pulled By: hramos
fbshipit-source-id: 819192e2db9febb8a315f51693dae557752b6002
Summary:
The current website defaults to using JavaScript for any code block, regardless of language tag. This PR adds syntax highlighting support by passing the necessary language prop and by adding any missing languages to Marked.js.
Depends on #14212, #14065
Closes https://github.com/facebook/react-native/pull/14215
Differential Revision: D5149897
Pulled By: hramos
fbshipit-source-id: 95a817af2168d5743c75dd1ac030d399a68fb93c
Summary:
Restored the version lag caveat in the Getting Started, and updated the Upgrading guide to account for CRNA.
Additionally, updated the release versions page to account for the new release cycle (e.g. release candidates are encouraged).
Closes https://github.com/facebook/react-native/pull/14112
Differential Revision: D5112224
Pulled By: hramos
fbshipit-source-id: d544c5178484c27f1ed6dee3479bcd94e5e81982
Summary:
There are two ways to get started with React Native: using CRNA, or by building native code. The latter requires a set of dependencies that also need to be installed even by people who use CRNA if they have ejected.
There needs to be a clear demarcation between the two approaches as well as clear instructions as to which steps are of interest to CRNA using parties or people adding RN to an existing app.
Separating the two approaches entirely by using tabs can achieve this purpose.
Built and tested the website on Chrome on macOS. Have not yet tested other browsers or OS configurations.
![screencapture-localhost-8079-react-native-docs-getting-started-html-1494974542733](https://cloud.githubusercontent.com/assets/165856/26131374/77258b0c-3a4e-11e7-9a17-074610ca33d1.png)
![screencapture-localhost-8079-react-native-docs-getting-started-html-1494974580882](https://cloud.githubusercontent.com/assets/165856/26131370/73806990-3a4e-11e7-9e67-73c519b050da.png)
This is a work in progress. Feedback is appreciated. I am not yet happy with the different sets of tabs/buttons, for example.
Closes https://github.com/facebook/react-native/pull/14005
Differential Revision: D5096426
Pulled By: hramos
fbshipit-source-id: cdbf19b148ec87f2f2dfdced345084d0bbff4c26
Summary:
Clarified some steps unique to the Windows installer.
Closes https://github.com/facebook/react-native/pull/13983
Differential Revision: D5065884
Pulled By: hramos
fbshipit-source-id: ab47ad7e7fcf10f8b44ab209807d661c465b76a3
Summary:
My changes in https://github.com/facebook/react-native/pull/13707 assumed RN website works the same way as React website, but this assumption was wrong, so I added invalid markup.
This fixes it, and also moves the images into the website folder so we don't depend on random CDNs.
Closes https://github.com/facebook/react-native/pull/13844
Differential Revision: D5019956
Pulled By: gaearon
fbshipit-source-id: bec40d70997231a73d3ef67c82386bc1bb202d7b
Summary:
These examples used to be part of the UIExplorer app, which will be renamed to RNTester in #13606. These bits of code have not been treated as examples for a long time, and are actually part of our testing infra. Let's remove them altogether from the API/Components docs.
Closes https://github.com/facebook/react-native/pull/13664
Differential Revision: D4960725
Pulled By: hramos
fbshipit-source-id: a4ec19b81d992aff89c0c93e35a1b80fbbd5e454
Summary:
These examples work sporadically, and are all based on a years-old build of UIExplorer that was once uploaded to Appetize. As a result, newer APIs such as FlatList are not supported and attempting to run their associated examples will result in an error.
<img width="526" alt="screen shot 2017-04-24 at 12 21 31 pm" src="https://cloud.githubusercontent.com/assets/165856/25348155/57016f4a-28eb-11e7-92b0-a918ef1a0e5c.png">
This PR removes the prompts to run the examples.
See #13644 for exploration into using `<SnackPlayer>` for these.
Fixes#12300
Closes https://github.com/facebook/react-native/pull/13644
Differential Revision: D4939653
Pulled By: hramos
fbshipit-source-id: 11cf564d2ceb1981d3ce700aaae40dc873b183ad
Summary:
**Motivation**
Website generation is broken unless prop-types is added as a dependency.
**Test plan**
This fixes website generation in existing Circle CI tests.
Closes https://github.com/facebook/react-native/pull/13498
Differential Revision: D4888859
Pulled By: bvaughn
fbshipit-source-id: d43afbf3b56c189e723e5628e169947ed5dbacd8