Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
1bfa8da
feat: global robust pressableOpacity component
divyanshu-patil Dec 31, 2025
eb1b783
chore: migrate TouchableOpacity to Pressable Phase 1
divyanshu-patil Dec 31, 2025
97f0814
fix: serverlist primary button explicitly being treated as secondary
divyanshu-patil Jan 1, 2026
ae7a27b
feat: added other components
divyanshu-patil Jan 1, 2026
7b0e54e
fix: modal not opening when long pressing attachments
divyanshu-patil Jan 2, 2026
6347dd1
feat: phase 2
divyanshu-patil Jan 2, 2026
25224dc
refactor: replaced depreated rn-guesture-handler TouchableWithoutFeed…
divyanshu-patil Jan 3, 2026
7c99a71
feat: UIKit components migration
divyanshu-patil Jan 3, 2026
b2815c5
feat: migrated all platform-touchable library components to pressable
divyanshu-patil Jan 3, 2026
ccd6ddc
cleanup: removed unused files
divyanshu-patil Jan 3, 2026
eb712e7
cleanup: removed react-native-platform-touchable
divyanshu-patil Jan 3, 2026
5a44d9b
cleanup: removed mockdata from canned responses
divyanshu-patil Jan 4, 2026
be598d6
fix: conflicting long presses
divyanshu-patil Jan 4, 2026
a94e339
chore: test update
divyanshu-patil Jan 4, 2026
b2ef6b7
chore: snapshot update
divyanshu-patil Jan 4, 2026
2af126b
fix: callHeader mic button ripple color set to cam ripple color
divyanshu-patil Jan 4, 2026
4296be8
cleanup: removed debug style
divyanshu-patil Jan 4, 2026
025123e
fix: ref type annotation for touchable in overflow component
divyanshu-patil Jan 4, 2026
c84e768
Merge branch 'develop' of https://github.com/RocketChat/Rocket.Chat.R…
divyanshu-patil Jan 9, 2026
fc97d1e
Merge branch 'develop' into refactor/pressables
divyanshu-patil Jan 12, 2026
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
12 changes: 8 additions & 4 deletions app/containers/AudioPlayer/PlayButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import styles from './styles';
import RCActivityIndicator from '../ActivityIndicator';
import { AUDIO_BUTTON_HIT_SLOP } from './constants';
import { type TAudioState } from './types';
import NativeButton from '../NativeButton';
import getPlayButtonAccessibilityLabel from './getPlayButtonAccessibilityLabel';
import PressableOpacity from '../PressableOpacity';

interface IButton {
disabled?: boolean;
Expand Down Expand Up @@ -45,15 +45,19 @@ const PlayButton = ({ onPress, disabled = false, audioState }: IButton): React.R
const { colors } = useTheme();

return (
<NativeButton
<PressableOpacity
accessible
accessibilityLabel={getPlayButtonAccessibilityLabel(audioState)}
style={[styles.playPauseButton, { backgroundColor: colors.buttonBackgroundPrimaryDefault }]}
android_ripple={{
color: colors.buttonBackgroundPrimaryPress
}}
disabled={disabled}
onPress={onPress}
hitSlop={AUDIO_BUTTON_HIT_SLOP}>
hitSlop={AUDIO_BUTTON_HIT_SLOP}
disableOpacityOnAndroid>
<Icon audioState={audioState} disabled={disabled} />
</NativeButton>
</PressableOpacity>
);
};

Expand Down
21 changes: 12 additions & 9 deletions app/containers/AudioPlayer/PlaybackSpeed.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React from 'react';
import { Text } from 'react-native';
import { Text, View } from 'react-native';

import i18n from '../../i18n';
import styles from './styles';
import { useTheme } from '../../theme';
import { AUDIO_PLAYBACK_SPEED, AVAILABLE_SPEEDS } from './constants';
import { useUserPreferences } from '../../lib/methods/userPreferences';
import NativeButton from '../NativeButton';
import PressableOpacity from '../PressableOpacity';

