Commit Graph

49 Commits

Author SHA1 Message Date
Janic Duplessis 49fdd99633 Display component methods on the website and tweak the documentation
Summary:The website now displays public methods on components. This was implemented mostly in react-docgen via #66. This adds a <Method> component that is used by the component and API doc pages to display documentation for a method.

It also adds some missing documentation and tweak some existing one to integrate with this feature. I also prefixed some component methods with an '_' so they don't show up in the doc.

**Test plan (required)**

Tested every component page locally to make sure the methods doc was displayed properly.
Tested an API page to make sure it still worked properly.
Closes https://github.com/facebook/react-native/pull/6890

Differential Revision: D3159911

Pulled By: vjeux

fb-gh-sync-id: 1e6a4640cda6794496d9844c1af6a1451c017dcc
fbshipit-source-id: 1e6a4640cda6794496d9844c1af6a1451c017dcc
2016-04-09 11:13:28 -07:00
Christine Abernathy 09958618c5 Adding emulator, simulator UIExplorer example across docs
Summary:Current docs show an Appetize.io example for AlertIOS doc. This pull request adds that feature across all applicable iOS and Android docs. So if a doc has an example in UIExplorer, it shows up in the top right and clicking to Play should navigate to the relevant example.

The changes here also touched NavigationExperimental to fix a typo that prevented iOS deep link from working. Code was also added to help support Android deep links but there's an outstanding issue (a race condition) around how Android deep links trigger getInitialURL in NavigationRootContainer that prevents this from fully working.

For adding the docs, a few things were done outside this pull request:

1/ Release builds for UIExplorer Android and iOS apps were uploaded to Appetize.io. The Appetize.io info (public key to run the build) is embedded in the docs.
2/ The iOS build was generated by making a few changes to get a local bundle. The current UIExplorer set up doesn't support "react-native run-ios".

Regarding the Appetize bu
Closes https://github.com/facebook/react-native/pull/6306

Differential Revision: D3129651

Pulled By: bestander

fb-gh-sync-id: d296d64db8236faa36f35484bb6b362990caf934
fbshipit-source-id: d296d64db8236faa36f35484bb6b362990caf934
2016-04-04 06:05:23 -07:00
Christopher Chedeau b80698df1c Introduce blog
Summary:Ported the infrastructure from jest.

