Commit Graph

2239 Commits

Author SHA1 Message Date
Alessandro Annini
b9d31896b7 Added js highlighting (#2610) 2017-09-25 22:23:47 +02:00
Masayuki Iwai
e977fce886 Make GESTURE_RESPONSE_DISTANCE_* configurable. (#2172)
* Make gestureResponseDistance configurable.

* Fix format.

* Set vertical and horizontal distance individually.

* Fix type error.

* Move gestureResponseDistance to NavigationStackScreenOptions.

* Add documentation.
2017-09-26 04:16:13 +09:00
Ashoat Tevosyan
8392f67b1f Fix Flow types (and update RN version) (#2619)
* Fix .flowconfig to stop ignoring modules and properly include React Native libraries

Currently, there are numerous ignored libraries that are hiding type errors. Actually, they're causing type errors too. This sort of thing only patches over actual problems, so we have to revert them to get a config we can build upon.

* Update react-native/flow-bin dependencies

We want to have Flow types working with the latest packages.

* Update flow-typed libraries (auto-generated)

* Fix typing of navigation prop used by withNavigation HOC

The current typing is clearly a typo, as it is circular. `NavigationScreenProp` should be used to type the navigation prop

* Fix typing of easing function

What's funny is that I fixed this before in d71ed75133. @skevy reintroduced the mistyped function in 9436d03fe8, which didn't trigger any Flow errors because .flowconfig was ignoring the entire react-native package

* Correct typing of View and Text style prop

The current code thinks it can import these, but this isn't true, and was being hidden because the .flowconfig ignored the whole react-native package. There's no easy to type Text and View at the current moment, as far as I can tell. Importing the highly generic `StyleObj` seems like the best bet, and is what I have being using in my projects.

* Import NavigationScreenComponent using full path

* Updating yarn.lock files

* Get rid of library overrides in flow-typed/react-native.js and flow/react-navigation.js

* Add @flow to src/react-navigation.js and make last three params to createNavigator optional

* Make screenProps and navigationOptions optional in NavigationNavigatorProps

* yarn run format

* Readd react-navigation/node_modules ignore to NavigationPlayground's .flowconfig

Realized this line I removed in the first commit is necessary when using npm link/yarn link, which is what the CircleCI build does

* Make all DrawerViewConfig's params optional

Some of these params are marked as optional because they have defaults. However, the only place `DrawerViewConfig` is used is as the input the function that then applies the defaults

* Make all props in NavigationNavigatorProps optional

`NavigationNavigatorProps` is used to type the props of the component that is output by the `StackNavigator`, `TabNavigator`, etc. component factories. This component does not need to have any props specified.

* Make second param to `DrawerNavigator` factory optional

`DrawerNavigator`, just like `TabNavigator` and `StackNavigator`, can be called with just a single argument (ie. omitting the config)

* Upgrade to RN 0.48.4 to address https://github.com/facebook/react-native/issues/15810
2017-09-25 12:29:34 -04:00
Jeff Mendez
b5e98bb47d drawerLockMode (#1377)
* added drawerLockMode with cabilities to update it on the fly

* fixed incorrect name on markdown for usage

* added handling if screenProps is not being used

* Fix linting error

* Use drawerLockMode instead of lockMode

* Correct docs

* Fix flow issues

* Make drawerLockMode optional
2017-09-21 13:53:46 -04:00
Matt Hamil
cbe7757bb4 Reverting last commit (#2626) 2017-09-20 15:08:11 -05:00
Matt Hamil
0ff1016d7d Merge branch 'master' into master 2017-09-20 14:40:37 -05:00
Sakamoto, Kazunori
d10aaaac2e Refactor .eslintrc to be more readable. (#2595)
- Replace 0, 1 and 2 with "off", "warn" and "error" because strings seem more readable than numbers.
2017-09-16 07:21:08 +09:00
Sakamoto, Kazunori
023f598cfc Employ pre-commit hook for formatting code. (#2597)
This change comes thanks to @plasticine's great idea (https://github.com/react-community/react-navigation/pull/2581#issuecomment-329661371).
- Add husky and lint-staged to use pre-commit hook.
- Automate formatting JavaScript code using ESLint and Prettier before committing changes.
2017-09-16 07:17:09 +09:00
andry-baka
5d8869e24e Doc Improvement: goBack key doc improvement (#2035)
* chore(Doc Improvement): goBack key doc improvement

* chore(Doc improvement): fix wording

* chore(Doc Improvement): fix uppercase/lowercase wording
2017-09-16 04:43:35 +07:00
Tomas Reimers
84bfd563fa Update documentation on Title. (#2092) 2017-09-15 14:36:44 -07:00
Peter Piekarczyk
5cd1a4352a Add Syntax highlighting to Redux-Integration.md (#2355)
* Add Syntax highlighting to Redux-Integration.md

* Update Redux-Integration.md
2017-09-15 16:21:16 -05:00
Matt Hamil
3ba7690531 Add RNNavigation Links Repo to README (#2586)
* Add RNNavigation Links Repo to README

* Changed = to -
2017-09-15 16:13:46 -05:00
Spencer Carli
b28695ac6e Merge branch 'probeadd-master' 2017-09-15 16:02:11 -05:00
Jonathan Kim
3e633f5d22 Add documentation for useNativeAnimations option in DrawerNavigator (#2593) 2017-09-15 13:49:54 -07:00
Justin Morris
f33e3884cb Trivial: cleanup warnings in test suite (#2581)
* Mock and verify console warnings to prevent noise in the test output.

* Tighten up expectations on deprecation output.

* 80 column formatting.

* Actually fix formatting.
2017-09-15 23:42:23 +10:00
Justin Morris
b0cc71e3d0 Trivial: Ignore the jest setup file when calculating test coverage. (#2579)
* Ignore the jest setup file when calculating test coverage.

* Actually collect coverage from the whole library codebase so that the numbers are actually useful.
2017-09-15 12:02:09 +10:00
Spencer Carli
88131ca16a Blog: A (Renewed) Path to React Navigation V1 2017-09-14 20:24:03 -05:00
Jonathan Kim
770d333952 Expose useNativeAnimations for Drawer navigator (#2568)
* Expose useNativeAnimations for Drawer navigator

* Default useNativeAnimations to true
2017-09-12 09:03:37 -07:00
Kevin Cooper
a896357897 Accept a tabBarOnPress param (#1335)
* Accept a 'tabBarOnPress' param

* Make tabBarOnPress a navigationOption
2017-09-12 10:17:37 -04:00
Tom Aranda
826462c039 Update top-level component nav documentation (#2543)
The code example listed in the current documentation results in a deprecation warning.  This update should work.
2017-09-09 11:13:32 -05:00
Joey Baker
66c660d732 Fix actually remove openURL event listener (#2235)
Previously, we were creating an anonymous function as the event listener handler. This means we can't un-listen because we don't have a reference to the handler.
2017-09-09 09:09:18 -07:00
Kevin Cooper
4adce69e70 Upgrade the ReduxExample app (use CRNA) (#2171)
* [ReduxExample] Delete android and ios dirs

* [ReduxExample] Upgrade using create-react-native-app

* [ReduxExample] Add postinstall script to clean up files Yarn copies in

Yarn copies them when installing locally, causing lots of @proviesModule collisions.

* [ReduxExample] Upgrade expo and other dependencies

* [ReduxExample] Don't delete .git just in case
2017-09-06 22:02:57 -04:00
Aleksey Kuznetsov
eae3d3fb97 Add custom transitioner example to NavigationPlayground (#2412) 2017-09-07 04:41:41 +04:00
Adam Miskiewicz
2da34eb413 Update CI docker image 2017-09-06 15:51:46 -07:00
Adam Miskiewicz
426c36bdc9 Use token when running 'now alias' 2017-09-06 15:13:50 -07:00
Adam Miskiewicz
d28c92d1b1 Deploy website using NOW_TOKEN 2017-09-06 14:59:22 -07:00
Spencer Carli
6b0ce55aba Fix Website Build (#2526)
* Update .eslintrc to allow compile.

* Resolve .web.js extension

* Look for __DEV__ on global

Fixes ReferenceError when not in the React Native environment.

* Replace __DEV__ at compile time via babel

* Don't try to lint a website build
2017-09-06 16:08:08 -05:00
Spencer Carli
d8fc3ea93d Revert changes to yarn.lock (#2545)
* Rollback changes to yarn.lock

* Update react-native-tab-view in yarn.lock
2017-09-06 13:22:08 -05:00
Manu Bamba
f49f84d912 Fixed issue with tab navigation (#2527) 2017-09-06 22:12:48 +05:30
Kevin Cooper
fa2214c3cb Fix the NavigationPlayground example! (#2170)
* [Playground] Commit auto-changes to package.json, yarn.lock

* [Playground] Rerun create-react-native-app

Preserving rn-cli.js and transformer.js

Still not quite working.

* [Playground] Fix the Expo loading issue by removing projectRoots

Now it looks in the right place to find its resources, including 'entryPoint'.

* [Playground] Add postinstall script to clean up files Yarn copies in

Yarn copies them when installing locally, causing lots of @providesModule collisions.

* Update the Contributors guide to explain how to use the example app

And recommend Yarn by default

* [Playground] Remove now-obsolete rn-cli.config.js

* [Playground] Upgrade expo and other dependencies

* [Playground] Don't delete .git just in case
2017-09-06 11:36:21 -04:00
Hawken Rives
67f034fea4 pin react-native-tab-view with ~ instead of ^ (#2348)
Because react-native-tab-view insists on sticking at 0.0.*,
the caret version pinning won't install "minor" updates.

Semver rules are weird with 0. major versions.

Is this something you'd be interested in?
2017-08-31 09:58:47 -05:00
Andréas Hanss
a3c3799cba Add documentation to help handling Hardware Back Button in Android (#2486) 2017-08-30 23:34:46 +02:00
Brooks Lyrette
8f3083800c Corrected broken links. (#2374)
Updated links for Card.js, CardStack.js and Header.js
2017-08-30 17:30:23 -04:00
Gant Laborde
78b80e7040 Feature/toggle (#2492)
* add toggle functionality

* add documentation
2017-08-29 21:55:33 -05:00
Jan Peer Stöcklmair
38d75ef1fa Fix ActiveScreen in custom navigation (#2354) 2017-08-29 04:35:48 +02:00
Farzad Qasim
50d31fe73d Fix broken links (#2366) 2017-08-29 03:33:28 +01:00
Keegan Stothert
9c4e31fdba Update TabNavigator.md (#2482)
tabNavigatorConfig doc improvements
2017-08-28 20:25:56 -06:00
Bruno
f24061c26b Fix style variable in docs. (#2451) 2017-08-24 03:07:12 +02:00
Spencer Carli
2d713dced1 Add additional guidance information to the GitHub issue template. (#2428)
* Add additional guidance information to the GitHub issue template.

- Provides links to best places to ask usage questions.
- Uncomments guiding information in issue template that wasn't visible when creating issue.
- Based on questions asked here: https://new-issue.vuejs.org/#modal

* Remove  ' instead of the expected behavior'
2017-08-20 15:08:56 -05:00
James Ide
cfb43defe6 [assets] Optimize back-icon PNGs (#2341)
Ran the images through `optipng -o7 -strip all`. In some cases got the images down from > 1 TCP packet to below 1.
2017-08-08 23:26:18 -07:00
Fidan Hakaj
36dc78a73a Updates Routers.md - adds missing parenthesis (#2230)
Adds missing parenthesis to *Handling Custom URIs* code example
2017-08-02 08:29:55 +03:00
Adam Miskiewicz
12f74aa11b Change parallelism on Circle to 2 2017-07-19 14:11:11 -07:00
Adam Miskiewicz
cd9258f574 Remove ReduxExample from Circle 2017-07-19 14:10:43 -07:00
Adam Miskiewicz
876364845d Fix tests in NavigationPlayground 2017-07-19 14:03:58 -07:00
Adam Miskiewicz
2d7de60dc9 1.0.0-beta.12 2017-07-19 13:01:58 -07:00
Adam Miskiewicz
4df4957ea8 Remove generating prop-types from Flow 2017-07-19 13:11:47 -07:00
Adam Miskiewicz
f59eba2af9 Update dependencies 2017-07-19 13:03:46 -07:00
Adam Miskiewicz
7b3e134913 Add flow definition to eslintignore 2017-07-19 13:01:23 -07:00
Adam Miskiewicz
55f9cddbe2 Clean up some flow types code-base wide, reorganize cardstack views 2017-07-05 14:19:23 -07:00
Adam Miskiewicz
b6ff6cc27b Stricter flow typing on CardStackStyleInterpolator 2017-07-03 21:43:06 -07:00