Commit Graph

135 Commits

Author SHA1 Message Date
Nick Lockwood 9a70ff0263 Fix site generation
Summary: Doc site generation is broken becuase the script can't parse the UIManager file properly. Removing for now.

Reviewed By: bestander

Differential Revision: D2970814

fb-gh-sync-id: fb782fa6514d875f7e1c289548e82040a7646971
shipit-source-id: fb782fa6514d875f7e1c289548e82040a7646971
2016-02-24 05:41:34 -08:00
Nick Lockwood ac12f98689 Added support for taking snapshots of the screen, window or individual views
Summary:This adds a `takeSnapshot` method to UIManager that can be used to capture screenshots as an image.

The takeSnapshot method accepts either 'screen', 'window' or a view ref as an argument.

You can also specify the size, format and quality of the captured image.

I've added an example of capturing a screenshot at UIExplorer > Snapshot / Screenshot.
I've also added an example of sharing a screenshot to the UIExplorer > ActionSheetIOS demo.

Reviewed By: javache

Differential Revision: D2958351

fb-gh-sync-id: d2eb93fea3297ec5aaa312854dd6add724a7f4f8
shipit-source-id: d2eb93fea3297ec5aaa312854dd6add724a7f4f8
2016-02-23 02:26:33 -08:00
Janic Duplessis 91788d2bbd Deprecate PullToRefreshViewAndroid and remove it from the website
Summary:I forgot to add a deprecation warning to PullToRefreshViewAndroid when I worked on RefreshControl. This adds one as well as remove it from the website and remove the UIExplorer example. Now that we have versioned doc I think it is fine to remove deprecated stuff from the website so it is easier for users to know what component they should use. Last thing, I enabled flow in RefreshControl and fixed the one warning.
Closes https://github.com/facebook/react-native/pull/6055

Differential Revision: D2959502

Pulled By: mkonicek

fb-gh-sync-id: 9b23f84ea35c770bfe2a83d0fd3ec7e439669c33
shipit-source-id: 9b23f84ea35c770bfe2a83d0fd3ec7e439669c33
2016-02-21 16:17:36 -08:00
Konstantin Raev 6f1417c849 CI now builds docs website and deploys it to /%version% path
Summary:
Copy of #5760 reverted merge.

We need to preserve history of docs changes on the webserver.
The goal is to allow users to browse outdated versions of docs.
To make things simple all websites will be released to https://facebook.github.io/react-native/releases/version/XX folder when there is a branch cut.

I switched from Travis CI to Cirle CI because it works faster and I am more familiar with it.

How it works:

1. If code is pushed to `master` branch then CI will build a fresh version of docs and put it in https://github.com/facebook/react-native/tree/gh-pages/releases/next folder.
Github will serve this website from https://facebook.github.io/react-native/releases/version/next URL.
All relative URLs will work within that website

2. If code is pushed to `0.20-stable` branch then CI will build a fresh version of docs and put it in https://github.com/facebook/react-native/tree/gh-pages/releases/0.20 folder.
Github will serve this website from https://facebook.github.io/react-native/releases/v
Closes https://github.com/facebook/react-native/pull/5873

Reviewed By: svcscm

Differential Revision: D2926901

Pulled By: androidtrunkagent

fb-gh-sync-id: 16aea430bac815933d9c603f03921cc6353906f1
shipit-source-id: 16aea430bac815933d9c603f03921cc6353906f1
2016-02-11 06:17:42 -08:00
sunnylqm 54da3926d9 Make the docs of time and date picker in order
Summary: Closes https://github.com/facebook/react-native/pull/5841

Reviewed By: svcscm

Differential Revision: D2916710

Pulled By: androidtrunkagent

fb-gh-sync-id: b698cefc29ded291952b35feaad86cff023c8c6e
shipit-source-id: b698cefc29ded291952b35feaad86cff023c8c6e
2016-02-09 09:16:34 -08:00
chirag04 05e4236b80 document date and timer picker android
Summary: Closes https://github.com/facebook/react-native/pull/5826

Reviewed By: svcscm

Differential Revision: D2913829

Pulled By: vjeux

