Commit Graph

2252 Commits

Author SHA1 Message Date
Lucas Padilha
301ea45365 added property inside drawerConfig to backgroundColor (drawerBackgroundColor) (#2698) 2017-10-08 06:40:08 -03:00
Vojtech Novak
05b71be0fd remove ineffective invariant usages, fixes #2258 (#2693)
* remove ineffective invariant usages

* fix flow err

* fix tests

* fix tests

* use throw
2017-10-05 12:59:13 +02:00
David Lewis
49c5990244 Suggest flex: 1 for embedded navigator (#2639) 2017-10-04 00:01:52 +02:00
Neo
1c42cd69b3 add doc for transitionConfig (#1827)
* add doc for transitionConfig

* address review
2017-10-03 16:54:19 -05:00
Dan Gurney
990208b1c4 Fix "drawerLockMode" terminology for screenProps (#2667)
Should be "drawerLockMode" instead of "lockMode"
2017-10-03 12:21:49 -04:00
Lorenzo Sciandra
2187354041 Fixing Intro Guide (#2679)
* Fixing Intro Guide

Fixes #832 - the code in this page was wrong, that export default was causing errors.

I've also modified a few phrases here and there to help the comprehension.

* more fixes, for CRNA
2017-10-03 15:05:39 +01:00
Spencer Carli
90acb9e406 Improve StatusBar/Header Behavior (#2669)
* Track orientation change

* Add tests for withOrientation

* Better variable naming
2017-09-29 16:11:30 -05:00
Dave Pack
89dc7214f1 Updates examples to react-native 0.48.4 and expo sdk 21. (#2675) 2017-09-29 14:06:56 -07:00
Vojtech Novak
38c2c06ead Update ISSUE_TEMPLATE.md (#2668)
the problem I see with many bug reports in this repo is that people write a very vague description of what their problem is and expect to get some help. I tried to:

1 . emphasise how important it is to include a runnable reproduction
2 . cut down on some extra words at the beginning of the template so it's more to the point
2017-09-29 22:51:06 +02:00
Spencer Carli
768e9d1b21 Remove RelativeImageStub providesModule 2017-09-28 14:57:17 -05:00
Ashoat Tevosyan
f5d66882ad Remove @providesModule declarations in src/utils to avoid Flow conflicts with fbjs package (#2665) 2017-09-28 15:42:14 -04:00
Spencer Carli
9952f4d633 1.0.0-beta.13 2017-09-27 09:55:06 -05:00
Alexei Malashkevich
a761d320db Adding search to docs website (#2606)
* Adding search to docs website

* fix eslint errors
2017-09-27 17:25:27 +03:00
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