Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MaterialBottomTabNavigator doesn't have tap feedback on iOS #2073

Closed
andreialecu opened this issue Jul 22, 2020 · 3 comments
Closed

MaterialBottomTabNavigator doesn't have tap feedback on iOS #2073

andreialecu opened this issue Jul 22, 2020 · 3 comments
Labels

Comments

@andreialecu
Copy link
Contributor

andreialecu commented Jul 22, 2020

Current behaviour

The MaterialBottomTabNavigator uses TouchableWithoutFeedback on iOS:
https://github.com/callstack/react-native-paper/blob/master/src/components/BottomNavigation.tsx#L300

This results in no sort of feedback appearing when tapping to switch the tab. On Android a Ripple is rendered.

This is especially bad when the entire tab bar is configured to only a single solid color (no separate colors per screen).

I'm using the bottom tab navigator via @react-navigation/material-bottom-tabs.

Expected behaviour

I think it would be a good idea to display some sort of visual indication on tap. A TouchableHighlight might make more sense. The Facebook app on iOS displays a light gradient when tapping its bottom bar.

Screenshots (if applicable)

What have you tried

There appears to be a renderTouchable property, but when using createMaterialBottomTabNavigator from @react-navigation/material-bottom-tabs it is never called. Example below:

const Tab = createMaterialBottomTabNavigator();

<Tab.Navigator barStyle={styles.barStyle} renderTouchable={() => { console.log("foo") /* never called */ }}>

renderTouchable is not really documented, and TouchableProps is not exported so it makes it really hard to use. Seems to have been added in #1901 but it's usage is unclear.

Your Environment

software version
react-native 0.63.1
react-native-paper 3.10.1
@github-actions
Copy link

Couldn't find version numbers for the following packages in the issue:

  • react-native-vector-icons
  • expo

Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3.

The versions mentioned in the issue for the following packages differ from the latest versions on npm:

  • react-native (found: 0.63.1, latest: 0.63.2)
  • react-native-paper (found: 3.10.1, latest: 4.0.1)

Can you verify that the issue still exists after upgrading to the latest versions of these packages?

@github-actions
Copy link

Hello 👋, this issue has been open for more than 2 months with no activity on it. If the issue is still present in the latest version, please leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution on workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix the issue.

@micahlt
Copy link

micahlt commented Jan 21, 2023

Bumping this - seems to still be the case in the latest version of react-native-paper. renderTouchable is documented but never called.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants