Commit Graph

86 Commits

Author SHA1 Message Date
Janic Duplessis 0cd69e8a02 Run eslint --fix
Summary:
CI is currently failing because of a lint issue, this fixes it and a bunch of other warnings that are auto-fixable.

**Test plan**
Quick manual test, cosmetic changes only.
Closes https://github.com/facebook/react-native/pull/16229

Differential Revision: D6009748

Pulled By: TheSavior

fbshipit-source-id: cabd44fed99dd90bd0b35626492719c139c89f34
2017-10-09 17:46:44 -07:00
Gabriel Oliveira 2b86aba390 Add "- React Native" to all pages title in doc section
Summary:
<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->
Changing all pages in doc to have title " - React Native", which will make the results easier to distinguish like suggested in issue #15659.

I'm not shure how to write a test to this but if you open any page in doc you can see the page title has changed when the title is passed to Site component.
Closes https://github.com/facebook/react-native/pull/15714

Differential Revision: D5739971

Pulled By: TheSavior

fbshipit-source-id: ba9b5ea83fe5c502653972262eb993a24941a62e
2017-08-30 15:31:30 -07:00
Hector Ramos 5be8c4af26 Cleanup stray markdown files, update contributing guidelines
Summary:
Several changes here. The `Text.md` and `PixelRatio.md` files were appended to the autodocs during site generation. This seemed excessive for just two files, so I've just merged the content into the autodocs themselves. It should help us simplify the website generation process in the future.

I've also merged IssueGuidelines.md and PullRequestGuidelines.md into the Contribution/Maintainers guidelines to improve their visibility.

Finally, I renamed Help to Community in the nav bar.

Ran the website locally, and verified every page rendered as expected: the Community page, Contributing page, Maintainers page.
Closes https://github.com/facebook/react-native/pull/15374

Differential Revision: D5567400

Pulled By: hramos

fbshipit-source-id: e06056edb12c9a17319fe1af46b2ef3a2e1b5854
2017-08-04 16:18:01 -07:00
Hector Ramos aadeff032f What to Expect from Maintainers
Summary:
Adds a new maintainers guide, and updates the contributor's guide to be consistent with regards to this new guide.

Some additional style changes made in order to support the display of bot commands. Changed the wording for the "Edit this page on GitHub" link.

Finally, the contributor's guide is now synced to `CONTRIBUTING.md` on the repo.

```
cd website && npm start
```

Verify that `CONTRIBUTING.md` is updated whenever the website is regenerated.

Verify everything rendered correctly. Expand the details below to see screenshots.

<details>

