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

17058 - migrate AvatarCropModal to PressableWithoutFeedback #20260

Merged
merged 1 commit into from
Jun 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/components/AvatarCropModal/AvatarCropModal.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import React, {useCallback, useEffect, useState} from 'react';
import {ActivityIndicator, Image, View, Pressable} from 'react-native';
import {ActivityIndicator, Image, View} from 'react-native';
import {GestureHandlerRootView} from 'react-native-gesture-handler';
import {runOnUI, interpolate, useAnimatedGestureHandler, useSharedValue, useWorkletCallback} from 'react-native-reanimated';
import CONST from '../../CONST';
Expand All @@ -21,6 +21,7 @@ import cropOrRotateImage from '../../libs/cropOrRotateImage';
import HeaderGap from '../HeaderGap';
import * as StyleUtils from '../../styles/StyleUtils';
import Tooltip from '../Tooltip';
import PressableWithoutFeedback from '../Pressable/PressableWithoutFeedback';

const propTypes = {
/** Link to image for cropping */
Expand Down Expand Up @@ -396,16 +397,18 @@ const AvatarCropModal = (props) => {
src={Expensicons.Zoom}
fill={themeColors.icons}
/>
<Pressable
<PressableWithoutFeedback
style={[styles.mh5, styles.flex1]}
onLayout={initializeSliderContainer}
onPressIn={(e) => runOnUI(sliderOnPress)(e.nativeEvent.locationX)}
accessibilityLabel="slider"
accessibilityRole="adjustable"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are adding a CONST for accessibilityRole here - https://github.com/Expensify/App/pull/20251/files#diff-9d6b0cc89c7cab66ac4042ac0549bfc66ddc9e7a182b6b5dbbf7f687328f10b5R2451

We should incorporate these changes as well before we push

Copy link
Contributor Author

@Skalakid Skalakid Jun 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@abdulrahuman5196 I think there are some problems with merging PR that adds CONSTs. In other similar PRs we agreed create another PR that will change accessibilityLabels everywhere to use CONSTS, so we can try to merge this PR without it

>
<Slider
sliderValue={translateSlider}
onGesture={panSliderGestureEventHandler}
/>
</Pressable>
</PressableWithoutFeedback>
<Tooltip
text={props.translate('common.rotate')}
shiftVertical={-2}
Expand Down