Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] Additional markdown adjustments #16759

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,17 +239,22 @@ jobs:
command: |
cd website
npm install --no-package-lock --no-spin --no-progress
# The CIRCLE_PROJECT_USERNAME and CIRCLE_PR_USERNAME checks below
# ensure deploys only happen on projects owned by "facebook",
# never on a forked PR build.
- run:
name: Build and Deploy Static Website
command: |
if [[ $CIRCLE_PROJECT_USERNAME == "facebook" && -z $CI_PULL_REQUEST && -z $CIRCLE_PR_USERNAME ]]; then
if [[ $CIRCLE_PROJECT_USERNAME == "facebook" && -z $CIRCLE_PR_USERNAME ]]; then
git config --global user.email "reactjs-bot@users.noreply.github.com"
git config --global user.name "Website Deployment Script"
echo "machine github.com login reactjs-bot password $GITHUB_TOKEN" > ~/.netrc
echo "Deploying website..."
cd website && GIT_USER=reactjs-bot npm run gh-pages
elif [[ -n $CIRCLE_PR_USERNAME ]]; then
echo "Skipping website deploy, this is a forked PR build."
else
echo "Skipping deploy."
echo "Skipping website deploy."
fi

# Build JavaScript bundle for Android tests
Expand Down Expand Up @@ -438,10 +443,12 @@ jobs:
- checkout
- restore-cache: *restore-cache-analysis
- run: *install-node-dependencies
# The CIRCLE_PR_NUMBER checks below ensure
# code analysis only runs on forked PR builds.
- run:
name: Install Dependencies
command: |
if [ -n "$CIRCLE_PULL_REQUEST" ]; then
if [ -n "$CIRCLE_PR_NUMBER" ]; then
npm install github@0.2.4
cd danger
npm install --no-package-lock --no-spin --no-progress
Expand All @@ -453,17 +460,17 @@ jobs:
- run:
name: Analyze Pull Request
command: |
if [ -n "$CIRCLE_PULL_REQUEST" ]; then
if [ -n "$CIRCLE_PR_NUMBER" ]; then
cd danger && DANGER_GITHUB_API_TOKEN="e622517d9f1136ea8900""07c6373666312cdfaa69" npm run danger
else
echo "Skipping pull request analysis."
fi
when: always
# Run eslint
# Run eslint
- run:
name: Analyze Code
command: |
if [ -n "$CIRCLE_PULL_REQUEST" ]; then
if [ -n "$CIRCLE_PR_NUMBER" && -n "$CIRCLE_PROJECT_USERNAME" && -n "$CIRCLE_PROJECT_REPONAME" ]; then
cat <(echo eslint; npm run lint --silent -- --format=json; echo flow; npm run flow --silent -- check --json) | GITHUB_TOKEN="af6ef0d15709bc91d""06a6217a5a826a226fb57b7" CI_USER=$CIRCLE_PROJECT_USERNAME CI_REPO=$CIRCLE_PROJECT_REPONAME PULL_REQUEST_NUMBER=$CIRCLE_PR_NUMBER node bots/code-analysis-bot.js
else
echo "Skipping code analysis."
Expand Down
10 changes: 5 additions & 5 deletions docs/accessibilityinfo.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class ScreenReaderStatusExample extends React.Component {
### `fetch()`

```javascript
static fetch()
AccessibilityInfo.fetch()
```


Expand All @@ -94,7 +94,7 @@ and `false` otherwise.
### `addEventListener()`

```javascript
static addEventListener(eventName, handler)
AccessibilityInfo.addEventListener(eventName, handler)
```


Expand All @@ -117,7 +117,7 @@ Add an event handler. Supported events:
### `setAccessibilityFocus()`

```javascript
static setAccessibilityFocus(reactTag)
AccessibilityInfo.setAccessibilityFocus(reactTag)
```


Expand All @@ -131,7 +131,7 @@ iOS-Only. Set accessibility focus to a react component.
### `announceForAccessibility()`

```javascript
static announceForAccessibility(announcement)
AccessibilityInfo.announceForAccessibility(announcement)
```


Expand All @@ -145,7 +145,7 @@ iOS-Only. Post a string to be announced by the screen reader.
### `removeEventListener()`

```javascript
static removeEventListener(eventName, handler)
AccessibilityInfo.removeEventListener(eventName, handler)
```


Expand Down
6 changes: 3 additions & 3 deletions docs/actionsheetios.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ next: alert
previous: accessibilityinfo
---


Display action sheets and share sheets on iOS.

### Methods

Expand All @@ -27,7 +27,7 @@ previous: accessibilityinfo
### `showActionSheetWithOptions()`

```javascript
static showActionSheetWithOptions(options, callback)
ActionSheetIOS.showActionSheetWithOptions(options, callback)
```


Expand Down Expand Up @@ -65,7 +65,7 @@ ActionSheetIOS.showActionSheetWithOptions({
### `showShareActionSheetWithOptions()`

```javascript
static showShareActionSheetWithOptions(options, failureCallback, successCallback)
ActionSheetIOS.showShareActionSheetWithOptions(options, failureCallback, successCallback)
```


Expand Down
2 changes: 1 addition & 1 deletion docs/activityindicator.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ AppRegistry.registerComponent('App', () => App)

### Props

* [ViewPropTypes props...](docs/viewproptypes.html#props)
- [View props...](docs/view-props.html)
- [`animating`](docs/activityindicator.html#animating)
- [`color`](docs/activityindicator.html#color)
- [`size`](docs/activityindicator.html#size)
Expand Down
2 changes: 1 addition & 1 deletion docs/alert.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Alert.alert(
### `alert()`

```javascript
static alert(title, message?, buttons?, options?, type?)
Alert.alert(title, message?, buttons?, options?, type?)
```


Expand Down
26 changes: 13 additions & 13 deletions docs/alertios.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ cross-platform support if you don't need to create iOS-only prompts.
### `alert()`

```javascript
static alert(title: string, [message]: string, [callbackOrButtons]: ?(() => void), ButtonsArray, [type]: AlertType): [object Object]
AlertIOS.alert(title: string, [message]: string, [callbackOrButtons]: ?(() => void), ButtonsArray, [type]: AlertType): [object Object]
```

Create and display a popup alert.
Expand All @@ -65,10 +65,10 @@ Create and display a popup alert.

| Name | Type | Required | Description |
| - | - | - | - |
| title | string | No | The dialog's title. Passing null or '' will hide the title. |
| message | string | Yes | An optional message that appears below the dialog's title. |
| callbackOrButtons | ?(() => void),[ButtonsArray](docs/alertios.html#buttonsarray) | Yes | This optional argument should be either a single-argument function or an array of buttons. If passed a function, it will be called when the user taps 'OK'. If passed an array of button configurations, each button should include a `text` key, as well as optional `onPress` and `style` keys. `style` should be one of 'default', 'cancel' or 'destructive'. |
| type | [AlertType](docs/alertios.html#alerttype) | Yes | Deprecated, do not use. |
| title | string | Yes | The dialog's title. Passing null or '' will hide the title. |
| message | string | No | An optional message that appears below the dialog's title. |
| callbackOrButtons | ?(() => void),[ButtonsArray](docs/alertios.html#buttonsarray) | No | This optional argument should be either a single-argument function or an array of buttons. If passed a function, it will be called when the user taps 'OK'. If passed an array of button configurations, each button should include a `text` key, as well as optional `onPress` and `style` keys. `style` should be one of 'default', 'cancel' or 'destructive'. |
| type | [AlertType](docs/alertios.html#alerttype) | No | Deprecated, do not use. |



Expand All @@ -93,7 +93,7 @@ AlertIOS.alert(
### `prompt()`

```javascript
static prompt(title: string, [message]: string, [callbackOrButtons]: ?((text: string) => void), ButtonsArray, [type]: AlertType, [defaultValue]: string, [keyboardType]: string): [object Object]
AlertIOS.prompt(title: string, [message]: string, [callbackOrButtons]: ?((text: string) => void), ButtonsArray, [type]: AlertType, [defaultValue]: string, [keyboardType]: string): [object Object]
```

Create and display a prompt to enter some text.
Expand All @@ -102,12 +102,12 @@ Create and display a prompt to enter some text.

| Name | Type | Required | Description |
| - | - | - | - |
| title | string | No | The dialog's title. |
| message | string | Yes | An optional message that appears above the text input. |
| callbackOrButtons | ?((text: string) => void),[ButtonsArray](docs/alertios.html#buttonsarray) | Yes | This optional argument should be either a single-argument function or an array of buttons. If passed a function, it will be called with the prompt's value when the user taps 'OK'. If passed an array of button configurations, each button should include a `text` key, as well as optional `onPress` and `style` keys (see example). `style` should be one of 'default', 'cancel' or 'destructive'. |
| type | [AlertType](docs/alertios.html#alerttype) | Yes | This configures the text input. One of 'plain-text', 'secure-text' or 'login-password'. |
| defaultValue | string | Yes | The default text in text input. |
| keyboardType | string | Yes | The keyboard type of first text field(if exists). One of 'default', 'email-address', 'numeric', 'phone-pad', 'ascii-capable', 'numbers-and-punctuation', 'url', 'number-pad', 'name-phone-pad', 'decimal-pad', 'twitter' or 'web-search'. |
| title | string | Yes | The dialog's title. |
| message | string | No | An optional message that appears above the text input. |
| callbackOrButtons | ?((text: string) => void),[ButtonsArray](docs/alertios.html#buttonsarray) | No | This optional argument should be either a single-argument function or an array of buttons. If passed a function, it will be called with the prompt's value when the user taps 'OK'. If passed an array of button configurations, each button should include a `text` key, as well as optional `onPress` and `style` keys (see example). `style` should be one of 'default', 'cancel' or 'destructive'. |
| type | [AlertType](docs/alertios.html#alerttype) | No | This configures the text input. One of 'plain-text', 'secure-text' or 'login-password'. |
| defaultValue | string | No | The default text in text input. |
| keyboardType | string | No | The keyboard type of first text field(if exists). One of 'default', 'email-address', 'numeric', 'phone-pad', 'ascii-capable', 'numbers-and-punctuation', 'url', 'number-pad', 'name-phone-pad', 'decimal-pad', 'twitter' or 'web-search'. |



Expand Down Expand Up @@ -191,7 +191,7 @@ An Alert button style

### ButtonsArray

Array or buttons
Array of buttons

| Type |
| - |
Expand Down
1 change: 1 addition & 0 deletions docs/android-building-from-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ title: Building React Native from source
layout: docs
category: Guides (Android)
permalink: docs/android-building-from-source.html
banner: ejected
next: communication-android
previous: android-ui-performance
---
Expand Down
8 changes: 8 additions & 0 deletions docs/androiduiperformance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
id: android-ui-performance
title: Profiling Android UI Performance
layout: redirect
permalink: docs/android-ui-performance.html
destinationUrl: performance.html
---
Redirecting...
30 changes: 28 additions & 2 deletions docs/animated.md
Original file line number Diff line number Diff line change
Expand Up @@ -533,25 +533,51 @@ static unforkEvent(event, listener)

## Properties

### Value

Standard value class for driving animations. Typically initialized with `new Animated.Value(0);`

---
See also `AnimatedValue.js`.


| Type |
| - |
| AnimatedValue |

---

### ValueXY

2D value class for driving 2D animations, such as pan gestures.

---
See also `AnimatedValueXY.js`.

| Type |
| - |
| AnimatedValueXY |



---

### Interpolation

Exported to use the Interpolation type in flow

See also `AnimatedInterpolation.js`.

| Type |
| - |
| AnimatedInterpolation |

---

### Node

Exported for ease of type checking. All animated values derive from this class.

| Type |
| - |
| AnimatedNode |


20 changes: 12 additions & 8 deletions docs/appregistry.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,13 @@ static registerHeadlessTask(taskKey, task)


Register a headless task. A headless task is a bit of code that runs without a UI.
@param taskKey the key associated with this task
@param task a promise returning function that takes some data passed from the native side as
the only argument; when the promise is resolved or rejected the native side is
notified of this event and it may decide to destroy the JS context.

**Parameters:**

| Name | Type | Required | Description |
| - | - | - | - |
| taskKey | string | No | The key associated with this task. |
| task | function | No | A promise returning function that takes some data passed from the native side as the only argument; when the promise is resolved or rejected the native side is notified of this event and it may decide to destroy the JS context. |


---
Expand All @@ -215,12 +216,15 @@ Register a headless task. A headless task is a bit of code that runs without a U
static startHeadlessTask(taskId, taskKey, data)
```


Only called from native code. Starts a headless task.

@param taskId the native id for this task instance to keep track of its execution
@param taskKey the key for the task to start
@param data the data to pass to the task
**Parameters:**

| Name | Type | Required | Description |
| - | - | - | - |
| taskId | number | No | The native id for this task instance to keep track of its execution |
| taskKey | string | No | The key for the task to start |
| data | any | No | The data to pass to the task |



Expand Down
Loading