From f31a50f26eebdfe2d0e7e4c067ef29310f2ad542 Mon Sep 17 00:00:00 2001 From: "pull[bot]" <39814207+pull[bot]@users.noreply.github.com> Date: Fri, 9 Oct 2020 18:36:50 +0200 Subject: [PATCH] [pull] master from facebook:master (#15) * Update introduction.md (#2181) Hooks were introduced in React Native 0.59, not 0.58. * adding snack player instead of images for flexbox (#2171) * adding snack player instead of images for flexbox * chore: revert yarn.lock * minor changes and improvements, prettier run on examples Co-authored-by: Bartosz Kaszubowski * UI & UX Design with InputAccessoryView (#2183) * UI Design with InputAccessoryView * Update inputaccessoryview.md * small tweaks Co-authored-by: Bartosz Kaszubowski * update TextInput example, refs #2187 * add TOC and improve formatting on the Android publishing page * Modernize code examples in the direct manipulation section (#2189) * Modernize code examples in the direct manipulation section. * small code tweaks/fixes + run code through Prettier Co-authored-by: Bartosz Kaszubowski * update Alert API page, include iOS specific functions from deprecated AlertIOS (#2184) Thanks for this one, @Simek! * Update getting-started.md (#2194) Python2 & Python3 are both compatible * fix homepage showcase app list graphical issue (#2185) Co-authored-by: R Nabors * docs: add matrix to transform (#2197) * Bump decompress from 4.2.0 to 4.2.1 in /website (#2200) Bumps [decompress](https://github.com/kevva/decompress) from 4.2.0 to 4.2.1. - [Release notes](https://github.com/kevva/decompress/releases) - [Commits](https://github.com/kevva/decompress/compare/v4.2.0...v4.2.1) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Typo fix (#2202) * fixes #2201, delete duplicated TOC, add note about removal to TabBarIOS pages * docs: update deprecated usage of findNodeHandle in measureLayout (#2199) * docs: update deprecated usage of findNodeHandle in measureLayout * minor text and Snack tweaks, prettier run Co-authored-by: Bartosz Kaszubowski * bump alex and node-fetch, fix new alex warning * typo fix * TextInput: Add `onPressIn` and `onPressOut` docs (#2205) Original summary by @yungsters in [1b994f9](https://github.com/facebook/react-native/commit/b7b0e232028723794af4c79fc6366c483ae2350b): Introduces support for `onPressIn` and `onPressOut` on the `TextInput` component. This makes it possible to add visual feedback when users touch interact with `TextInput` components. * Fix typos (#2204) * link out-of-tree platforms, add macOS platform, unify dashes on homepage (#2186) * link out-of-tree platforms, add macOS, unify dashes on homepage * revert dashes changes * update SectionList page, extract ViewToken, add labels (#2191) * update TextInput press callbacks type, refs #2205 * Added workarounds for TextInputs (#2203) * Added workarounds for TextInputs * provide info on the focus management using * small text tweaks Co-authored-by: Bartosz Kaszubowski * update Text page and add types, add LayoutEvent object page (#2209) * Incorrect command (#2207) https://github.com/react-native-community/cli/blob/master/docs/commands.md#run-android `--variant [string]` * Updated ScrollView `disableIntervalMomentum` doc. (#2211) * Remove announcement banner. (#2213) * Docs: Removing `onTextInput` prop from TextInput (#2216) * Removing `onTextInput` prop from TextInput doc. * Removing `onTextInput` prop from TextInput on version 0.62 & 0.63. * Signing not under General for me (#2214) * Update running-on-simulator-ios.md (#2220) We have to specify the generation for the iPhone SE simulator. * [DOC] fixed errata in image doc (#2221) * Add documentation for Hermes sampling profiler (#2159) Co-authored-by: Saphal Patro <31125345+saphal1998@users.noreply.github.com> Co-authored-by: R Nabors Co-authored-by: Saphal Patro * Adding Android NDK Installation Guide (#2225) * Docs: Integration with android fragment (#2217) Co-authored-by: Sebastien Bailouni * Add new option to ActionSheetIOS called disabledButtonsIndices (#1898) * Adding configureNext.onAnimationDidFail callback on LayoutAnimation (#2136) Co-authored-by: Christoph Nakazawa * Added Coinbase to showcase (#2227) * Added Coinbase to showcase * Add Coinbase icon * 0.63.3 release - update Pressable delay (#2226) * Improved README.md (#2233) * fix typo (#2232) * fix typo fixes typo in "Using Custom Path Aliases with TypeScript" section (configure -> configuring) * sentence rewrite Co-authored-by: Bartosz Kaszubowski * Add Shopify and Tableau to showcase (#2228) * Add Shopify in showcase * Add Shopify icon * Add Tableau to showcase * Add tableau image asset * Update Tableau icon * updated debugging.md (#2241) fixed a typo in unhandled error * Update appregistry.md (#2246) * Update out-of-tree-platforms.md (#2243) * Remove unnecessary python dependency (#2250) Python is not required anymore on windows platform. The only binary addon for react-native project are some deps of `ws`, [which now have prebuilt binary and are optional](https://github.com/websockets/ws#opt-in-for-performance-and-spec-compliance). Tested on a brand new windows 10 image with only node installed, the initiating process goes well. * Update network.md to show android non ssl block (#2245) * Update network.md to show android non ssl block added note for android's android:usesCleartextTraffic flag in manifest file to allow non ssl encrypted networking - to go alongside the existing note for ios. * small text tweaks Co-authored-by: Bartosz Kaszubowski * remove link in native-modules-ios (#2244) Co-authored-by: luism3861 * Update textinput.md (#2249) * Update textinput.md This will make it more clear for beginners who are trying to use onBlur to do a final action on their textInput's text value. * formatting, text tweaks Co-authored-by: Bartosz Kaszubowski * revert change to Netlify config due to V2 test merge Co-authored-by: Georgios Kotziabassis Co-authored-by: Muhammad Saeed <37156636+Stringsaeed@users.noreply.github.com> Co-authored-by: Bartosz Kaszubowski Co-authored-by: Mojtaba Vandaei <62926492+mojvan@users.noreply.github.com> Co-authored-by: Steven Luscher Co-authored-by: Pratik Khandelwal Co-authored-by: R Nabors Co-authored-by: Jesse Katsumata Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Joe Bernard Co-authored-by: Thibault Malbranche Co-authored-by: Luis Miguel Alvarado Co-authored-by: Pramod Kotipalli Co-authored-by: Madd.is Co-authored-by: Kirill Co-authored-by: Ashwin Mothilal Co-authored-by: Christoph Nakazawa Co-authored-by: captDaylight Co-authored-by: ppichier Co-authored-by: Varunendra Pratap Singh Co-authored-by: Jessie Anh Nguyen <47696418+jessieAnhNguyen@users.noreply.github.com> Co-authored-by: Saphal Patro <31125345+saphal1998@users.noreply.github.com> Co-authored-by: Saphal Patro Co-authored-by: Agastya Darma Co-authored-by: Steven Martin Co-authored-by: Sebastien Bailouni Co-authored-by: Luke Walczak Co-authored-by: Jessica Lin Co-authored-by: Vishal Vishwakarma <56310842+vishalvishw10@users.noreply.github.com> Co-authored-by: Adam Hunter Co-authored-by: Jessica Lin Co-authored-by: Ashish Shakya <41261918+Ashish1101@users.noreply.github.com> Co-authored-by: Sunny Luo Co-authored-by: Alexander Sklar Co-authored-by: s-maurice <51819025+s-maurice@users.noreply.github.com> Co-authored-by: luism3861 <36824170+luism3861@users.noreply.github.com> Co-authored-by: luism3861 Co-authored-by: Ralph Maamari --- README.md | 6 +- docs/actionsheetios.md | 1 + docs/alert.md | 164 +- docs/appregistry.md | 2 +- docs/building-for-tv.md | 6 +- docs/debugging.md | 2 +- docs/direct-manipulation.md | 221 ++- docs/flatlist.md | 13 +- docs/flexbox.md | 1406 ++++++++++++++++- docs/getting-started.md | 18 +- docs/image.md | 10 +- docs/inputaccessoryview.md | 9 +- docs/integration-with-android-fragment.md | 168 ++ docs/introduction.md | 2 +- docs/layoutanimation.md | 3 +- docs/layoutevent.md | 72 + docs/native-modules-ios.md | 2 +- docs/network.md | 2 + docs/optimizing-flatlist-configuration.md | 2 +- docs/out-of-tree-platforms.md | 4 +- docs/pressable.md | 8 +- docs/profile-hermes.md | 155 ++ docs/running-on-device.md | 2 +- docs/running-on-simulator-ios.md | 2 +- docs/scrollview.md | 2 +- docs/sectionlist.md | 201 ++- docs/signed-apk-android.md | 42 +- docs/style.md | 2 +- docs/text.md | 370 ++--- docs/textinput.md | 76 +- docs/timers.md | 2 +- docs/touchablewithoutfeedback.md | 10 +- docs/transforms.md | 6 +- docs/typescript.md | 2 +- docs/view.md | 10 +- docs/viewtoken.md | 65 + docs/virtualizedlist.md | 13 +- netlify.toml | 2 +- website/i18n/en.json | 15 + website/package.json | 4 +- website/pages/en/index.js | 17 +- website/showcase.json | 27 + website/sidebars.json | 12 +- website/siteConfig.js | 1 - website/static/css/header.css | 117 -- website/static/css/homepage/AppList.css | 14 + website/static/docs/assets/CallStackDemo.jpg | Bin 0 -> 52532 bytes .../static/docs/assets/HermesProfileSaved.png | Bin 0 -> 206354 bytes .../docs/assets/d_pressable_pressing.svg | 2 +- .../static/docs/assets/openChromeProfile.png | Bin 0 -> 117922 bytes website/static/img/showcase/coinbase.png | Bin 0 -> 3281 bytes website/static/img/showcase/shopify.png | Bin 0 -> 19007 bytes website/static/img/showcase/tableau.png | Bin 0 -> 3522 bytes website/static/js/announcement.js | 35 - .../version-0.16/tabbarios-item.md | 21 +- .../versioned_docs/version-0.16/tabbarios.md | 11 - .../version-0.18/tabbarios-item.md | 21 +- .../versioned_docs/version-0.18/tabbarios.md | 11 - .../version-0.26/tabbarios-item.md | 22 +- .../versioned_docs/version-0.26/tabbarios.md | 12 - .../versioned_docs/version-0.28/tabbarios.md | 13 - .../versioned_docs/version-0.32/tabbarios.md | 13 - .../version-0.40/tabbarios-item.md | 23 +- .../versioned_docs/version-0.40/tabbarios.md | 14 - .../version-0.41/tabbarios-item.md | 24 +- .../version-0.44/tabbarios-item.md | 24 +- .../versioned_docs/version-0.49/tabbarios.md | 19 +- website/versioned_docs/version-0.5/style.md | 2 +- .../version-0.5/tabbarios-item.md | 19 +- .../versioned_docs/version-0.5/tabbarios.md | 6 - .../version-0.59/tabbarios-item.md | 125 ++ .../versioned_docs/version-0.59/tabbarios.md | 97 ++ .../versioned_docs/version-0.6/tabbarios.md | 8 - .../version-0.62/building-for-tv.md | 2 - website/versioned_docs/version-0.62/style.md | 2 +- .../versioned_docs/version-0.62/textinput.md | 10 - .../versioned_docs/version-0.62/transforms.md | 6 +- .../version-0.63/native-modules-ios.md | 2 +- .../versioned_docs/version-0.63/pressable.md | 10 +- website/versioned_docs/version-0.63/style.md | 2 +- .../versioned_docs/version-0.63/textinput.md | 10 - .../versioned_docs/version-0.63/transforms.md | 6 +- .../versioned_docs/version-0.9/tabbarios.md | 9 - website/yarn.lock | 759 +++++---- 84 files changed, 3260 insertions(+), 1370 deletions(-) create mode 100644 docs/integration-with-android-fragment.md create mode 100644 docs/layoutevent.md create mode 100644 docs/profile-hermes.md create mode 100644 docs/viewtoken.md create mode 100644 website/static/docs/assets/CallStackDemo.jpg create mode 100644 website/static/docs/assets/HermesProfileSaved.png create mode 100644 website/static/docs/assets/openChromeProfile.png create mode 100644 website/static/img/showcase/coinbase.png create mode 100644 website/static/img/showcase/shopify.png create mode 100644 website/static/img/showcase/tableau.png delete mode 100644 website/static/js/announcement.js create mode 100644 website/versioned_docs/version-0.59/tabbarios-item.md create mode 100644 website/versioned_docs/version-0.59/tabbarios.md diff --git a/README.md b/README.md index 8d857b9d5a4..ada122e2043 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ As mentioned above, the `docs` folder contains the source files for all of the d ### Versioned docs -The React Native website is versioned as to allow users to go back and see the API reference docs for any given release. A new version of the website is generally generated whenever there is a new React Native release. When this happens, any changes made to the `docs` and `website/sidebars.json` files will be copied over to the corresponding location within `website/versioned_docs` and `website/versioned_sidebars`. +The React Native website is versioned to allow users to go back and see the API reference docs for any given release. A new version of the website is generally generated whenever there is a new React Native release. When this happens, any changes made to the `docs` and `website/sidebars.json` files will be copied over to the corresponding location within `website/versioned_docs` and `website/versioned_sidebars`. > **_Note:_** Do not edit the auto-generated files within `versioned_docs` or `versioned_sidebars` unless you are sure it is necessary. Edits made to older versions will not be propagated to newer versions of the docs. @@ -116,7 +116,7 @@ The `showcase.json` file contains the list of users that are highlighted in the 1. Follow the "[Running locally](#running-locally)" instructions. 1. Save the files and check in the browser. 1. Some changes may require a server restart to generate new files. (Pages in `docs` always do!) -1. Edits to pages in `docs` will only be visible in the latest version of the documentation, called "Next", located under `docs/next` path. +1. Edits to pages in `docs` will only be visible in the latest version of the documentation, called "Next", located under the `docs/next` path. Visit **http://localhost:3000/docs/next/YOUR-DOCS-PAGE** to see your work. @@ -126,7 +126,7 @@ Visit **http://localhost:3000/docs/next/YOUR-DOCS-PAGE** to see your work. If possible, test any visual changes in all latest versions of the following browsers: -- Chrome and Firefox on desktop. +- Chrome and Firefox on the desktop. - Chrome and Safari on mobile. ### Push it diff --git a/docs/actionsheetios.md b/docs/actionsheetios.md index 7f982030807..6896d9204f7 100644 --- a/docs/actionsheetios.md +++ b/docs/actionsheetios.md @@ -73,6 +73,7 @@ Display an iOS action sheet. The `options` object must contain one or more of: - `message` (string) - a message to show below the title - `anchor` (number) - the node to which the action sheet should be anchored (used for iPad) - `tintColor` (string) - the [color](colors) used for non-destructive button titles +- `disabledButtonIndices` (array of numbers) - a list of button indices which should be disabled The 'callback' function takes one parameter, the zero-based index of the selected item. diff --git a/docs/alert.md b/docs/alert.md index 9c4e51e2fa2..0b82e780bde 100644 --- a/docs/alert.md +++ b/docs/alert.md @@ -7,9 +7,9 @@ Launches an alert dialog with the specified title and message. Optionally provide a list of buttons. Tapping any button will fire the respective onPress callback and dismiss the alert. By default, the only button will be an 'OK' button. -This is an API that works both on Android and iOS and can show static alerts. To show an alert that prompts the user to enter some information, see `AlertIOS`; entering text in an alert is common on iOS only. +This is an API that works both on Android and iOS and can show static alerts. Alert that prompts the user to enter some information is avaiable on iOS only. -### Example +## Example
    @@ -149,7 +149,7 @@ export default App; ## iOS -On iOS you can specify any number of buttons. Each button can optionally specify a style, which is one of 'default', 'cancel', or 'destructive'. +On iOS you can specify any number of buttons. Each button can optionally specify a style, avaiable options are represented by the [AlertButtonStyle](#alertbuttonstyle) enum. ## Android @@ -159,33 +159,41 @@ On Android at most three buttons can be specified. Android has a concept of a ne - Two buttons mean 'negative', 'positive' (such as 'Cancel', 'OK') - Three buttons mean 'neutral', 'negative', 'positive' (such as 'Later', 'Cancel', 'OK') -Alerts on Android can be dismissed by tapping outside of the alert box. It is disabled by default and can be enabled by providing an optional `options` parameter with the cancelable property set to true i.e. `{ cancelable: true }`. +Alerts on Android can be dismissed by tapping outside of the alert box. It is disabled by default and can be enabled by providing an optional [Options](alert#options) parameter with the cancelable property set to `true` i.e.
    `{ cancelable: true }`. -The cancel event can be handled by providing an `onDismiss` callback property `{ onDismiss: () => {} }` inside the `options` parameter. +The cancel event can be handled by providing an `onDismiss` callback property inside the `options` parameter. -Example usage: +### Example
    Android
    -```jsx -Alert.alert('Alert Title', 'My Alert Msg', [ - { - text: 'Ask me later', - onPress: () => console.log('Ask me later pressed') - }, - { - text: 'Cancel', - onPress: () => console.log('Cancel Pressed'), - style: 'cancel' - }, - { text: 'OK', onPress: () => console.log('OK Pressed') }, - { - // cancelable and onDismiss only work on Android. - cancelable: true, - onDismiss: () => - console.log( - 'This alert was dismissed by tapping outside of the alert dialog.' - ) - } -]); +```SnackPlayer name=Alert%20Android%20Dissmissable%20Example&supportedPlatforms=android +import React from "react"; +import { View, StyleSheet, Button, Alert } from "react-native"; + +const showAlert = () => + Alert.alert( + "Alert Title", + "My Alert Msg", + [ + { + text: "Cancel", + onPress: () => Alert.alert("Cancel Pressed"), + style: "cancel", + }, + ], + { + cancelable: true, + onDismiss: () => + Alert.alert( + "This alert was dismissed by tapping outside of the alert dialog." + ), + } + ); + +const App = () => ( +