Commit Graph

2263 Commits

Author SHA1 Message Date
Brent Vatne
392f13f6f0 Another fix for frustrating tab bar icon layout issue 2018-03-15 10:19:20 -07:00
Brent Vatne
212c47a8c2 Rename exports for navigators from XNavigator to createXNavigator (#3753) 2018-03-14 23:23:04 -07:00
Brent Vatne
77528a2844 Missed a case where we should not have flexGrow 2018-03-14 21:48:48 -07:00
Brent Vatne
60723df07f Update snapshot 2018-03-14 21:42:39 -07:00
Brent Vatne
9898572e12 Apply horizontal icon style whenever we should use horizontal tabs in icon 2018-03-14 21:30:04 -07:00
Brent Vatne
62dd906ae7 Release 2.0.0-alpha.4 2018-03-14 15:22:14 -07:00
Brent Vatne
af476b6d84 Rename exports for navigators from XNavigator to createXNavigator 2018-03-14 15:21:38 -07:00
Brent Vatne
454cd8a460 Fix back button on modular header 2018-03-14 15:19:03 -07:00
spaceye
375681a0d7 Reworked headerBackImage navigation prop and rendering (#3680)
* Added possibility to provide custom header back button's image, introduced API changes: removed old prop "headerBackImage", added new prop "backImage".

* Code style fixes.

* Renamed showcase file to for more clarity; updated the prop's name as well.

* Removed listeners code from showcase screens.
2018-03-13 23:15:11 +03:00
Vojtech Novak
80bec8d780 fix contribution docs link (#3707) 2018-03-13 21:14:02 +01:00
Vojtech Novak
6d75ac9193 Playground facelift (#3708)
* wip

* fix imports

* use stylesheet for margin

stylesheet now correct

* also remove old headerLeft

* improve header buttons color

* remove ios button margin
2018-03-13 21:13:19 +01:00
Vojtech Novak
8a84f8523b reuse styles (#3725) 2018-03-13 21:05:21 +01:00
Brent Vatne
2e803d725b Release 2.0.0-alpha.3 2018-03-12 16:19:48 -07:00
Brent Vatne
7b9c0cb57e Add lifecycle polyfill and change away from componentWillMount where possible without too much refactoring 2018-03-08 21:30:06 -08:00
Brent Vatne
d9f2f3c2bb Release 2.0.0-alpha.2 2018-03-12 16:01:57 -07:00
Brent Vatne
a0e844e311 Add dismiss helper, made possible by also adding carefullyGetParent (#3669)
* Add dismiss action, made possible by getParentState

* Add dismiss to flow interface

* Don't dispatch an action on dismiss helper if no parent state

* carefullyGetParent instead of getParentState
2018-03-12 16:01:29 -07:00
Brent Vatne
ff844f0ac4 Release 2.0.0-alpha.1 2018-03-12 15:23:38 -07:00
Brent Vatne
5bb048f5c7 Implement "less pushy navigate" RFC 2018-03-12 15:22:51 -07:00
Brent Vatne
ea4cb8f961 Release 2.0.0-alpha.0 2018-03-12 14:24:51 -07:00
Brent Vatne
c17ac83789 Fix tab icon height on horizontal / ipad 2018-03-12 11:10:00 -07:00
Brent Vatne
46e1e6ef30 Make push, pop, and popToTop bubble like navigate (#3617) 2018-03-12 15:06:38 -07:00
Brent Vatne
e871d36942 Use arrow function for isFocused 2018-03-12 09:56:39 -07:00
Brandon Smith
309eba350a Pass initialRouteKey into StackRouter (#3540) (#3702) 2018-03-09 14:32:01 -05:00
Brent Vatne
2dd62a3ac8 Swap addListener out for isFocused prop on ResourceSavingSceneView (#3700) 2018-03-09 10:55:00 -08:00
Brent Vatne
916b40911a Fix TabRouter-test 2018-03-09 10:46:05 -08:00
Brent Vatne
3b56ec75c0 Add SwitchNavigator to 2.x 2018-03-07 17:35:15 -08:00
Ashoat Tevosyan
10ec7f734d [Flow] Some updates, mostly from flow-typed (#3682)
1. Remove `NavigationComponent` from `NavigationScreenRouteConfig`. The only context `NavigationScreenRouteConfig` is used in is as an intersection with an object, and as such the only relevant portions of `NavigationScreenRouteConfig` are the object parts.
2. Add static `HEIGHT` variable to `Header` type.
3. In `NavigationContainerProps`, make `onNavigationStateChange` property value nullable.

PS: if in the future you guys would prefer that I separate these sort of PRs into their constituent parts, let me know.
2018-03-07 14:29:25 -05:00
Ben Styles
e6747b5554 Allow passing null to onNavigationStateChange prop (#3683)
As seen here: react-navigation/react-navigation#360, we need to be able to pass null to turn off logging.
2018-03-07 19:19:00 +00:00
Eric Vicenti
8571ce43ae Fix issue in drawer actions (#3667)
* Fix issue in drawer actions

* Update DrawerView.js
2018-03-06 14:38:03 -08:00
Sirui Li
964300519d Flow type: SafeAreaView doesn't require children (#3670)
`children` prop should be optional.
2018-03-07 06:19:46 +08:00
corupta
03f293de3f Add activeLabelStyle and inactiveLabelStyle for DrawerItem (#3559)
* Add activeLabelStyle and inactiveLabelStyle

Adding activeLabelStyle, so that active items can be customized more.
My use case: Change font of the active item to bold.
Also, added inactiveLabelStyle which can be used for a similar purpose.

* prettier fix

* Update react-navigation.js

* prettier fix

* Update jest snapshot for DrawerNavigator - for adding a new style property to the styles array
2018-03-06 04:17:08 +03:00
Edward Drapkin
f798a75d10 More specific injected Navigation props (#3645) 2018-03-05 19:33:42 -05:00
Brent Vatne
6eff94c25f Add isFocused helper to navigation and fix withNavigationFocus 2018-03-03 09:58:19 -08:00
Brent Vatne
a86378a00a Cache event subscribers and clean up after unmounting (#3648)
* This caches "child event subscribers" by key and removes them when they're not needed anymore. Once a navigator unmounts we also remove upstream subscribers.

* Fix tests
2018-03-05 11:27:57 -08:00
Yordis Prieto
b15bed6529 Fix typespec of back action creator (#3659) 2018-03-05 11:10:39 -08:00
Ashoat Tevosyan
690be82d4a Fix NavigationEventPayload.lastState type (#3664)
Should be nullable, since it is initially called as `null` in `src/createNavigationContainer.js` (and in `react-navigation-redux-helpers`, where it is causing a Flow error)
2018-03-05 14:04:29 -05:00
Vishwesh Jainkuniya
2cb1566e56 Fix: tabBar icons are not visible. (#3650)
* Fix: tabBar icons are not visible.

* Fix: tests.
2018-03-05 10:51:54 +05:30
Nicolas Beck
07c30914ed Add initialRouteKey for StackRouter (#3540)
* use initialRouteName as key when initializing StackRouter

* fix null headerLeft

* merge back

* fixed tests

* use config flag

* fixed snapshots

* implemented requested changes
2018-03-03 01:06:27 +01:00
Brent Vatne
0aeab0a6ac Fix regression in error message for route config validation 2018-03-02 12:18:11 -08:00
Arseny Yankovsky
467c7ac3fa Allow modification of SafeAreaView props (#3496)
* SafeAreaView fix

* Updated to only allow modification of forceInset property of SafeAreaView
2018-03-01 22:42:19 +01:00
Michał Pierzchała
93c86d97cf Move contributing guide to CONTRIBUTING.md (#3631) 2018-03-01 19:11:30 +01:00
Eric Vicenti
58477fcf40 Drawer Router (#3618) 2018-02-27 18:34:05 -08:00
Brent Vatne
1aa0cff93e Update snapshots 2018-02-27 17:32:13 -08:00
Eric Vicenti
d2271ad0f0 [BREAKING] New createNavigator API (#3392)
* New createNavigator and View API

See the RFC here:
https://github.com/react-navigation/rfcs/blob/master/text/0002-navigator-view-api.md

* shattered dreams of flow

* fix export

* Fix tab view issues found by brent
2018-02-27 17:27:58 -08:00
Brent Vatne
53bcbbeb83 Fix snapshots 2018-02-26 16:02:38 -08:00
Brent Vatne
aef913a4a5 Clarify that people should not report Redux or MobX related integration issues here 2018-02-26 15:52:31 -08:00
Brent Vatne
38bedbfd38 Release 1.2.1 2018-02-26 14:04:44 -08:00
Brent Vatne
c56a962fb5 Apply StyleSheet.flatten properly to headerStyle. Fixes #3608 2018-02-26 14:03:56 -08:00
Yordis Prieto
83ff7e4f17 fix typespec (#3583) 2018-02-26 12:25:13 -08:00
Serhii Palash
1757b9f253 Fix bug #3279 “Action within RESET doesn't trigger” (#3593)
https://github.com/react-navigation/react-navigation/issues/3279
2018-02-26 22:14:29 +02:00