diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 74cf4829c698e4..7da24f09442644 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,6 +1,6 @@ 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.) +> **Unless you are a React Native release maintainer and cherry-picking an *existing* commit into a current release, ensure your pull request is targeting the `master` React Native branch.** Explain the **motivation** for making this change. What existing problem does the pull request solve? diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5208e8111d9889..d8e4cdc601c1c2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -21,7 +21,7 @@ Please submit your pull request on the *master* branch. If the fix is critical a 1. Fork the repo and create your branch from `master`. 2. **Describe your test plan in your commit.** If you've added code that should be tested, add tests! 3. If you've changed APIs, update the documentation. -4. If you've updated the docs, verify the website locally and submit screenshots if applicable +4. If you've updated the docs, verify the website locally and submit screenshots if applicable. ``` $ cd website diff --git a/website/core/Footer.js b/website/core/Footer.js new file mode 100644 index 00000000000000..516b178d64f3ff --- /dev/null +++ b/website/core/Footer.js @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule Footer + */ + +var React = require('React'); + +function getGitHubPath(path) { + return 'https://github.com/facebook/react-native/blob/master/' + path; +} + +var Footer = React.createClass({ + render: function() { + return ( +

+ You can edit the content above on GitHub and send us a pull request! +

+ ); + } +}); + +module.exports = Footer; diff --git a/website/core/HeaderWithGithub.js b/website/core/HeaderWithGithub.js index 601051c7e33b2a..c8e87770ceba8b 100644 --- a/website/core/HeaderWithGithub.js +++ b/website/core/HeaderWithGithub.js @@ -12,13 +12,8 @@ var H = require('Header'); var React = require('React'); -function getVersionedGithubPath(path, version) { - version = version || 'next'; - return [ - 'https://github.com/facebook/react-native/blob', - version === 'next' ? 'master' : version + '-stable', - path - ].join('/'); +function getGitHubPath(path) { + return 'https://github.com/facebook/react-native/blob/master/' + path; } var HeaderWithGithub = React.createClass({ @@ -40,7 +35,7 @@ var HeaderWithGithub = React.createClass({ + href={getGitHubPath(this.props.path)}> Edit on GitHub diff --git a/website/layout/AutodocsLayout.js b/website/layout/AutodocsLayout.js index ceebe4aca5488b..5c1340fc6e5dd7 100644 --- a/website/layout/AutodocsLayout.js +++ b/website/layout/AutodocsLayout.js @@ -12,9 +12,9 @@ 'use strict'; var DocsSidebar = require('DocsSidebar'); -var H = require('Header'); var Header = require('Header'); var HeaderWithGithub = require('HeaderWithGithub'); +var Footer = require('Footer'); var Marked = require('Marked'); var Prism = require('Prism'); var React = require('React'); @@ -327,7 +327,7 @@ var ComponentDoc = React.createClass({ } return ( - Methods +
Methods
{methods.filter((method) => { return method.name[0] !== '_'; @@ -358,7 +358,7 @@ var ComponentDoc = React.createClass({ } return ( - Type Definitions +
Type Definitions
{typedefs.map((typedef) => { return this.renderTypeDef(typedef, namedTypes); @@ -377,7 +377,7 @@ var ComponentDoc = React.createClass({ {content.description} - Props +
Props
{this.renderProps(content.props, content.composes)} {this.renderMethods(content.methods, namedTypes)} {this.renderTypeDefs(content.typedef, namedTypes)} @@ -409,7 +409,7 @@ var APIDoc = React.createClass({ } return ( - Methods +
Methods
{methods.filter((method) => { return method.name[0] !== '_'; @@ -443,7 +443,7 @@ var APIDoc = React.createClass({ } return ( - Properties +
Properties
{properties.filter((property) => { return property.name[0] !== '_'; @@ -504,7 +504,7 @@ var APIDoc = React.createClass({ } return ( - Type Definitions +
Type Definitions
{typedefs.map((typedef) => { return this.renderTypeDef(typedef, namedTypes); @@ -831,13 +831,11 @@ var Autodocs = React.createClass({ } return (
- +
Description
{docs.fullDescription} +
); }, @@ -872,7 +870,7 @@ var Autodocs = React.createClass({ return (
- {(docs.examples.length > 1) ? Examples : null} + {(docs.examples.length > 1) ?
Examples
: null} {docs.examples.map(example => this.renderExample(example, metadata))}
); @@ -891,12 +889,9 @@ var Autodocs = React.createClass({
- +
{metadata.title}
{content} +