fb-gh-sync-id: a4adeb6ba402bbd0ff3cea00429e79c140b965dd
shipit-source-id: a4adeb6ba402bbd0ff3cea00429e79c140b965dd
2016-02-08 15:41:34 -08:00
Christopher Chedeau 736e900532 Support for ShadowPropTypesIOS
Summary:
Fixes https://github.com/facebook/react-native/issues/5748

<img width="1179" alt="screen shot 2016-02-04 at 12 08 07 pm" src="https://cloud.githubusercontent.com/assets/197597/12828197/340f7d5e-cb38-11e5-84b5-8dde48014100.png">
Closes https://github.com/facebook/react-native/pull/5763

Reviewed By: svcscm

Differential Revision: D2902270

Pulled By: vjeux

fb-gh-sync-id: bde9beaa869f9fe6d610e7bdf8f16bc3f4a08c7a
2016-02-04 15:46:38 -08:00
Janic Duplessis b979128c54 Cross platform status bar API
Summary:
I started working on improving the `StatusBar` API and make it work on Android. I added support for `setColor`, `setTranslucent` (the status bar is still visible but the app can draw under) and `setHidden` on Android. Looking for feedback on how to improve the API before I put more time on this :).

Right now I went for a cross platform API and functions that don't exist on a platform are just a no-op but I'm not sure it is the best choice since at the moment what is supported is very different between both platforms. I was wondering what you guys think and if it would be better off as 2 different modules.

It is also possible to port some of the features I added for Android to iOS even if there is no 'standard' way to do it. Like `setColor` could be implemented by drawing a colored view under the status bar and translucent by adding/removing some padding.
Closes https://github.com/facebook/react-native/pull/5360

Reviewed By: svcscm

Differential Revision: D2840417

Pulled By: nicklockwood

fb-gh-sync-id: 5c8d988bccf8035341f0efe27e54dd8402c18d24
2016-02-03 06:41:35 -08:00
Christopher Chedeau 670f9afaa1 Document Linking
Summary:
Both LinkingIOS and IntentAndroid are deprecated in favor of Linking but it was not in the website documentation.
Closes https://github.com/facebook/react-native/pull/5642

Reviewed By: svcscm

Differential Revision: D2883999

Pulled By: androidtrunkagent

fb-gh-sync-id: cd2ce6192f84fffef7ab7d4e56f87eb55fb30901
2016-01-31 00:53:33 -08:00
Christopher Chedeau 3fbd46c6d9 Cleanup Edit with GitHub
Summary:
- Now using a table layout. While having the link inside of the header worked well in the browser, the search API would put "Edit in GitHub" as part of the title -_-
- Instead of putting the link inside of every section like Props, put it on the page header. This makes it less repetetitive and also works on API pages where the link was absent before
- Remove "Run this example" link as there's a giant Run this example sidebar already.
Closes https://github.com/facebook/react-native/pull/5643

Reviewed By: svcscm

Differential Revision: D2883989

Pulled By: vjeux

fb-gh-sync-id: e810e1677d5130692997dd301d6d59cfe04b948f
2016-01-30 23:02:36 -08:00
Martin Konicek 679beb2a3a Tweak docs before releasing 0.19
Reviewed By: mkonicek

Differential Revision:D2883844
Ninja: Only docs and React Native website, doesn't affect any fb apps

fb-gh-sync-id: 4bf56dc695224f172832ca5381cebceab9e5fe4f
2016-01-30 17:11:28 -08:00
Janic Duplessis 1c6e837504 Add a deprecatedPropType module to show deprecation warnings
Summary:
To allow smoother API changes for users we often deprecate props and keep them around for a while before removing them. Right now it is all done manually, this adds a consistent way to show a warning when using a deprecated prop.

This also adds a deprecation warning of the website generated from the deprecatedPropType.

<img width="643" alt="screen shot 2016-01-26 at 7 43 08 pm" src="https://cloud.githubusercontent.com/assets/2677334/12600172/7af28fb0-c465-11e5-85e5-3786852bf522.png">

It also changes places where we added the warnings manually to use deprecatedPropType instead.
Closes https://github.com/facebook/react-native/pull/5566

Reviewed By: svcscm

Differential Revision: D2874629

Pulled By: nicklockwood