const PlaybackSpeed = () => {
const [playbackSpeed, setPlaybackSpeed] = useUserPreferences<number>(AUDIO_PLAYBACK_SPEED, AVAILABLE_SPEEDS[1]);
Expand All @@ -19,13 +19,16 @@ const PlaybackSpeed = () => {
};

return (
<NativeButton
accessible
accessibilityLabel={i18n.t('Playback_speed', { playbackSpeed: `${playbackSpeed} x` })}
onPress={onPress}
style={[styles.containerPlaybackSpeed, { backgroundColor: colors.buttonBackgroundSecondaryDefault }]}>
<Text style={[styles.playbackSpeedText, { color: colors.buttonFontSecondary }]}>{playbackSpeed}x</Text>
</NativeButton>
<View style={{ overflow: 'hidden' }}>
<PressableOpacity
accessible
accessibilityLabel={i18n.t('Playback_speed', { playbackSpeed: `${playbackSpeed} x` })}
onPress={onPress}
style={[styles.containerPlaybackSpeed, { backgroundColor: colors.buttonBackgroundSecondaryDefault }]}
disableOpacityOnAndroid>
<Text style={[styles.playbackSpeedText, { color: colors.buttonFontSecondary }]}>{playbackSpeed}x</Text>
</PressableOpacity>
</View>
);
};

Expand Down
7 changes: 4 additions & 3 deletions app/containers/AudioPlayer/Seek.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { type LayoutChangeEvent, View, TextInput, type TextInputProps, TouchableNativeFeedback } from 'react-native';
import { type LayoutChangeEvent, View, TextInput, type TextInputProps } from 'react-native';
import { PanGestureHandler, type PanGestureHandlerGestureEvent } from 'react-native-gesture-handler';
import Animated, {
type SharedValue,
Expand All @@ -14,6 +14,7 @@ import Animated, {
import styles from './styles';
import { useTheme } from '../../theme';
import { SEEK_HIT_SLOP, THUMB_SEEK_SIZE, ACTIVE_OFFSET_X, DEFAULT_TIME_LABEL } from './constants';
import PressableOpacity from '../PressableOpacity';

Animated.addWhitelistedNativeProps({ text: true });
const AnimatedTextInput = Animated.createAnimatedComponent(TextInput);
Expand Down Expand Up @@ -106,7 +107,7 @@ const Seek = ({ currentTime, duration, loaded = false, onChangeTime }: ISeek) =>

// TouchableNativeFeedback is avoiding do a long press message when seeking the audio
return (
<TouchableNativeFeedback>
<PressableOpacity style={{ flex: 1 }} disableAndroidRipple>
<View style={styles.seekContainer}>
<AnimatedTextInput
defaultValue={DEFAULT_TIME_LABEL}
Expand All @@ -123,7 +124,7 @@ const Seek = ({ currentTime, duration, loaded = false, onChangeTime }: ISeek) =>
</PanGestureHandler>
</View>
</View>
</TouchableNativeFeedback>
</PressableOpacity>
);
};

Expand Down
10 changes: 7 additions & 3 deletions app/containers/Avatar/Avatar.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react';
import { View } from 'react-native';
import { Image } from 'expo-image';
import Touchable from 'react-native-platform-touchable';
import { settings as RocketChatSettings } from '@rocket.chat/sdk';

import Emoji from '../markdown/components/emoji/Emoji';
Expand All @@ -10,6 +9,7 @@ import { SubscriptionType } from '../../definitions';
import { type IAvatar } from './interfaces';
import MarkdownContext from '../markdown/contexts/MarkdownContext';
import I18n from '../../i18n';
import PressableOpacity from '../PressableOpacity';

const Avatar = React.memo(
({
Expand Down Expand Up @@ -97,9 +97,13 @@ const Avatar = React.memo(

if (onPress) {
image = (
<Touchable accessible={accessible} accessibilityLabel={avatarAccessibilityLabel} onPress={onPress}>
<PressableOpacity
accessible={accessible}
accessibilityLabel={avatarAccessibilityLabel}
disableAndroidRipple
onPress={onPress}>
{image}
</Touchable>
</PressableOpacity>
);
}

Expand Down
Loading