Skip to content

Commit 930155c

Browse files
committed
fix(mobile): restore composer backdrop gradient on Android
- move the gradient to a plain View since Reanimated drops experimental_backgroundImage on Android, which let feed text show through the composer - patch @react-native/gradle-plugin to use foojay-resolver 1.0.0 for Gradle builds
1 parent 2e66b1f commit 930155c

4 files changed

Lines changed: 33 additions & 6 deletions

File tree

‎apps/mobile/src/features/threads/ThreadComposer.tsx‎

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import {
2121
Image,
2222
Platform,
2323
Pressable,
24+
StyleSheet,
2425
useColorScheme,
2526
View,
2627
type ViewStyle,
@@ -698,11 +699,22 @@ export const ThreadComposer = memo(function ThreadComposer(props: ThreadComposer
698699
style={{
699700
paddingTop: isExpanded ? 8 : 6,
700701
paddingBottom: (props.bottomInset ?? 0) + (isExpanded ? 8 : 6),
701-
experimental_backgroundImage: isDarkMode
702-
? "linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.6) 55%, rgba(0,0,0,0.9) 100%)"
703-
: "linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.6) 55%, rgba(255,255,255,0.9) 100%)",
704702
}}
705703
>
704+
{/* The backdrop gradient lives on a plain View: Reanimated's Animated.View
705+
silently drops experimental_backgroundImage on Android, which left this
706+
strip fully transparent and the feed text legible through the composer. */}
707+
<View
708+
pointerEvents="none"
709+
style={[
710+
StyleSheet.absoluteFill,
711+
{
712+
experimental_backgroundImage: isDarkMode
713+
? "linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.6) 55%, rgba(0,0,0,0.9) 100%)"
714+
: "linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.6) 55%, rgba(255,255,255,0.9) 100%)",
715+
},
716+
]}
717+
/>
706718
<Animated.View
707719
className="relative w-full self-center"
708720
layout={COMPOSER_LAYOUT_TRANSITION}

‎patches/@[email protected]‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/settings.gradle.kts b/settings.gradle.kts
2+
index b3c46a3bf5eb21c0bb1c9435b5582aecbc57d57a..14f1e9c2063ef10ca3f2ecbb2336b8a4aacfcc9c 100644
3+
--- a/settings.gradle.kts
4+
+++ b/settings.gradle.kts
5+
@@ -13,7 +13,7 @@ pluginManagement {
6+
}
7+
}
8+
9+
-plugins { id("org.gradle.toolchains.foojay-resolver-convention").version("0.5.0") }
10+
+plugins { id("org.gradle.toolchains.foojay-resolver-convention").version("1.0.0") }
11+
12+
include(
13+
":react-native-gradle-plugin",

‎pnpm-lock.yaml‎

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎pnpm-workspace.yaml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ patchedDependencies:
128128
"@legendapp/[email protected]": patches/@[email protected]
129129
"@pierre/[email protected]": patches/@pierre%[email protected]
130130
"@react-native-menu/[email protected]": patches/@[email protected]
131+
"@react-native/[email protected]": patches/@[email protected]
131132
"@react-navigation/[email protected]": patches/@react-navigation%[email protected]
132133
133134

0 commit comments

Comments
 (0)