fb-gh-sync-id: c3c63bae7bbec26cc146029abd9aa5efbe73f795
2016-01-29 02:05:38 -08:00
Christopher Chedeau 193df8a4e0 Improve style prop display
Summary:
- Display the description when it exists
- Display the platform

<img width="667" alt="screen shot 2016-01-24 at 1 37 45 pm" src="https://cloud.githubusercontent.com/assets/197597/12539106/fb226d08-c29f-11e5-83ad-f85bb42ed693.png">
Closes https://github.com/facebook/react-native/pull/5520

Reviewed By: svcscm

Differential Revision: D2859743

Pulled By: vjeux

fb-gh-sync-id: 0ccfeca7bbdfa837501378c0bf701d589fea48d8
2016-01-25 09:53:29 -08:00
Sokovikov c2d75d7a65 Android AppState
Summary: Closes https://github.com/facebook/react-native/pull/5152

Reviewed By: svcscm

Differential Revision: D2850250

Pulled By: mkonicek

fb-gh-sync-id: 0b5063fa7121d4e304a70da8573c9ba1d05a757c
2016-01-21 11:47:21 -08:00
Christopher Chedeau 847220957a Add "Edit on GitHub" link on normal docs pages
Summary:
<img width="938" alt="screen shot 2016-01-20 at 10 38 23 pm" src="https://cloud.githubusercontent.com/assets/197597/12473376/8f0ac970-bfc6-11e5-9e44-0481e9f250f1.png">
Closes https://github.com/facebook/react-native/pull/5454

Reviewed By: svcscm

Differential Revision: D2849235

Pulled By: vjeux

fb-gh-sync-id: 0103f3d5249b1dfc03aa77feb9ae3bb7bbe9c746
2016-01-20 23:47:33 -08:00
Janic Duplessis b34f6c9f74 Add doc for RefreshControl 2016-01-09 10:43:02 -05:00
Janic Duplessis 2d50ac359c Fix issues running the website locally on windows with npm3 2016-01-02 03:56:32 -05:00
Satyajit Sahoo 23de42ba3f Merge pull request #4206 from mrcasals/fix_docs
Add Switch docs
2015-12-27 21:03:43 +05:30
Martin Konicek 73b2c529ca Add alert docs 2015-12-19 02:05:50 +01:00
Satyajit Sahoo 2f32cccce7 Add docs for 'IntentAndroid' 2015-12-15 21:20:40 +05:30
James Ide de677205ec [Website] Add PullToRefreshViewAndroid to the web docs 2015-12-12 20:30:39 -08:00
Ben Alpert fab8e38759 Fix ABC order of docs nav 2015-11-25 21:26:32 -08:00
Marc Riera a41afb7a1d Add Switch docs 2015-11-18 16:58:21 +01:00
Paul O’Shannessy d8c7f8e8bf Make sure the docs build with npm3 and npm2 2015-10-29 22:49:34 -07:00
Chirag 38398bc6a3 fix website build after asyncstorage changes. 2015-10-27 14:10:59 -04:00
Brent Vatne b39b97546a [Docs] Add ViewPagerAndroid to extractDocs 2015-10-16 19:25:43 -07:00
Joshua Sierles 21a8145fe8 instead of ignoring the documention javascript support files, just write them without trying to process them 2015-10-14 20:40:20 +02:00
Joshua Sierles d9ee81c127 embed an appetize.io simulator for AlertIOS documentation 2015-10-14 19:57:23 +02:00
Brent Vatne 05c08a472c Merge pull request #3314 from brentvatne/docs/add-dimensions
[Docs] Add Dimensions to API docs
2015-10-09 14:46:43 -07:00
Brent Vatne 36f015c0dd [Docs] Add Dimensions to API docs 2015-10-09 14:44:36 -07:00
Martin Konicek 2d7747ecb7 Add NativeMethodsMixin docs to website 2015-10-07 18:04:55 +01:00
Christopher Chedeau 00ceec9def Fix website with Animated
Animated.js has been renamed (and moved) to AnimatedImplementation.js, so we need to update the path and add another translation rule.
2015-09-22 12:54:04 -07:00
Martin Konicek 42eb5464fd Release React Native for Android
This is an early release and there are several things that are known
not to work if you're porting your iOS app to Android.

See the Known Issues guide on the website.