![screencapture-localhost-8079-react-native-docs-contributing-html-1501016495792](https://user-images.githubusercontent.com/165856/28593706-33d1e03c-7142-11e7-9878-04ead7561abc.png)

![screencapture-localhost-8079-react-native-docs-maintainers-html-1501016508744](https://user-images.githubusercontent.com/165856/28593719-3812d7fa-7142-11e7-9db2-f9599057d726.png)
</details>
Closes https://github.com/facebook/react-native/pull/15202

Differential Revision: D5494246

Pulled By: hramos

fbshipit-source-id: e28d5624d1e4795e212f10e8d5713d91a0eae15f
2017-07-28 08:18:53 -07:00
Brian Vaughn fca30005a2 creatClass codemod
Reviewed By: sebmarkbage

Differential Revision: D5484225

fbshipit-source-id: dc1414862e5823d1aa925f27a68f596ada627b48
2017-07-25 10:28:42 -07:00
Fred Liu 1728a866ef Revert D5465182: creatClass codemod
Differential Revision: D5465182

fbshipit-source-id: a15de76f50294123323e211f8e11106b90fff911
2017-07-20 19:32:33 -07:00
Brian Vaughn 500d5e23a6 creatClass codemod
Reviewed By: acdlite, flarnie

Differential Revision: D5465182

fbshipit-source-id: 084d364abb7bf74e799dbf24a4c1c01a3bf7cd46
2017-07-20 18:18:56 -07:00
Hector Ramos 75eb55096e Increase text size, rename Tutorial, update nav...
Summary:
Several things here. See commits.
Closes https://github.com/facebook/react-native/pull/14757

Differential Revision: D5332034

Pulled By: hramos

fbshipit-source-id: 6ff9e33c0bc9d2ea3dd5b1a4752621ce7e83f9bb
2017-06-27 14:18:07 -07:00
Hector Ramos c419ae8c8d Update ListView Basics to use FlatList, SectionList.
Summary:
The new list views, FlatList and SectionList, are recommended over ListView.

Built website on localhost and verified the guide is rendered correctly.

![screencapture-localhost-8079-react-native-docs-using-a-listview-html-1495834607096](https://cloud.githubusercontent.com/assets/165856/26513523/c5d2913a-4220-11e7-8c8d-68bb12c75736.png)
Closes https://github.com/facebook/react-native/pull/14210

Differential Revision: D5149151

Pulled By: hramos

fbshipit-source-id: f28f02ee8893c4723c73d610b96ccda51cc31410
2017-06-02 12:45:59 -07:00
Hector Ramos 0a6935618c Add support for syntax highlighting for languages other than JS
Summary:
The current website defaults to using JavaScript for any code block, regardless of language tag. This PR adds syntax highlighting support by passing the necessary language prop and by adding any missing languages to Marked.js.

Depends on #14212, #14065
Closes https://github.com/facebook/react-native/pull/14215

Differential Revision: D5149897

Pulled By: hramos

fbshipit-source-id: 95a817af2168d5743c75dd1ac030d399a68fb93c
2017-05-30 14:36:06 -07:00
unexge 6cd3167b99 website: Update prism regexes for better JavaScript code highlight
Summary:
Before:
![screen shot 2017-05-19 at 20 01 28](https://cloud.githubusercontent.com/assets/16212576/26259151/4ed69f18-3cd0-11e7-8c83-6a64646100b5.png)

After:
![screen shot 2017-05-19 at 20 01 11](https://cloud.githubusercontent.com/assets/16212576/26259166/58525ef6-3cd0-11e7-97e5-ed8f0e0a861a.png)
Closes https://github.com/facebook/react-native/pull/14065

Differential Revision: D5142775

Pulled By: hramos

fbshipit-source-id: 89dff95a5a6921365368ba223c1c8299092ba72f
2017-05-26 17:52:04 -07:00
Adam Perry 0c9b41f2c0 Include Create React Native App in Getting Started
Summary:
cc hramos

Create React Native App was designed to reduce "time to hello world" to 5-10 minutes for React Native apps. This PR would make CRNA the first way to get started that new users encounter. Included also is some text to help advanced users navigate the question of whether to use CRNA or whether to go straight to `react-native init`. It also includes a new banner for the iOS and Android guides, since they do not apply to CRNA users.

Changes are only to the website, screenshots below. This branch was created from the last CI-passing master commit this morning, dependencies were freshly installed and these screenshots are from a clean build.

[The Getting Started page](https://www.dropbox.com/s/1s7f3wu3oxr6gpo/Screenshot%202017-04-04%2015.12.29.png?dl=0)

[The "native builds only" banner](https://www.dropbox.com/s/nyv51xdiibdkn57/Screenshot%202017-04-04%2015.13.25.png?dl=0)

[Pages which still apply to CRNApps have no banner](https://www.dropbox.com/s/qgl0h6uzynqkmy2/Screenshot%202017-04-04%2015.14.10.png?dl=0)

<details>

* [x] Decide how to handle native code & react-native-cli references outside of the `banner: ejected` guides
  * [x] [Debugging: Accessing Console Logs](https://facebook.github.io/react-native/docs/debugging.html#accessing-console-logs) isn't needed in CRNA (logs are forwarded alongside packager output)
  * [x] [Debugging: With Stetho](https://facebook.github.io/react-native/docs/debugging.html#debugging-with-stetho-http-facebook-github-io-stetho-on-android) requires native code
  * [x] [Debugging: Debugging Native Code](https://facebook.github.io/react-native/docs/debugging.html#debugging-native-code) is native-only
  * [x] [AppRegistry](https://facebook.github.io/react-native/docs/appregistry.html) only applies to ejected apps, since this is generated from code, I don't think we can set `banner: ejected`?
  * [x] [Linking](https://facebook.github.io/react-native/docs/linking.html) involves changing Android manifests and other native-side things
  * [x] [PermissionsAndroid](https://facebook.github.io/react-native/docs/permissionsandroid.html) may be flaky in the Expo client, I can't recall (cc jesseruder)
  * [x] [PushNotificationIOS](https://facebook.github.io/react-native/docs/pushnotificationios.html) won't work inside Expo, as it has to [handle its own push notifs](https://docs.expo.io/versions/v15.0.0/guides/push-notifications.html)
  * [x] [Geolocation](https://facebook.github.io/react-native/docs/geolocation.html) requires a polyfill that will most likely ship with next week's release, but that won't have any manifest changes necessary
* [ ] Figure out a strategy to handle the fact that CRNA will lag stable RN releases by ~1 week
* [x] Confirm linking out to CRNA docs is an OK strategy as opposed to moving ejecting, etc. docs in-tree
* [ ] Answer questions (I'll add some review comments to call out a few things)

</details>
Closes https://github.com/facebook/react-native/pull/13303

Differential Revision: D4950661

Pulled By: hramos

fbshipit-source-id: 3dd43828f38ca6ede3f2b0683608c56420dc6525
2017-04-26 07:16:18 -07:00
Brian Vaughn 6564edce5e Ran PropTypes -> prop-types codemod against Libraries/FBReactKit/js/react-native-github
Reviewed By: acdlite

Differential Revision: D4876709

fbshipit-source-id: 3a5e92bfc74287b7a9054546c438580bed0147af
2017-04-12 16:15:15 -07:00
Brent Vatne b8542397cd Move away from rnplay to snack, with embedded examples!
Summary:
React Native Playground has been sunset, so I've replaced the examples that previously used it with examples using [Snack](http://snack.expo.io/).

The examples are directly embedded and can be edited live to see updates. The code itself is also in the docs, so we can easily update the docs in one place and we don't have to actually go to a saved app on Snack and update it there.

Run it locally, go to the `Animations` section and the `Direct Manipulation` section.

![screen shot 2017-04-03 at 6 29 51 pm](https://cloud.githubusercontent.com/assets/90494/24638271/ff3ad044-189b-11e7-845d-24b2fb612d95.png)

Open it on your phone, notice that it falls back to just showing plain code.

<img src="https://cloud.githubusercontent.com/assets/90494/24638547/203ec8fc-189e-11e7-99c8-dfabff949f8d.PNG" width="250">

- Get rid of the Expo new user experience dialog that you see when you open a Snack -- is this a dealbreaker
Closes https://github.com/facebook/react-native/pull/13285

Differential Revision: D4828011

Pulled By: hramos

fbshipit-source-id: 684ad24a14deb72abb8587ffbb726d316f126d75
2017-04-05 19:02:48 -07:00
Hector Ramos f65a3c4a4b Replace defaultLink with infoLink in Showcase
Reviewed By: ericvicenti

Differential Revision: D4671154

fbshipit-source-id: ee9df269b91ec140afc8dace9bbf960f9a47f0b0
2017-03-08 00:52:16 -08:00
Hector Ramos d54c7f8282 Refresh website
Reviewed By: mkonicek

Differential Revision: D4634272

fbshipit-source-id: 97d22115ffa29456ce253ad8c97a720d0c4e4d53
2017-03-01 11:00:49 -08:00
Andrew Rasmussen bf5aa9e1e7 Product Pains -> Canny
Summary:
We migrated everyone on Product Pains over to our new service, Canny. We also moved every product's feedback to a product-specific subdomain (eg. https://react-native.canny.io/feature-requests).

This PR updates every Product Pains URL over to its new Canny version.

Changes only affect docs, blog posts, and bot responses - not the React Native library itself.

**Test plan**

I visited https://react-native.canny.io/feature-requests. Since there are no code changes this seems sufficient but let me know if I need to run the blog website or something.
Closes https://github.com/facebook/react-native/pull/12429

Differential Revision: D4581492

Pulled By: hramos

fbshipit-source-id: 7d124ab7ed9228d47f1bc4417d8992f15ff17f01
2017-02-17 15:02:23 -08:00
Damien 474cb60fd3 fix `for` being used instead of `htmlFor`
Summary:
When building the website, I saw this warning:

`Warning: Unknown DOM property for. Did you mean htmlFor?`

So, here's the fix.

 1. do `npm start`
 2. load the homepage (with the newsletter input)
 3. see warning: `Warning: Unknown DOM property for. Did you mean htmlFor?`
Closes https://github.com/facebook/react-native/pull/10948

Differential Revision: D4200031

Pulled By: hramos

fbshipit-source-id: 7a17e3961ec59a1f28e81d3639a5376880873bd6
2016-11-25 19:13:29 -08:00
Tim Yung 23331df5a4 RN: Cleanup OSS JS & Flow Declarations
Reviewed By: vjeux

Differential Revision: D4210763

fbshipit-source-id: 5abaa547100b8badd13bcf311ceffc5b4098d252
2016-11-20 17:58:29 -08:00
Devin Abbott 7596e1aaec In docs, bump web player version to fix chromium rendering issue
Summary:
Updates the docs to use the latest version of React Native Web Player.

Fixes rendering issue on Ubuntu + Chromium: #10634

Before:
![ubuntu_64-bit_16_04](https://cloud.githubusercontent.com/assets/1198882/19876803/d687093e-9f96-11e6-9fd3-b3fe66d07ae6.png)

After:
![ubuntu_64-bit_16_04_and_windows_10_x64](https://cloud.githubusercontent.com/assets/1198882/19876807/dcfdf548-9f96-11e6-80c2-d0ab34b41cb0.png)
Closes https://github.com/facebook/react-native/pull/10667

Differential Revision: D4111783

Pulled By: hramos

fbshipit-source-id: df755f87c52e81b784fdcfa99ff77357b194d03e
2016-11-09 19:58:39 -08:00
Héctor Ramos 9439b25e33 Subscribe to reactnative.cc Newsletter
Summary:
Subscribe to the existing reactnative.cc newsletter in the footer.
Closes https://github.com/facebook/react-native/pull/10792

Differential Revision: D4154743

Pulled By: hramos

fbshipit-source-id: cf1d02a8268e90686539894be09a91f50554ebf0
2016-11-09 13:58:54 -08:00
Héctor Ramos bdbadd1142 Re-style Blog, Add Newsletter Signup Form
Summary:
The goal of this PR is to place greater emphasis on the blog as a destination.

The dark Hero from the landing page is now present in the blog as well, and the content is front and center.

The sidebar has been removed. It is not necessary to show a list of recent blog posts in the sidebar when the blog landing page shows the same number of posts along with short excerpts.

The prev/next links have swapped positions, and will now display "Older posts" and "Newer posts".

The excerpts have been stripped of formatting and they are now consistent across the blog landing page and the OpenGraph metatags. Fixes #10597.

A signup form for the new React Native newsletter has been added to the footer.

Newsletter signup form in footer:

![screencapture-localhost-8079-react-native-1477944030909](https://cloud.githubusercontent.com/assets/165856/19869614/4bb035aa-9f6a-11e6-9b8e-e0333417f423.png)

Blog landing page:

![screencapture-localhost-8079-r
Closes https://github.com/facebook/react-native/pull/10660

Differential Revision: D4117034

Pulled By: bestander

fbshipit-source-id: 215f966008fdf5c8870ed28d92384034a0d23c39
2016-11-02 05:43:43 -07:00
Sadika Sumanapala 93ed185c3d Use HTTPS in the OG image on the website
Summary:
Use https instead of http
Closes https://github.com/facebook/react-native/pull/10619

Differential Revision: D4100991

fbshipit-source-id: 200f3df3b02db36182fc176f2d654ba780d121e3
2016-10-29 01:28:36 -07:00
Héctor Ramos 9cb370dd5b Generate Atom feed for the React Native blog.
Summary:
An Atom feed is now generated as part of the build script. This is done statically and not as a React view because React is not the right tool for generating XML documents.

Some additional metadata is stored in `metadata-blog.js` and duplicated to `metadata-blog.json` in the `server/` directory to aid in the generation of the feed. Let me know if there's a better way to import this data using the existing Haste module that wouldn't require writing an additional JSON file.

The feed will be available at https://facebook.github.io/react-native/blog.xml

A sample output of the Atom feed is included at the bottom. It is a [valid Atom 1.0 feed](https://validator.w3.org/feed/check.cgi), with some additional recommendations that can be ignored for now.

> Congratulations!
>
> [Valid Atom 1.0] This is a valid Atom 1.0 feed.
> Recommendations
>
> This feed is valid, but interoperability with the widest range of feed readers could be improved by implementing the following recommendations.
> line 2, col
Closes https://github.com/facebook/react-native/pull/10611

Differential Revision: D4097381

Pulled By: mkonicek

fbshipit-source-id: 8d2e18923358d1903b2715b00c48680b0c4dff68
2016-10-28 13:28:37 -07:00
Héctor Ramos 9f792c2bae Fix footer background issues in the blog index.
Summary:
Fixes #10091.

Some now unused CSS is removed here as well.
Closes https://github.com/facebook/react-native/pull/10092

Differential Revision: D3919399

Pulled By: hramos

fbshipit-source-id: ed29c4a3e1ba01d930013db04862bce3fa4c5cbb
2016-09-24 13:50:19 -07:00
Héctor Ramos b2821c3345 Add footer
Summary:
Add footer to all pages in the website.

Preview:
![screencapture-localhost-8079-react-native-docs-network-html-1474655915887](https://cloud.githubusercontent.com/assets/165856/18797357/76a92e48-8182-11e6-8db7-74f241a9fa2c.png)
Closes https://github.com/facebook/react-native/pull/10075

Differential Revision: D3917827

Pulled By: lacker

fbshipit-source-id: f8a38feed616c4a05c29c9efef31d40ce93b5fd5
2016-09-23 19:58:32 -07:00
Héctor Ramos 7dff5d2e30 Load React Native Web Player from MaxCDN.
Summary:
unpkg (nee npmcdn) will [no longer serve HTML content with the text/html Content-Type](https://twitter.com/mjackson/status/779147399528718336). We need to switch to another provider to continue supporting the RN Web Player.
Closes https://github.com/facebook/react-native/pull/10072

Differential Revision: D3914585

Pulled By: lacker

fbshipit-source-id: 69833c157775f2b255f1cd11c5b52140d12a27be
2016-09-23 11:28:33 -07:00
Héctor Ramos f1ce6426fe Rename Support to Help, and re-style to better guide users to help themselves
Summary:
Duplicate of #9552 which failed to land internally.
Closes https://github.com/facebook/react-native/pull/9796

Differential Revision: D3896927

Pulled By: hramos

fbshipit-source-id: 98d60827b72a272331d4d4287be4726cca0c4422
2016-09-21 16:43:38 -07:00
Héctor Ramos 999ebb154d Deploy showcase, support when building gh-pages on master.
Summary:
Addresses #9865.

We want the showcase and support pages to be loaded from root regardless of which React Native version is selected.
Closes https://github.com/facebook/react-native/pull/10004

Differential Revision: D3896505

Pulled By: bestander

fbshipit-source-id: 0db64f72bca8bc68d6d489fa3ed34c0a6f671002
2016-09-20 15:58:48 -07:00
Héctor Ramos c3b4136d93 New Post: Unraveling Navigation
Summary:
Lets highlight interesting videos on React Native from community events as well as Facebook events. First up, skevy's talk on mobile navigation.

![screencapture-localhost-8079-react-native-blog-1473287447105](https://cloud.githubusercontent.com/assets/165856/18330912/3ed2b4cc-7510-11e6-92df-c0806765bd61.png)
Closes https://github.com/facebook/react-native/pull/9800

Differential Revision: D3834923

Pulled By: mkonicek

fbshipit-source-id: 4c7a4ec8b0ff329fd7c530925021b274987df9b5
2016-09-08 06:59:00 -07:00
Héctor Ramos e22abd91bf Add support for video embeds in blog posts.
Summary:
Similar to the Hero image functionality. If a video URL is present in the post metadata, it will be displayed instead of a Hero image. This will be useful when highlighting videos in blog posts.

Renamed ReadMoreLink into a more generic ExceptLink which will display "Watch video" when the blog post category is "videos".

Currently there is no way of listing blog posts by categories, but it may be useful to do so later once we have a larger catalog of content.
Closes https://github.com/facebook/react-native/pull/9794

Differential Revision: D3828862

Pulled By: mkonicek

fbshipit-source-id: 1a88aab5edcdf7c84bb679263d6b97d52cf201a2
2016-09-07 13:10:12 -07:00
Héctor Ramos 81864e1298 Fix broken link in blog page links.
Summary:
This fixes an issue that would have arised once our number of blog posts passed 10, as the prev/next links in the footer were using the wrong path ("jest/", instead of "react-native/").

I also capped the number of recent blog posts to 10 in the sidebar.
Closes https://github.com/facebook/react-native/pull/9670

Differential Revision: D3819973

Pulled By: mkonicek

fbshipit-source-id: 321fe99654e10a4ad3e0815540518c8e9202385f
2016-09-05 14:28:45 -07:00
Héctor Ramos 5d32075363 Remove short descriptions for non-blog-post layouts
Summary:
My earlier PR, #9648, introduced an issue that [broke the website](https://circleci.com/gh/facebook/react-native/10634). This PR addresses the issue.
Closes https://github.com/facebook/react-native/pull/9666

Differential Revision: D3791596

Pulled By: JoelMarcey

fbshipit-source-id: a7bc33ce0f640c2760ae612dee589c0ceb31803e
2016-08-30 10:58:45 -07:00
Héctor Ramos db621b03b6 Improve social share previews, expand author bylines
Summary:
Several blog and sharing improvements are included in this update.

* A larger default preview image is used when a blog post or doc is shared on social media as recommended by [best practices](https://developers.facebook.com/docs/sharing/best-practices#images).
* Follow other Facebook Sharing best practices such as associating the site with a Facebook Page (React) and a Page Admin (121800083 is my fbid, and I am an admin for the React page).
* If the shared blog post contains a hero image, use it as a share preview image.
* Use actual doc content instead of generic site description when sharing docs.
* Update existing hero images to use the larger recommended size.
* Add titles to each author's byline.
* Add author's avatar to their byline.
* Add Twitter Card support.
* Link to individual blog posts from the title and hero image in the blog index.

Old metadata tags (blog post):
```
<meta property="og:title" content="Toward Better Documentation – React Native | A framework for building native
Closes https://github.com/facebook/react-native/pull/9648

Differential Revision: D3790332

Pulled By: hramos

fbshipit-source-id: 4f284c6440482df8a42a2b8467ccf56b1fd725d1
2016-08-29 23:13:43 -07:00
Héctor Ramos a282be9a18 Link to individual blog posts from post title
Summary:
Linkify the blog post title when the excerpt is displayed in the blog index.

Update Facebook OpenGraph meta tags for individual blog posts to fix sharing previews.
Closes https://github.com/facebook/react-native/pull/9590

Differential Revision: D3771630

Pulled By: bestander

fbshipit-source-id: dc428ecc2d7939c143f000b8af9d4df9b512d0fc
2016-08-25 11:13:52 -07:00
Héctor Ramos 777a9c0a0e Update Blog Layout
Summary:
Updated the blog's styling to make it more readable.

* BlogPageLayout (blog index) - Only excerpts from each article are now shown, as opposed to the entire article.
* BlogPost - Broken up into headers, footers. Reorder header so that the blog post title is closer to the content. Adds support for hero images (visible from the blog index). Adds Facebook, Twitter social share buttons. List items are properly spaced now.

Blog index:
![screencapture-localhost-8079-react-native-blog-1471905976431](https://cloud.githubusercontent.com/assets/165856/17874405/4ee4fc22-6880-11e6-8344-2ed823f6000e.png)

Single blog post:
![screencapture-localhost-8079-react-native-blog-2016-08-12-react-native-meetup-san-francisco-html-1471905997923](https://cloud.githubusercontent.com/assets/165856/17874407/52af9e7a-6880-11e6-99f0-91f90331aced.png)
Closes https://github.com/facebook/react-native/pull/9532

Differential Revision: D3758524

Pulled By: bestander

fbshipit-source-id: 6385a3e98a3a44343c3b1d3105a32023b748c2c6
2016-08-23 12:13:47 -07:00
Héctor Ramos 35a6cbac71 San Francisco React Native meetup recap
Summary:
New blog up up for review. I've added a bit of padding between posts in the blog index as well.
Closes https://github.com/facebook/react-native/pull/9362

Differential Revision: D3717908

Pulled By: bestander

fbshipit-source-id: ac3c01c43685548c6fa336541ccb9a9a01dd52a8
2016-08-15 12:28:46 -07:00
Héctor Ramos 01cb1e4ef6 Update Edit on GitHub links to point to master
Summary:
We've been getting a lot of documentation PRs opened against `0.29-stable`, `0.30-stable`, and so on, instead of `master`. This is because our doc site is also based on RN release cuts, so clicking on the "Edit on GitHub" links on a document will take you to the markdown source for that release branch instead of the latest doc on `master`.

See #9095 for an example of such a PR.

In this PR we edit the link to say View on GitHub. Though it may not prevent PRs from being opened against a release branch, removing the "Edit" CTA may help in this regard.
Closes https://github.com/facebook/react-native/pull/9149

Differential Revision: D3664368

Pulled By: vjeux

fbshipit-source-id: 395c0813f736bfbe1be4b4fb1182f9060169365d
2016-08-03 17:43:49 -07:00
Joel Marcey cb31d4cb6d Use tabIndex instead of tabindex
Summary:
There is a little bit of dogscience here, but I believe JSX is wanting
`tabIndex` instead of `tabindex`. We have `tabindex` as an attribute in
our Algolia search; changing it to `tabIndex` removes the warning.

**Before**

<img width="1262" alt="screenshot 2016-07-12 11 05 47" src="https://cloud.githubusercontent.com/assets/3757713/16772199/4bff2d0e-4821-11e6-822f-a729656fec53.png">

**After**

<img width="1254" alt="screenshot 2016-07-12 11 09 47" src="https://cloud.githubusercontent.com/assets/3757713/16772201/4e09eb34-4821-11e6-9c5e-5e3d7e21c4bd.png">
Closes https://github.com/facebook/react-native/pull/8721

Differential Revision: D3550398

fbshipit-source-id: b7821d1940cd4c7880ee6fb907bcb16b44087750
2016-07-12 12:28:22 -07:00
Devin Abbott 43231c0524 Update web player and add it to UsingAListView docs page.
Summary:
Update web player (which now uses 0.0.29 of react-native-web) to support ListView. lacker

**Test plan (required)**

![screen shot 2016-07-05 at 7 15 08 pm](https://cloud.githubusercontent.com/assets/1198882/16605576/10f80956-42e5-11e6-8b19-4b8242625d23.png)
Closes https://github.com/facebook/react-native/pull/8591

Differential Revision: D3521276

Pulled By: JoelMarcey

fbshipit-source-id: 896a7ee77b9592f7cf95d6d48e5f4ddea76f5f07
2016-07-05 20:13:40 -07:00
Devin Abbott 550db2fda0 Use npmcdn in docs instead of rawgit for web player
Summary:
Switch web player cdn to npmcdn per discussion with lacker. This will make the url agnostic to who owns the git repo.
Closes https://github.com/facebook/react-native/pull/8426

Differential Revision: D3488755

Pulled By: lacker

fbshipit-source-id: b54dd4428a48c8a5a15b0b38ee0564d119916f9b
2016-06-27 10:58:31 -07:00
Devin Abbott 1ae9ed358f Update web player in docs for custom registerComponent names
Summary:
In the web player in the docs, allows `AppRegistry.registerComponent('name', App)` to use *anything* for `'name'`. It is ignored by the web player - last registration wins.
Closes https://github.com/facebook/react-native/pull/8383

Differential Revision: D3478922

Pulled By: JoelMarcey

fbshipit-source-id: 3d1d96e0ad41216d29134ba384896e86d0cd2b32
2016-06-23 17:43:35 -07:00
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