Skip to content

Commit

Permalink
Merge pull request #19958 from Skalakid/17033-migrate-HeaderView
Browse files Browse the repository at this point in the history
17033 - migrated HeaderView to PressableWithoutFeedback
  • Loading branch information
roryabraham authored Jun 13, 2023
2 parents 756c7aa + 6a87e42 commit edb17fd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ const GenericPressable = forwardRef((props, ref) => {
onKeyPress,
disabled,
style,
accessibilityHint,
shouldUseHapticsOnLongPress,
shouldUseHapticsOnPress,
nextFocusRef,
Expand Down
15 changes: 10 additions & 5 deletions src/pages/home/HeaderView.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import _ from 'underscore';
import React from 'react';
import {View, Pressable} from 'react-native';
import {View} from 'react-native';
import PropTypes from 'prop-types';
import lodashGet from 'lodash/get';
import {withOnyx} from 'react-native-onyx';
Expand All @@ -27,6 +27,7 @@ import ONYXKEYS from '../../ONYXKEYS';
import ThreeDotsMenu from '../../components/ThreeDotsMenu';
import * as Task from '../../libs/actions/Task';
import reportActionPropTypes from './report/reportActionPropTypes';
import PressableWithoutFeedback from '../../components/Pressable/PressableWithoutFeedback';
import PinButton from '../../components/PinButton';

const propTypes = {
Expand Down Expand Up @@ -126,10 +127,12 @@ const HeaderView = (props) => {
>
<View style={[styles.appContentHeaderTitle, !props.isSmallScreenWidth && styles.pl5]}>
{props.isSmallScreenWidth && (
<Pressable
<PressableWithoutFeedback
onPress={props.onNavigationMenuButtonClicked}
style={[styles.LHNToggle]}
accessibilityHint={props.translate('accessibilityHints.navigateToChatsList')}
accessibilityLabel={props.translate('common.back')}
accessibilityRole="button"
>
<Tooltip
text={props.translate('common.back')}
Expand All @@ -139,14 +142,16 @@ const HeaderView = (props) => {
<Icon src={Expensicons.BackArrow} />
</View>
</Tooltip>
</Pressable>
</PressableWithoutFeedback>
)}
{Boolean(props.report && title) && (
<View style={[styles.flex1, styles.flexRow, styles.alignItemsCenter, styles.justifyContentBetween]}>
<Pressable
<PressableWithoutFeedback
onPress={() => ReportUtils.navigateToDetailsPage(props.report)}
style={[styles.flexRow, styles.alignItemsCenter, styles.flex1]}
disabled={isTaskReport}
accessibilityLabel={title}
accessibilityRole="button"
>
{shouldShowSubscript ? (
<SubscriptAvatar
Expand Down Expand Up @@ -187,7 +192,7 @@ const HeaderView = (props) => {
/>
</View>
)}
</Pressable>
</PressableWithoutFeedback>
<View style={[styles.reportOptions, styles.flexRow, styles.alignItemsCenter]}>
{shouldShowCallButton && (
<VideoChatButtonAndMenu
Expand Down

0 comments on commit edb17fd

Please sign in to comment.