We will work with the community to reach platform parity with iOS.
2015-09-14 18:13:39 +01:00
Jason Brown 627d5a8e7e Fix documentation by adding propTypeCompositionHandler 2015-09-12 09:53:01 -07:00
Spencer Ahrens 126928b0b4 [Docs] Expand API parsing and rendering
The `Animated` module exposes a lot of functionality, including internal
classes. This diff extracts properties and classes from modules and renders them
recursively.

This also adds `Animated` to the autogen docs now that they more capable,
although it needs way more docblocks and such which will come later.
2015-09-01 14:14:47 -07:00
Spencer Ahrens 51b1f399be Update auto gen docs
* docgen -> v2.0.1 to support ES6 classes.
* Add `<Modal>` and `<ProgressViewIOS>` components to docs.
2015-08-31 12:23:11 -07:00
Martin Konicek 480b5c9e2e [website] Fix website generation 2015-08-25 19:23:41 +01:00
Tadeu Zagallo 4daca092d2 [ReactNative][Website] Fix tests 2015-08-13 13:31:50 +01:00
Christopher Chedeau 5ebe0ed717 Bust jest caching and fix tests 2015-08-11 11:02:19 -07:00
Joshua Sierles 5af8849aa4 [Docs] Add a 'run this example' link to AlertIOS docs, plus supporting code to add more links progressively 2015-06-30 23:39:49 +02:00
Zhao Han 13579d9dfd Add ActionSheetIOS to website 2015-06-10 22:41:21 -05:00
Zhao Han 1c05aff424 Add SegmentedControlIOS documentation to website 2015-05-14 22:22:31 -05:00
Brent Vatne debd5b0942 [Docs] Remove Transforms from sidebar, add to Style 2015-05-07 16:05:30 -07:00
Brent Vatne 731d4a0610 Remove the deprecated transform propTypes 2015-05-07 12:50:41 -07:00
Brent Vatne b8ca4e450b Add TransformPropTypes to docs 2015-05-07 12:16:48 -07:00
Brent Vatne 77a3190606 [Docs] Remove deprecated styleProps
- rotation, scaleX/Y, translateX/Y all belong under transform from
  ViewStylePropTypes
2015-05-05 19:36:23 -07:00
Spencer Ahrens 8465859411 Fix doc generation for Geolocation 2015-04-24 13:14:24 -07:00
Brent Vatne 9ee6cd6168 [Docs] Add TabBarIOS.Item to docs 2015-04-21 10:19:36 -07:00
Christopher Chedeau 1c7f39e461 Add JavaScript Environment in the docs and fix a few things 2015-04-08 11:06:56 -07:00
Christopher Chedeau 6a97054696 Remove Animation from docs 2015-04-06 14:55:22 -07:00
Ben Alpert d81cb6e162 Die with status 1 when website generation fails
So Travis won't wipe out the website on error. :\
2015-04-01 18:31:18 -07:00
Ben Alpert efe446e962 Fail generating website if any page throws an error
This will prevent us from having pages on the site that just show error
stack traces -- instead, Travis will fail with an error and we'll
notice sooner.

