From b1f1b2050c661324c2fa53ed4d7246c665f19678 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Mon, 3 Nov 2025 19:13:22 +0200 Subject: [PATCH] add android ripple effect to images in feed (#9273) --- src/view/com/util/images/AutoSizedImage.tsx | 9 +++++++++ src/view/com/util/images/Gallery.tsx | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/src/view/com/util/images/AutoSizedImage.tsx b/src/view/com/util/images/AutoSizedImage.tsx index ea3d8e51b9..e248ea5414 100644 --- a/src/view/com/util/images/AutoSizedImage.tsx +++ b/src/view/com/util/images/AutoSizedImage.tsx @@ -6,6 +6,7 @@ import Animated, { } from 'react-native-reanimated' import {Image} from 'expo-image' import {type AppBskyEmbedImages} from '@atproto/api' +import {utils} from '@bsky.app/alf' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' @@ -205,6 +206,10 @@ export function AutoSizedImage({ accessibilityLabel={image.alt} accessibilityHint={_(msg`Views full image`)} accessibilityRole="button" + android_ripple={{ + color: utils.alpha(t.atoms.bg.backgroundColor, 0.2), + foreground: true, + }} style={[ a.w_full, a.rounded_md, @@ -228,6 +233,10 @@ export function AutoSizedImage({ accessibilityLabel={image.alt} accessibilityHint={_(msg`Views full image`)} accessibilityRole="button" + android_ripple={{ + color: utils.alpha(t.atoms.bg.backgroundColor, 0.2), + foreground: true, + }} style={[a.h_full]}> {contents} diff --git a/src/view/com/util/images/Gallery.tsx b/src/view/com/util/images/Gallery.tsx index 14ba71937b..3659e848ec 100644 --- a/src/view/com/util/images/Gallery.tsx +++ b/src/view/com/util/images/Gallery.tsx @@ -2,6 +2,7 @@ import {Pressable, type StyleProp, View, type ViewStyle} from 'react-native' import {type AnimatedRef} from 'react-native-reanimated' import {Image, type ImageStyle} from 'expo-image' import {type AppBskyEmbedImages} from '@atproto/api' +import {utils} from '@bsky.app/alf' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' @@ -60,6 +61,10 @@ export function GalleryItem({ } onPressIn={onPressIn ? () => onPressIn(index) : undefined} onLongPress={onLongPress ? () => onLongPress(index) : undefined} + android_ripple={{ + color: utils.alpha(t.atoms.bg.backgroundColor, 0.2), + foreground: true, + }} style={[ a.flex_1, a.overflow_hidden,