Commit Graph

2239 Commits

Author SHA1 Message Date
satyajit.happy
4b096e9641 chore: update react-native-tab-view 2019-03-29 13:23:07 +01:00
Vojtech Novak
35d85f1ad1 fix: fix hit slop for bottom tab bar (#110) 2019-03-21 14:51:12 +01:00
Mark
13996e8a97 docs: fix typo in README (#105) 2019-03-08 10:59:25 +00:00
Satyajit Sahoo
533de9e0c7 docs: update README 2019-03-06 23:58:50 +01:00
Satyajit Sahoo
959d2e136a chore: release 2.0.0-alpha.0 2019-03-06 23:47:54 +01:00
Satyajit Sahoo
5976ec8420 chore: add npm script for release 2019-03-06 23:47:06 +01:00
Satyajit Sahoo
6486c4b7dd feat: upgrade react-native-tab-view to 2.0
BREAKING CHANGES:

- Animated nodes are not from `react-native-reanimated`, which means custom tab bars need to be updated
- Changed behaviour: `activeTintColor` and `inactiveTintColor` also controls opacity now
- Removed props: `animationsEnabled`, `optimizationsEnabled`
- Dropped support for React < 16.3, which means the minimum supported React Native version is 0.56

New features:

- Added prop: `lazyPlaceholderComponent`
2019-02-26 22:40:51 +01:00
Satyajit Sahoo
6dfe7033ab chore: upgrade expo to 32.0.0 2019-03-02 02:51:10 +01:00
Satyajit Sahoo
9015796b88 chore: setup husky, commitlint and release-it 2019-03-02 01:38:01 +01:00
Satyajit Sahoo
af6a7f1ccf chore: upgrade node on ci 2019-03-02 01:33:48 +01:00
Satyajit Sahoo
421207dab3 chore: fix running on ci 2019-03-02 01:30:57 +01:00
Krzysztof Magiera
856f7f4036 fix: change opacity for hidden tabs only when not using rn-screens (#80)
When using react-native screens we don't need to hide invisible tabs using opacity. This in conjunctions with "active" property normally used by screens where causing blinking effect when new tabs got activated as in some cases opacity would update in a different UI transaction (this would only surface on Android).

This change removes the use of `opacity` style when react-native-screens are active and solely relies on `active` property in that case. When rn-screens are off we fallback to rendering `View` and use `opacity` as before (this is now done in `ResourceSavingScene`).

### Motivation

Fix blinking effect on Android when switching tabs [#5382](https://github.com/react-navigation/react-navigation/issues/5382)

### Test plan

1) Run RN-screens sample app with and w/o screens enabled or try the code from this snack -> https://snack.expo.io/rklSkM-xE
2) Try this on a low end Android device for consistent repro
3) Switch between tabs and see the content disappear for one frame with screens ON when this change isn't active and see this issue gone with this change applied
2018-12-18 16:38:25 +01:00
Brent Vatne
75375ba5d2 Release 1.0.1 2018-11-30 12:53:35 -08:00
mmtootmm
1659bead1c Fix renderPager undefined override (#70) 2018-12-01 05:49:36 +09:00
Brent Vatne
94451702d3 Update devDependencies 2018-11-17 09:16:38 +07:00
Brent Vatne
f9fba03863 Release 1.0.0 2018-11-17 09:12:13 +07:00
Brent Vatne
a2c6410296 Fix active and inactive tint colors - thanks to @CrazyPython - Original: https://github.com/react-navigation/react-navigation-tabs/pull/35 2018-11-17 09:11:27 +07:00
Jonny Burger
23890f296f implement onTabLongPress event handler (#66)
* implement onTabLongPress event handler

* style fix

* defaultHandler for long press
2018-11-09 18:45:18 +01:00
Brent Vatne
b9ec69b0da chore: release 1.0.0-alpha.5 2018-10-31 16:26:39 -07:00
Brent Vatne
f86fe1ce7f fix: tweak hitSlop on bottom tab bar buttons 2018-10-31 16:26:02 -07:00
Brent Vatne
53f03ad9ac chore: fix flow error 2018-10-31 16:25:46 -07:00
Yao Hui Chua
36ea405145 Fix bottom tab voiceover (#61)
* Fix bottom tab voiceover

* Remove isBottom check

* Update MaterialTopTabBar

* Remove unnecessary props on route
2018-11-05 11:46:37 +08:00
Brent Vatne
69546190c1 chore: release 1.0.0-alpha.4 2018-10-22 18:18:34 -07:00
Brent Vatne
f1f5445e76 Emit refocus event, add example that uses it 2018-10-22 18:17:31 -07:00
Brent Vatne
6719fa7a6e chore: bump version 2018-10-16 21:15:19 -07:00
Brent Vatne
080ea4d43d chore: move core/native to peerDependencies 2018-10-16 21:14:44 -07:00
Brent Vatne
2a55e93f72 Fix example project 2018-10-15 12:10:05 -07:00
Eric Vicenti
f39655f976 move to react-navigation core and native 2018-10-15 11:21:04 -07:00
Brent Vatne
24b6c9b1e5 Published 0.8.4 https://npm.community/t/unable-to-install-newly-published-package-version/2628 2018-10-10 13:43:52 -07:00
Brent Vatne
bfd4d9a677 Release 0.8.3 2018-10-10 13:12:16 -07:00
Brent Vatne
fd2966f67c Handle case where screensEnabled isn't available (in Snack) 2018-10-10 13:11:30 -07:00
Eric Vicenti
84f22834f9 Distribute source (#59)
By shipping source files and setting the ‘react-native’ entry point to src, the RN packager can parse the module and provide source maps when debugging from your app. This makes the install slightly heavier but is worth it for the improved ergonomics.
2018-10-09 11:00:07 -07:00
Brent Vatne
9acfc9810e Release 0.8.2 2018-09-19 16:38:47 -07:00
Brent Vatne
b33e3086aa More loose peer dependency 2018-09-19 16:38:27 -07:00
Brent Vatne
f968e4f05c Move react-native-screens to a peer dependency 2018-09-19 16:27:51 -07:00
Brent Vatne
5bd6b28a68 Release 0.8.0 2018-09-19 16:06:56 -07:00
Krzysztof Magiera
8ff96aa3cd Use react-native-screens when available (#54)
This change adds support for react-native-screens. Screens package makes it possible to use native primitives to render tabs container and its scenes such that they get properly mounted/unmounted when not visible.

The support has only been added to `createBottomTabNavigator` as the material one renders its own container that's a part of a different package (react-native-tab-view).
2018-09-18 12:07:59 +02:00
Brent Vatne
66620c5aff Release 0.7.0 2018-09-06 14:46:57 -07:00
Jonny Burger
324806e232 Upgrade react-native-safe-area-view (#44)
* Update react-native-safe-area-view

* import SafeAreaView from react-navigation
2018-09-06 14:46:41 -07:00
Brent Vatne
3e57028079 Pass horizontal prop into tabBarIcon for bottom tabs, fix default background color, fix text sizes 2018-09-06 14:44:23 -07:00
Brent Vatne
6b410bb3cd Release 0.6.0 2018-08-02 12:08:12 -07:00
Brent Vatne
1d808bdd06 Fix formatting and flow errors 2018-08-02 12:07:58 -07:00
Nicolas Charpentier
03cd7566ac feat: lazy initialized MaterialTopTabNavigator routes (#9)
Routes in `MaterialTopTabNavigator` are now lazy initialized like in `MaterialBottomTabNavigator`.

A scene visibility is computed from multiple states and props:

To handle the pan between tabs, we check if you're currently swiping between tabs and the prop `lazyOnSwipe` is true (default value) or if the tab have been already loaded, we'll check if this tab is a sibling of the focused tab. Then, we'll display the tab if it's a sibling.

~With the prop `animationEnabled` to true, we shouldn't hide a tab before the transition is done. So we're waiting `COMPLETE_TRANSITION` action to hide it. Also, if the prop `sceneAlwaysVisible` is true (default value), we won't hide scenes between A and D while transitioning.~

If the current tab has not been loaded and must not be visible, we do not render it.

I'll update the docs accordingly to this PR.

![tabs-2](https://user-images.githubusercontent.com/7189823/38261082-3bd30d04-3737-11e8-854e-684430db771f.gif)

<!--
#### Default behavior
Tabs are lazy initialized on swipe or focus and are always visible while transitioning.

![tabs-1](https://user-images.githubusercontent.com/7189823/38260989-060f5808-3737-11e8-87ed-d138fec6022b.gif)

#### Hide tabs between while transitioning

```js
{
  sceneAlwaysVisible: false,
}
```

![tabs-2](https://user-images.githubusercontent.com/7189823/38261082-3bd30d04-3737-11e8-854e-684430db771f.gif)

#### Fallback to only lazy initialized tabs on focus

```js
{
  lazyOnSwipe: false,
}
```

![tabs-3](https://user-images.githubusercontent.com/7189823/38261164-7bcc6018-3737-11e8-8758-de71d28218ae.gif)

-->
2018-07-25 20:41:02 -04:00
Vojtech Novak
8c6f4fb5dc Update BottomTabBar.js (#41) 2018-07-24 00:08:28 +02:00
Satyajit Sahoo
3027fd191d refactor: remove unused getLabel method 2018-06-18 11:04:27 +02:00
Loch Wansbrough
b4d0c80483 Allows use of custom safe area inset (#32) 2018-06-14 11:43:45 -07:00
Brent Vatne
cc28600968 chore: release 0.5.1 2018-06-06 13:12:38 -07:00
Brent Vatne
eb8e1de6dc fix: remove tab icon wrapper to fix adaptive icons 2018-06-06 13:11:52 -07:00
Brent Vatne
307b3a1505 chore: release v0.5.0 2018-06-05 12:12:27 -07:00
Brent Vatne
d90b44446e fix: change prepublish to prepare to fix warning 2018-06-05 12:12:11 -07:00