I cleaned up this logic to use promises which was eay easier to track
for the error behavior and should be simpler to follow regardless.
2015-04-01 17:42:33 -07:00
Christopher Chedeau 427d902e48 Support .ios.js examples 2015-03-31 14:05:27 -07:00
Christopher Chedeau 115b2a3fde fix ../ 2015-03-31 12:31:37 -07:00
Christopher Chedeau a4a551c571 Add examples at the end of the doc pages 2015-03-31 12:28:53 -07:00
Christopher Chedeau 536b4669a3 Add Edit on Github link on pages. cc @DMortens 2015-03-31 10:10:05 -07:00
Christopher Chedeau ed7b5cb187 Fix docs 2015-03-31 09:46:45 -07:00
Raphael Amorim 10c2205171 make a callback for server run only when done 2015-03-26 22:10:02 -03:00
Raphael Amorim e9ef277147 Fix log when execut npm start script 2015-03-26 22:00:08 -03:00
Tadeu Zagallo df7d9c27f9 [ReactNative][Docs] Add docs to LinkingIOS 2015-03-26 16:35:05 +00:00
Christopher Chedeau 8b8e9f906a Update website 2015-03-26 06:43:45 -07:00
Christopher Chedeau f61352eb4f Correct capitalization for Geo*l*ocation 2015-03-25 15:15:12 -07:00
Christopher Chedeau 4681da5420 Add geolocation polyfill 2015-03-24 21:13:55 -07:00
Christopher Chedeau d7d7e99c7d Add new files to docs 2015-03-24 20:38:29 -07:00
Felix Kling 8106d6fd0a Updated documentation generator
... to handle Object.assign(Object.create(foo), { ... })
2015-03-24 16:10:28 -07:00
Christopher Chedeau c676e9dccc Rename LayoutPropTypes to Flexbox 2015-03-24 09:24:15 -07:00
Felix Kling d5f670d19c Add logic to show style props in docs 2015-03-23 11:34:20 -07:00
Christopher Chedeau e811181034 Add copyright header on website files 2015-03-23 10:56:09 -07:00
Christopher Chedeau 4f8a86e8d7 Website tweaks 2015-03-21 10:59:41 -07:00
Christopher Chedeau a66fad52b6 Updates from Fri 20 Mar
- declare timeoutID | Basil Hosmer
- [react-packager] Allow entry point extensions like .ios.js | Amjad Masad
- [react-native] Use SpreadProperty to make react-docgen happy | Felix Kling
- clean Examples/2048 | Basil Hosmer
- [ReactNative] Adjust packager default root when running from within node_modules | Alex Kotliarskyi
- [ReactNative] Add missing websocket dependency | Alex Kotliarskyi
- [react-packager] change all but one `ix` to `require` | Amjad Masad
2015-03-21 10:23:15 -07:00
Christopher Chedeau e2e123c2ab Random changes in the website 2015-03-19 13:55:59 -07:00
Christopher Chedeau 55598f913c [website] Expose all the functions exported by react-native in the docs 2015-03-17 20:41:06 -07:00
Felix Kling 84207f2ec8 Use npm version of react-docgen 2015-03-16 15:06:57 -07:00
Christopher Chedeau 591d7b321f Make the publish script faster by not converting all the files on every file 2015-03-15 19:54:14 -07:00
Christopher Chedeau ad3192c360 Attempt #5 2015-03-15 19:32:59 -07:00
Christopher Chedeau 28aa691d13 Updates from Fri 13 Mar
- [ReactNative] Oss ActionSheet | Tadeu Zagallo
- [ReactNative] Fix ScrollView.scrollTo() | Christopher Chedeau
- [catalyst|madman] fix location observer | Jiajie Zhu
- [ReactNative] Remove keyboardDismissMode from static | Christopher Chedeau
- [ReactNative] Fix RCTMapManager retaining cycle | Tadeu Zagallo
- [ReactNative] Support loading sourcemaps from sourceMappingURL | Alex Kotliarskyi
- [catalyst] set up directory specific rql transform | Bhuwan Khattar
- [React Native] Add .done() to terminate promise chains | Ben Alpert
- [React Native] add support for reading tracking bit | Owen Coutts
2015-03-13 15:30:31 -07:00
Christopher Chedeau 33bfb322ad Wire up jsdocs for apis 2015-03-12 11:04:06 -07:00
Christopher Chedeau 83581cfe6b Initial import of the lib to parse javascript code, in the same vein as we parse React proptypes 2015-03-10 13:56:32 -07:00
Christopher Chedeau f87b0cb495 [Website] Add a link when composing prop types 2015-03-09 11:59:26 -07:00
Christopher Chedeau b9ab607197 Use docs/ComponentName.md at the end of the component docs 2015-03-04 21:03:24 -08:00
Christopher Chedeau d935f4554b Improvements in the docs generation 2015-03-04 18:10:32 -08:00
Felix Kling f77d9f8bae Update react-docgen 2015-03-02 17:31:26 -08:00
Felix Kling 472c287cd3 Update react-docgen and ignore pages with no header 2015-02-18 16:39:28 -08:00
Christopher Chedeau 70f28332b6 Initial version of the automatically generated docs 2015-02-12 14:44:00 -08:00
Christopher Chedeau 9231d4f8f0 Initial version of the website and docs. 2015-02-11 20:26:43 -08:00