Commit Graph

44 Commits

Author SHA1 Message Date
Devin Abbott f4a8efa452 Add react-native-web-player to core components docs
Summary:
This PR adds the interactive [React Native Web Player](http://dabbott.github.io/react-native-web-player/) to the docs. The web player is an embeddable iframe which runs React Native code using components from [react-native-web](https://github.com/necolas/react-native-web). For now, it's primarily for educational purposes, since only the basic components are implemented.

Some details:
- The iframe is loaded from MaxCDN using rawgit, locked down to a git tag.
- Asset paths (i.e. images) are resolved relative to `//facebook.github.io/react-native/`
- When viewed on mobile, it falls back to the syntax-highlighted code blocks.

The WebPlayer can be inserted into markdown by using the fences:

```
```ReactNativeWebPlayer

import ...

AppRegistry.registerComponent ...

`` `
```

![screen shot 2016-06-22 at 12 46 50 pm](https://cloud.githubusercontent.com/assets/1198882/16281068/7056804e-3877-11e6-82f7-ece245690548.png)

I didn't actually add the WebPlayer to any docs pages in this PR. That we c
Closes https://github.com/facebook/react-native/pull/8328

Differential Revision: D3471527

Pulled By: lacker

fbshipit-source-id: 704da41cd77e08c7e2bc820557a74d36e88e8eb7
2016-06-22 14:13:22 -07:00
ColCh 6a828328e1 Add tabindex attribute to searchbar
Summary:
Explain the **motivation** for making this change. What existing problem does the pull request solve?

This is small improvement to docs webpage.
I'm tired of clicking on searchbar with mouse/touchpad, so I've added a `tabindex` attribute to it, so it can be now focused with `Tab` key.

I think this greatly improves user experience on documentation searching.

**Test plan (required)**

??? Just click on `Tab` and it will focus. Should I test it really?

**Code formatting**

Attributes are sorted alphabetically, I've inserted new attribute in this order, after `id` and before `type` attributes.
Closes https://github.com/facebook/react-native/pull/8319

Differential Revision: D3470858

fbshipit-source-id: 01240bdf1432d9873324ddee38be256dfab93df2
2016-06-22 12:28:33 -07:00
Andrej Badin 00c77800c9 Improve Docs navigation on handheld devices.
Summary:
Fixes #7519

JS detects handheld device by sniffing UA string (very primitive detection). If on handheld device, event listener is registered. Event handler toggles Docs Navigation overlay after clicking on "Docs" nav button.
Original Docs Navigation panel is taken out of the natural page flow using pure CSS and is styled to look "good" on device.  As a result of this, Navigation overlay is ONLY visible when you are at Docs page, otherwise "Docs" nav button takes you Docs page first.

iPhone/iPad previews
![iphone](https://cloud.githubusercontent.com/assets/829963/15409630/f1a64b1a-1e15-11e6-92eb-f85c5cd06754.gif)
![ipad](https://cloud.githubusercontent.com/assets/829963/15409631/f1a6f952-1e15-11e6-8f5c-6f89f54e6814.gif)
Closes https://github.com/facebook/react-native/pull/7640

Differential Revision: D3325440

Pulled By: vjeux

fbshipit-source-id: a06b21d743d56bfea5db5b750836856c3af9bbe2
2016-05-20 02:50:08 -07:00
Joel Marcey 20c8899b31 Revert "Add docs survey link to site header"
Summary:
This reverts commit 4a7f2192f9.

Adding the link breaks mobile
Closes https://github.com/facebook/react-native/pull/7520

Differential Revision: D3290347

Pulled By: JoelMarcey

fbshipit-source-id: 950db67eb14b5fe8816d4c782b32d233a8697ae7
2016-05-11 17:09:20 -07:00
Joel Marcey 4a7f2192f9 Add docs survey link to site header
Summary:
**Test plan**

Tested locally to see link in header bar and that it takes you to survey.

![screenshot 2016-05-11 08 21 11](https://cloud.githubusercontent.com/assets/3757713/15186299/593fd4f6-1751-11e6-847f-ea73ce4e2809.png)
Closes https://github.com/facebook/react-native/pull/7514

Differential Revision: D3287859

fbshipit-source-id: 48dfdbae74622330f192d5763c5e47025f1887b1
2016-05-11 11:05:52 -07:00
Milan Pavlik 0fab691e6f Remove default argument syntax on getVersionedGithubPath()
Summary:
Removes ES6 syntax of default arguments to fix website building as per #7434. [More info](https://github.com/facebook/react-native/pull/7434).
Closes https://github.com/facebook/react-native/pull/7439

Differential Revision: D3274206

fb-gh-sync-id: 3a8f5950ead91cf59c27fd384e97bf9587005398
fbshipit-source-id: 3a8f5950ead91cf59c27fd384e97bf9587005398
2016-05-07 14:10:33 -07:00
Milan Pavlik 1d101f4236 Add versions to GitHub source links in documentation. #7428
Summary:
Documentation references to source code on GitHub should point to their respective versions in order to avoid confusion and prevent broken links when the master branch differs from the currently viewed version. [More details](https://github.com/facebook/react-native/issues/7428)

Originally links pointed to a hardcoded master branch on GitHub. The change augments the GitHub url to point to a respective branch of the code. The new urls are as follows:

next: `https://github.com/facebook/react-native/blob/master/<path>`
stable: `https://github.com/facebook/react-native/blob/0.25-stable/<path>`

The website module currently does not have a unit test setup. As a result, I performed the following tests:

1. Start the server with `RN_VERSION=next` and verified all links point to _master_
<img width="945" alt="screen shot 2016-05-07 at 14 10 58" src="https://cloud.githubusercontent.com/assets/1419286/15092307/ee66fb32-145d-11e6-92a0-d03169e517c2.png">
2. Start the server
Closes https://github.com/facebook/react-native/pull/7434

Differential Revision: D3274000

Pulled By: vjeux

fb-gh-sync-id: 70d766984d6b0835f0a18928d6831fd2c82b6c7b
fbshipit-source-id: 70d766984d6b0835f0a18928d6831fd2c82b6c7b
2016-05-07 08:36:21 -07:00
Christopher Chedeau 51e013633c Fix website
Summary:This puts the images inside of the blog folder in the output so we can safely copy them over. And moves the images in /blog/img/ in the source control so it's easier to discover (instead of having to search many levels deep).

Should make the website work!
Closes https://github.com/facebook/react-native/pull/6659

Differential Revision: D3098308

Pulled By: vjeux

fb-gh-sync-id: 99477e27843dd6c88aa854028944f2f0b672db1f
fbshipit-source-id: 99477e27843dd6c88aa854028944f2f0b672db1f
2016-03-25 10:46:25 -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 bcd3c02ae4 Improve website menu on mobile
Summary:Update the layout of the navbar on mobile.

![image](https://cloud.githubusercontent.com/assets/2677334/13731791/a95ab05a-e948-11e5-837e-ca14c96abb1f.png)

**Test plan (required)**

Tested locally in mobile chrome and safari.
Closes https://github.com/facebook/react-native/pull/6438

Differential Revision: D3046701

Pulled By: vjeux

fb-gh-sync-id: 5c8e10867160db584a9055b29f9dd54e4a4d028f
shipit-source-id: 5c8e10867160db584a9055b29f9dd54e4a4d028f
2016-03-13 19:38:26 -07:00
Christopher Chedeau 8c2e531542 Remove Releases tab from header
Summary:This pull request moves the content of the Releases tab to the version number next to the title. With the search bar, the header was getting too crowded.

- I've cleaned up the search style a bit and made it look like the React one (with the background color).
- I've also improved the styling of the versions page.

![screen shot 2016-03-09 at 2 22 17 pm](https://cloud.githubusercontent.com/assets/197597/13652946/e0584326-e603-11e5-96f7-962debb1b43a.png)
Closes https://github.com/facebook/react-native/pull/6388

Differential Revision: D3033151

Pulled By: vjeux

fb-gh-sync-id: ec44f8f1a50331cd001c6cb7723f084751c342ab
shipit-source-id: ec44f8f1a50331cd001c6cb7723f084751c342ab
2016-03-09 19:36:26 -08:00
Christopher Chedeau 4e31148726 Use a version-specific search
Summary:Algolia is now indexing each version of the docs, let's use it :)
Closes https://github.com/facebook/react-native/pull/6385

Differential Revision: D3031426

Pulled By: vjeux

fb-gh-sync-id: f06855bda304f491aaac28663c2d24b142a80d75
shipit-source-id: f06855bda304f491aaac28663c2d24b142a80d75
2016-03-09 13:58:26 -08: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 6c7991c3f2 Added ability to switch version in documentation website
Reviewed By: svcscm

Differential Revision: D2932534

fb-gh-sync-id: e67f028c914b64424458dad8fe52e588f6d0cd1c
shipit-source-id: e67f028c914b64424458dad8fe52e588f6d0cd1c
2016-02-12 11:57:35 -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
Sam de3b942b4d make copyright render the current year
Summary:
As discussed here https://github.com/facebook/react-native/pull/5835 now the copyright is computed from `Date`
Closes https://github.com/facebook/react-native/pull/5847

Reviewed By: svcscm

Differential Revision: D2918854

Pulled By: androidtrunkagent

fb-gh-sync-id: bd5a56111aec1282857ffd469b91f7476b67221d
shipit-source-id: bd5a56111aec1282857ffd469b91f7476b67221d
2016-02-09 16:22:35 -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
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
Janic Duplessis 2d50ac359c Fix issues running the website locally on windows with npm3 2016-01-02 03:56:32 -05:00
Adam Miskiewicz cc1bad54ea [Website] First pass at Algolia Doc Search
It’s not yet responsive :(
2015-12-29 12:45:33 -05:00
Joshua Sierles d9ee81c127 embed an appetize.io simulator for AlertIOS documentation 2015-10-14 19:57:23 +02:00
chirag04 3123f05f3b showcase link on React-native website 2015-08-14 14:34:02 -04:00
Brent Vatne 257bbb5255 [Docs] Add newsletter to top-level header 2015-08-04 13:47:52 -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
Christopher Chedeau 2771fc4c52 Add link for releases 2015-07-16 19:41:22 -07:00
Zhao Han 693ad91f86 Update website header link github url HTTPS
```
$ curl -I  http://github.com/facebook/react-native
HTTP/1.1 301 Moved Permanently
Content-length: 0
Location: https://github.com/facebook/react-native
Connection: close
```

This saves some network time.
2015-05-04 00:27:33 -05:00
Paul O’Shannessy 9c9992e298 [website] Don't link to #content for docs 2015-03-26 11:52:54 -07:00
Ben Alpert 2d23c2fe1f Switch nav design 2015-03-26 09:53:54 -07:00
Christopher Chedeau 8b8e9f906a Update website 2015-03-26 06:43:45 -07:00
Ben Alpert 8d2632bfd1 [website] White OG image, favicon 2015-03-25 18:47:03 -07:00
Christopher Chedeau a7452c4a5f White logo 2015-03-25 13:32:42 -07:00
Christopher Chedeau 4eab005009 Improve style docs 2015-03-25 11:36:37 -07:00
Christopher Chedeau e811181034 Add copyright header on website files 2015-03-23 10:56:09 -07:00
Christopher Chedeau a738b49ae2 Website: initial page for videos 2015-03-23 09:48:43 -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 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
Andrew Turner 7cb5ac230e removed 2014 from copyright 2015-02-12 18:34:38 -06:00
Andrew Turner fe0054f70f Merge branch 'master' into copyright-patch 2015-02-12 18:32:21 -06:00
Christopher Chedeau 70f28332b6 Initial version of the automatically generated docs 2015-02-12 14:44:00 -08:00
Christopher Chedeau bd53b4191f setup twitter feed and google analytics 2015-02-12 11:52:23 -08:00
Andrew Turner f10bdd205e updated copyright year 2015-02-11 23:15:08 -06:00
Christopher Chedeau 9231d4f8f0 Initial version of the website and docs. 2015-02-11 20:26:43 -08:00