From 5e86e9ce021786838de05536dbb579a6602b7335 Mon Sep 17 00:00:00 2001 From: Website Deployment Script Date: Thu, 19 May 2016 11:55:14 +0000 Subject: [PATCH] Updated docs for next --- releases/next/docs/direct-manipulation.html | 2 +- releases/next/docs/getting-started.html | 57 +++++++++++++++++++-- releases/next/versions.html | 2 +- versions.html | 4 +- 4 files changed, 57 insertions(+), 8 deletions(-) diff --git a/releases/next/docs/direct-manipulation.html b/releases/next/docs/direct-manipulation.html index 6a2606b4e84..bbf3cf3a869 100644 --- a/releases/next/docs/direct-manipulation.html +++ b/releases/next/docs/direct-manipulation.html @@ -23,7 +23,7 @@ any knowledge of that fact or requiring any changes to its implementation:

={styles.button}> <Text>Press me!</Text> </View> -<TouchableOpacity>

Let's imagine that setNativeProps was not available. One way that we +</TouchableOpacity>

Let's imagine that setNativeProps was not available. One way that we might implement it with that constraint is to store the opacity value in the state, then update that value whenever onPress is fired:

getInitialState() { return { myButtonOpacity: 1, } diff --git a/releases/next/docs/getting-started.html b/releases/next/docs/getting-started.html index 53fbcdf3701..ada88704718 100644 --- a/releases/next/docs/getting-started.html +++ b/releases/next/docs/getting-started.html @@ -298,10 +298,59 @@ function display(type, value) { container.className.replace(RegExp('display-' + type + '-[a-z]+ ?'), ''); event && event.preventDefault(); } -var isMac = navigator.platform === 'MacIntel'; -var isWindows = navigator.platform === 'Win32'; -display('os', isMac ? 'mac' : (isWindows ? 'windows' : 'linux')); -display('platform', isMac ? 'ios' : 'android'); + +// If we are coming to the page with a hash in it (i.e. from a search, for example), try to get +// us as close as possible to the correct platform and dev os using the hashtag and block walk up. +var foundHash = false; +if (window.location.hash !== '' && window.location.hash !== 'content') { // content is default + var hashLinks = document.querySelectorAll('a.hash-link'); + for (var i = 0; i < hashLinks.length && !foundHash; ++i) { + if (hashLinks[i].hash === window.location.hash) { + var parent = hashLinks[i].parentElement; + while (parent) { + if (parent.tagName === 'BLOCK') { + var devOS = null; + var targetPlatform = null; + // Could be more than one target os and dev platform, but just choose some sort of order + // of priority here. + + // Dev OS + if (parent.className.indexOf('mac') > -1) { + devOS = 'mac'; + } else if (parent.className.indexOf('linux') > -1) { + devOS = 'linux'; + } else if (parent.className.indexOf('windows') > -1) { + devOS = 'windows'; + } else { + break; // assume we don't have anything. + } + + // Target Platform + if (parent.className.indexOf('ios') > -1) { + targetPlatform = 'ios'; + } else if (parent.className.indexOf('android') > -1) { + targetPlatform = 'android'; + } else { + break; // assume we don't have anything. + } + // We would have broken out if both targetPlatform and devOS hadn't been filled. + display('os', devOS); + display('platform', targetPlatform); + foundHash = true; + break; + } + parent = parent.parentElement; + } + } + } +} +// Do the default if there is no matching hash +if (!foundHash) { + var isMac = navigator.platform === 'MacIntel'; + var isWindows = navigator.platform === 'Win32'; + display('os', isMac ? 'mac' : (isWindows ? 'windows' : 'linux')); + display('platform', isMac ? 'ios' : 'android'); +}

We are planning improvements to the React Native documentation. Your responses to this short survey will go a long way in helping us provide valuable content. Thank you!

Take Survey
© 2016 Facebook Inc.

React Native Versions

React Native is following a 2-week train release. Every two weeks, a Release Candidate (rc) branch is created off of master and the previous rc branch is being officially released.

masterDocs
0.26-rcDocsRelease Notes
(current) 0.25DocsRelease Notes
0.24DocsRelease Notes
0.23DocsRelease Notes
0.22DocsRelease Notes
0.21DocsRelease Notes
0.20DocsRelease Notes
0.19DocsRelease Notes
0.18DocsRelease Notes
© 2016 Facebook Inc.

React Native Versions

React Native is following a 2-week train release. Every two weeks, a Release Candidate (rc) branch is created off of master and the previous rc branch is being officially released.

masterDocs
(current) 0.26DocsRelease Notes
0.25DocsRelease Notes
0.24DocsRelease Notes
0.23DocsRelease Notes
0.22DocsRelease Notes
0.21DocsRelease Notes
0.20DocsRelease Notes
0.19DocsRelease Notes
0.18DocsRelease Notes
© 2016 Facebook Inc.

React Native Versions

React Native is following a 2-week train release. Every two weeks, a Release Candidate (rc) branch is created off of master and the previous rc branch is being officially released.

masterDocs
(current) 0.26DocsRelease Notes
0.25DocsRelease Notes
0.24DocsRelease Notes
0.23DocsRelease Notes
0.22DocsRelease Notes
0.21DocsRelease Notes
0.20DocsRelease Notes
0.19DocsRelease Notes
0.18DocsRelease Notes
© 2016 Facebook Inc.

React Native Versions

React Native is following a 2-week train release. Every two weeks, a Release Candidate (rc) branch is created off of master and the previous rc branch is being officially released.

masterDocs
(current) 0.26DocsRelease Notes
0.25DocsRelease Notes
0.24DocsRelease Notes
0.23DocsRelease Notes
0.22DocsRelease Notes
0.21DocsRelease Notes
0.20DocsRelease Notes
0.19DocsRelease Notes
0.18DocsRelease Notes
© 2016 Facebook Inc.
\ No newline at end of file