![screen shot 2016-03-24 at 9 47 50 am](https://cloud.githubusercontent.com/assets/197597/14024237/85db1132-f1a5-11e5-84be-f525e302c6ca.png)
Closes https://github.com/facebook/react-native/pull/6629

Differential Revision: D3094423

Pulled By: vjeux

fb-gh-sync-id: a01aec6a55d28484c45bb241d037ca6717bc5e81
shipit-source-id: a01aec6a55d28484c45bb241d037ca6717bc5e81
2016-03-24 14:11:30 -07:00
Janic Duplessis 88ebdb2a65 RefreshControl refreshing prop and doc improvements
Summary:This makes the `refreshing` prop more 'controlled'. Before forgetting to set the refreshing prop in the onRefresh callback would make the js and native `refreshing` prop get out of sync and make the RefreshControl stop refreshing properly (see #5839).

I also added a simple usage example and a note about the refreshing prop in the doc.

There was also a small bug in the doc generation code that made the array of color show as [[object Object]] instead of [color] so I fixed that too.

** Test plan**
Tested using the UIExplorer example on iOS and Android. Not setting the `refreshing` prop to true in the `onRefresh` function should cause the RefreshControl to stop refreshing immediately and continue working properly after.

Closes #5839
Closes https://github.com/facebook/react-native/pull/6434

Differential Revision: D3046279

Pulled By: nicklockwood

fb-gh-sync-id: ebda04c659a10f0b9d468473c8d5c659256ca1b5
shipit-source-id: ebda04c659a10f0b9d468473c8d5c659256ca1b5
2016-03-13 03:04:24 -07:00
Sokovikov 5a53d90003 fix all anchor links in docs
Summary: Closes https://github.com/facebook/react-native/pull/6213

Differential Revision: D2989119

Pulled By: vjeux

fb-gh-sync-id: 3a069dcebbf8dec40702a7bab5268ce4a82db731
shipit-source-id: 3a069dcebbf8dec40702a7bab5268ce4a82db731
2016-02-29 09:21:31 -08:00
Sokovikov fcd468d4eb fix props anchor links
Summary:All anchor links are broken because of https://github.com/facebook/react-native/blob/master/website/core/Site.js#L37 base tag it means that relative urls won't work.
closes #5450
proof
![screen shot 2016-02-29 at 13 34 35](https://cloud.githubusercontent.com/assets/1488195/13392082/3d14a00e-dee9-11e5-8611-bc6bfaf6c752.png)
Closes https://github.com/facebook/react-native/pull/6208

Differential Revision: D2988892

Pulled By: vjeux

fb-gh-sync-id: da8b621af92d792a258812e38ae15f7cf53873ca
shipit-source-id: da8b621af92d792a258812e38ae15f7cf53873ca
2016-02-29 07:33:30 -08:00
Konstantin Raev f73f41779a Fixed relative links in generated docs
Summary:Relative links did not have 'docs/' prefix, so all of them lead to 404 page.
Fixes #5964
Closes https://github.com/facebook/react-native/pull/5975

Differential Revision: D2943886

Pulled By: androidtrunkagent

fb-gh-sync-id: dbc2355ecf7ea4f1dea0f8f6a5ef50e5f324dfda
shipit-source-id: dbc2355ecf7ea4f1dea0f8f6a5ef50e5f324dfda
2016-02-17 07:30:45 -08:00
Brent Vatne c6a8fb977d Fix links to Flexbox / ShadowPropTypesIOS / Transforms in styles
Reviewed By: svcscm

Differential Revision: D2938201

fb-gh-sync-id: c20790fa69984f0b592c48fbfdca74f3dfc9d14d
shipit-source-id: c20790fa69984f0b592c48fbfdca74f3dfc9d14d
2016-02-16 02:01:05 -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
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
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 1154f2a371 Document colors
Summary:
<img width="601" alt="screen shot 2016-01-27 at 3 37 22 pm" src="https://cloud.githubusercontent.com/assets/197597/12632329/12084e98-c50c-11e5-96c4-4f56e8219b3b.png">

<img width="303" alt="screen shot 2016-01-27 at 3 37 16 pm" src="https://cloud.githubusercontent.com/assets/197597/12632328/12075e70-c50c-11e5-95a3-5f483b4dcb47.png">

<img width="135" alt="screen shot 2016-01-27 at 3 37 38 pm" src="https://cloud.githubusercontent.com/assets/197597/12632327/12067668-c50c-11e5-92f9-ee0c719302b5.png">
Closes https://github.com/facebook/react-native/pull/5587

Reviewed By: svcscm

Differential Revision: D2878110

Pulled By: vjeux

fb-gh-sync-id: 00330e2857b07aac2e3d3c24f1003cdd9a2516c6
2016-01-28 19:37:33 -08:00
Christopher Chedeau 47f863c4da Single quotes in enum values
Summary:
This was driving me crazy :p Turns out that if the value is `'auto' /* default */`, then the docparser will not only trim the comment but also normalize the quote to double quote.

This is not pretty but does the job.
Closes https://github.com/facebook/react-native/pull/5509

Reviewed By: svcscm

Differential Revision: D2872482

Pulled By: vjeux

fb-gh-sync-id: 8ba5dad695f747f82b7680ee26bdc0792e21ea8f
2016-01-27 18:27:01 -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
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
Johan Ruokangas cb609f986c Remove indentation and force appetize link to open a new window/tab 2015-10-15 18:18:01 +03:00
Johan Ruokangas 080746c4c3 Add hover effect and appetize link 2015-10-14 23:04:31 +03:00
Joshua Sierles d9ee81c127 embed an appetize.io simulator for AlertIOS documentation 2015-10-14 19:57:23 +02:00
Spencer Ahrens dfdef9a02a [autodocs] add doc blocks to more things 2015-09-03 11:53:20 -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
Christopher Chedeau c1a0a72275 [Website] Fix a-z order in props 2015-08-08 10:28:05 -07:00
Christopher Chedeau 6e9ceaa348 [Website] Platform-specific props
We are annotating platform-specific props with a special @platform tag in the docblocks. This pull request adds a little [ios] tag before the name and sorts the props such as generic ones are before platform-specific ones.
2015-08-07 10:31:07 -07:00
Mu-An Chiou 129d1548a8 Add dynamic page title
Currently all the pages have the same title, making it hard to
tell which page is while when user has multiple tabs opened.
This adds 'title' to Site so a page title can be passed in and
prepended to the default title
2015-08-02 22:07:53 +08: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 38c5be59b8 Fix issues#1223 2015-05-09 19:05:33 -05:00
Brent Vatne b8ca4e450b Add TransformPropTypes to docs 2015-05-07 12:16:48 -07:00
Brent Vatne 42d4de9ce0 Remove unnecessary newline 2015-05-07 11:56:42 -07:00
Brent Vatne f878be84e6 Clarify transform for ViewStyleProps, generate union docs properly 2015-05-07 11:56:42 -07:00
Ben Alpert 2d7c5c4746 Fail docs build on missing component file
This would have prevented #709.
2015-04-06 15:23:06 -07:00
Christopher Chedeau 7a165db177 Use greedy regex for removing docblock 2015-04-01 08:54:20 -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
Tadeu Zagallo 17fb98ea85 [docs] Fix 0 being rendered on functions with 0 args 2015-03-26 09:15:45 +00:00
Eric Vicenti 00f2a7b016 Avoid empty methods section in docs 2015-03-25 14:26:56 -07:00
Eric Vicenti 6271f81a60 Don't document private methods 2015-03-25 12:39:57 -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 e2e123c2ab Random changes in the website 2015-03-19 13:55:59 -07:00
Christopher Chedeau 85a13b48eb [website] Do not absorb spaces in markdown comments 2015-03-16 09:24:33 -07:00
Christopher Chedeau 032449c54c [Website] Fix typehint parsing and add header between description and props/methods 2015-03-14 18:10:24 -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 9f37aea739 Support flow and @param type hints 2015-03-12 11:36:45 -07:00
Christopher Chedeau 33bfb322ad Wire up jsdocs for apis 2015-03-12 11:04:06 -07:00
Christopher Chedeau 05ec075c94 [Website] Better summary for propTypes 2015-03-09 13:25:01 -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
Christopher Chedeau 9231d4f8f0 Initial version of the website and docs. 2015-02-11 20:26:43 -08:00