mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-01-20 19:08:15 +08:00
Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d0835351bd | ||
|
|
f892526e7b | ||
|
|
1afdb799fc | ||
|
|
83d36dcf7c | ||
|
|
aa94038190 | ||
|
|
0b698ae5d6 | ||
|
|
dd3ce66120 | ||
|
|
82754d41d9 | ||
|
|
9d54ec68dd | ||
|
|
460754fde1 | ||
|
|
ffd1865485 | ||
|
|
50320bf0d9 | ||
|
|
74a04c3ce5 | ||
|
|
54d0d5180d | ||
|
|
14eb5a1e75 | ||
|
|
222c77a360 | ||
|
|
39316fc339 |
2
.github/ISSUE_TEMPLATE.md
vendored
2
.github/ISSUE_TEMPLATE.md
vendored
@@ -25,7 +25,7 @@ Bugs with react-navigation must be reproducible *without any external libraries
|
||||
|
||||
### How to reproduce
|
||||
|
||||
- You must provide a way to reproduce the problem. If you are having an issue with your machine or build tools, the issue belongs on another repoistory as that is outside of the scope of React Navigation.
|
||||
- You must provide a way to reproduce the problem. If you are having an issue with your machine or build tools, the issue belongs on another repository as that is outside of the scope of React Navigation.
|
||||
- Either re-create the bug on [Snack](https://snack.expo.io) or link to a GitHub repository with code that reproduces the bug.
|
||||
- Explain how to run the example app and any steps that we need to take to reproduce the issue from the example app.
|
||||
|
||||
|
||||
56
CHANGELOG.md
56
CHANGELOG.md
@@ -7,6 +7,52 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [2.15.0] - [2018-09-14](https://github.com/react-navigation/react-navigation/releases/tag/2.15.0)
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated react-navigation-safe-area-view to 0.11.0 to support iPhoneXS Max and iPhoneXR
|
||||
|
||||
## [2.14.2] - [2018-09-14](https://github.com/react-navigation/react-navigation/releases/tag/2.14.2)
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated react-navigation-stack to 0.5.1 to clamp interpolated values in animations.
|
||||
|
||||
## [2.14.1] - [2018-09-14](https://github.com/react-navigation/react-navigation/releases/tag/2.14.1)
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated react-navigation-stack to 0.5.0 to solve black screen on back and unpressable header area with hidden header when using react-native-screens.
|
||||
|
||||
## [2.14.0] - [2018-09-12](https://github.com/react-navigation/react-navigation/releases/tag/2.14.0)
|
||||
|
||||
### Added
|
||||
|
||||
- Updated react-navigation-stack to add experimental support for react-navigation-screens. See https://github.com/kmagiera/react-native-screens for information about how to enable it.
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated react-native-safe-area-view to 0.10.0 to solve circular dependency issue (fixes https://github.com/react-navigation/react-navigation/issues/4973)
|
||||
|
||||
## [2.13.0] - [2018-09-06](https://github.com/react-navigation/react-navigation/releases/tag/2.13.0)
|
||||
|
||||
### Added
|
||||
|
||||
- When `tabBarIcon` is a function it is now provided with a `horizontal` option that indicates whether horizontal tabs are being rendered (label to the right of the icon) or not.
|
||||
- Add some missing flow types ([1](https://github.com/react-navigation/react-navigation/pull/4836), [2](https://github.com/react-navigation/react-navigation/pull/4917)).
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated react-navigation-stack to 0.3.0.
|
||||
- Updated react-navigation-tabs to 0.7.0.
|
||||
- Pinned `create-react-context` dependency to `0.2.2` (https://github.com/react-navigation/react-navigation/issues/4934)
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixes tab label font sizes in landscape and portrait.
|
||||
- Default tab bar background color and header background color are white on iOS.
|
||||
|
||||
## [2.12.1] - [2018-08-23](https://github.com/react-navigation/react-navigation/releases/tag/2.12.1)
|
||||
|
||||
### Fixed
|
||||
@@ -19,7 +65,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||
- Add accessibility props for inactive screens in stack (https://github.com/react-navigation/react-navigation-stack/commit/4e04428e26df9076413b57b3346a7ce357de1a77)
|
||||
- Updated header title to match iOS 11/12 style correctly (https://github.com/react-navigation/react-navigation-stack/pull/1)
|
||||
- Add support for animating the header background on screen transitions and add interpolator to animate it along with the rest of the screen, but this is still opt-in behavior (https://github.com/react-navigation/react-navigation-stack/pull/3)
|
||||
- Updated react-native-safe-area-view to 0.2.0
|
||||
- Updated react-native-safe-area-view to 0.9.0
|
||||
|
||||
## [2.11.2] - [2018-08-03](https://github.com/react-navigation/react-navigation/releases/tag/2.11.2)
|
||||
### Changed
|
||||
@@ -50,7 +96,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||
- Export `StackViewTransitionConfigs` to allow you to extend default config in custom transition configs. [#4761](https://github.com/react-navigation/react-navigation/pull/4761)
|
||||
|
||||
### Fixed
|
||||
- Error when building with haul: ref to pathToRegexp.compile(#4658).
|
||||
- Error when building with haul: ref to pathToRegexp.compile. [#4658](https://github.com/react-navigation/react-navigation/pull/4658).
|
||||
|
||||
## [2.9.1] - [2018-07-24](https://github.com/react-navigation/react-navigation/releases/tag/2.9.1)
|
||||
@@ -153,7 +198,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||
### Changed
|
||||
- Improved examples
|
||||
|
||||
[Unreleased]: https://github.com/react-navigation/react-navigation/compare/2.12.1...HEAD
|
||||
[Unreleased]: https://github.com/react-navigation/react-navigation/compare/2.15.0...HEAD
|
||||
[2.15.0]: https://github.com/react-navigation/react-navigation/compare/2.14.2...2.15.0
|
||||
[2.14.2]: https://github.com/react-navigation/react-navigation/compare/2.14.1...2.14.2
|
||||
[2.14.1]: https://github.com/react-navigation/react-navigation/compare/2.14.0...2.14.1
|
||||
[2.14.0]: https://github.com/react-navigation/react-navigation/compare/2.13.1...2.14.0
|
||||
[2.13.0]: https://github.com/react-navigation/react-navigation/compare/2.12.1...2.13.0
|
||||
[2.12.1]: https://github.com/react-navigation/react-navigation/compare/2.12.0...2.12.1
|
||||
[2.12.0]: https://github.com/react-navigation/react-navigation/compare/2.11.2...2.12.0
|
||||
[2.11.2]: https://github.com/react-navigation/react-navigation/compare/2.11.1...2.11.2
|
||||
|
||||
@@ -1,2 +1,7 @@
|
||||
import { useScreens } from 'react-native-screens';
|
||||
|
||||
// Uncomment this to use react-native-screens
|
||||
// useScreens();
|
||||
|
||||
import App from './js/App';
|
||||
export default App;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"splash": {
|
||||
"image": "./assets/icons/splash.png"
|
||||
},
|
||||
"sdkVersion": "28.0.0",
|
||||
"sdkVersion": "30.0.0",
|
||||
"assetBundlePatterns": [
|
||||
"**/*"
|
||||
],
|
||||
|
||||
@@ -40,10 +40,10 @@ MyHomeScreen.navigationOptions = {
|
||||
accessibilityLabel: 'TEST_ID_HOME_ACLBL',
|
||||
},
|
||||
tabBarLabel: 'Home',
|
||||
tabBarIcon: ({ tintColor, focused }) => (
|
||||
tabBarIcon: ({ tintColor, focused, horizontal }) => (
|
||||
<Ionicons
|
||||
name={focused ? 'ios-home' : 'ios-home-outline'}
|
||||
size={26}
|
||||
size={horizontal ? 20 : 26}
|
||||
style={{ color: tintColor }}
|
||||
/>
|
||||
),
|
||||
@@ -60,10 +60,10 @@ class MyPeopleScreen extends React.Component<MyPeopleScreenProps> {
|
||||
|
||||
static navigationOptions = {
|
||||
tabBarLabel: 'People',
|
||||
tabBarIcon: ({ tintColor, focused }) => (
|
||||
tabBarIcon: ({ tintColor, focused, horizontal }) => (
|
||||
<Ionicons
|
||||
name={focused ? 'ios-people' : 'ios-people-outline'}
|
||||
size={26}
|
||||
size={horizontal ? 20 : 26}
|
||||
style={{ color: tintColor }}
|
||||
/>
|
||||
),
|
||||
@@ -100,10 +100,10 @@ class MyChatScreen extends React.Component<MyChatScreenProps> {
|
||||
|
||||
static navigationOptions = {
|
||||
tabBarLabel: 'Chat',
|
||||
tabBarIcon: ({ tintColor, focused }) => (
|
||||
tabBarIcon: ({ tintColor, focused, horizontal }) => (
|
||||
<Ionicons
|
||||
name={focused ? 'ios-chatboxes' : 'ios-chatboxes-outline'}
|
||||
size={26}
|
||||
size={horizontal ? 20 : 26}
|
||||
style={{ color: tintColor }}
|
||||
/>
|
||||
),
|
||||
@@ -135,10 +135,10 @@ const MySettingsScreen = ({ navigation }) => (
|
||||
|
||||
MySettingsScreen.navigationOptions = {
|
||||
tabBarLabel: 'Settings',
|
||||
tabBarIcon: ({ tintColor, focused }) => (
|
||||
tabBarIcon: ({ tintColor, focused, horizontal }) => (
|
||||
<Ionicons
|
||||
name={focused ? 'ios-settings' : 'ios-settings-outline'}
|
||||
size={26}
|
||||
size={horizontal ? 20 : 26}
|
||||
style={{ color: tintColor }}
|
||||
/>
|
||||
),
|
||||
|
||||
@@ -7,10 +7,11 @@
|
||||
"start": "expo start",
|
||||
"android": "expo start --android",
|
||||
"ios": "expo start --ios",
|
||||
"test": "flow"
|
||||
"test": "flow",
|
||||
"postinstall": "rm -rf node_modules/react-native-screens"
|
||||
},
|
||||
"dependencies": {
|
||||
"expo": "^28.0.0",
|
||||
"expo": "^30.0.0",
|
||||
"invariant": "^2.2.4",
|
||||
"react": "16.3.1",
|
||||
"react-native": "^0.55.0",
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
16
flow/react-navigation.js
vendored
16
flow/react-navigation.js
vendored
@@ -143,6 +143,14 @@ declare module 'react-navigation' {
|
||||
+type: 'Navigation/TOGGLE_DRAWER',
|
||||
+key?: string,
|
||||
|};
|
||||
declare export type NavigationDrawerOpenedAction = {|
|
||||
+type: 'Navigation/DRAWER_OPENED',
|
||||
+key?: string,
|
||||
|};
|
||||
declare export type NavigationDrawerClosedAction = {|
|
||||
+type: 'Navigation/DRAWER_CLOSED',
|
||||
+key?: string,
|
||||
|};
|
||||
|
||||
declare export type NavigationAction =
|
||||
| NavigationBackAction
|
||||
@@ -157,7 +165,9 @@ declare module 'react-navigation' {
|
||||
| NavigationCompleteTransitionAction
|
||||
| NavigationOpenDrawerAction
|
||||
| NavigationCloseDrawerAction
|
||||
| NavigationToggleDrawerAction;
|
||||
| NavigationToggleDrawerAction
|
||||
| NavigationDrawerOpenedAction
|
||||
| NavigationDrawerClosedAction;
|
||||
|
||||
/**
|
||||
* NavigationState is a tree of routes for a single navigator, where each
|
||||
@@ -394,6 +404,8 @@ declare module 'react-navigation' {
|
||||
mode?: 'card' | 'modal',
|
||||
headerMode?: HeaderMode,
|
||||
headerTransitionPreset?: 'fade-in-place' | 'uikit',
|
||||
headerLayoutPreset?: 'left' | 'center',
|
||||
headerBackTitleVisible?: boolean,
|
||||
cardStyle?: ViewStyleProp,
|
||||
transitionConfig?: () => TransitionConfig,
|
||||
onTransitionStart?: () => void,
|
||||
@@ -813,6 +825,8 @@ declare module 'react-navigation' {
|
||||
OPEN_DRAWER: 'Navigation/OPEN_DRAWER',
|
||||
CLOSE_DRAWER: 'Navigation/CLOSE_DRAWER',
|
||||
TOGGLE_DRAWER: 'Navigation/TOGGLE_DRAWER',
|
||||
DRAWER_OPENED: 'Navigation/DRAWER_OPENED',
|
||||
DRAWER_CLOSED: 'Navigation/DRAWER_CLOSED',
|
||||
|
||||
openDrawer: (payload: {
|
||||
key?: string,
|
||||
|
||||
10
package.json
10
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "react-navigation",
|
||||
"version": "2.12.1",
|
||||
"version": "2.15.0",
|
||||
"description": "Routing and navigation for your React Native apps",
|
||||
"main": "src/react-navigation.js",
|
||||
"repository": {
|
||||
@@ -31,16 +31,16 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"clamp": "^1.0.1",
|
||||
"create-react-context": "^0.2.1",
|
||||
"create-react-context": "0.2.2",
|
||||
"hoist-non-react-statics": "^2.2.0",
|
||||
"path-to-regexp": "^1.7.0",
|
||||
"query-string": "^6.1.0",
|
||||
"react-lifecycles-compat": "^3",
|
||||
"react-native-safe-area-view": "^0.9.0",
|
||||
"react-native-safe-area-view": "0.11.0",
|
||||
"react-navigation-deprecated-tab-navigator": "1.3.0",
|
||||
"react-navigation-drawer": "0.5.0",
|
||||
"react-navigation-stack": "0.2.3",
|
||||
"react-navigation-tabs": "0.6.0"
|
||||
"react-navigation-stack": "0.5.1",
|
||||
"react-navigation-tabs": "0.7.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-cli": "^6.24.1",
|
||||
|
||||
Reference in New Issue
Block a user