Skip to content

Commit a615a9a

Browse files
committed
chore: temp commit
1 parent 2e531f7 commit a615a9a

8 files changed

Lines changed: 14 additions & 27 deletions

File tree

FabricExample/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"@react-navigation/native": "7.1.17",
2323
"@react-navigation/native-stack": "7.3.26",
2424
"@react-navigation/stack": "7.3.6",
25-
"@shopify/flash-list": "^2.2.0",
25+
"@shopify/flash-list": "^2.3.1",
2626
"lottie-react-native": "^7.3.4",
2727
"react": "19.1.0",
2828
"react-dom": "19.1.0",

FabricExample/src/screens/Examples/KeyboardChatScrollView/VirtualizedListScrollView.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,9 @@ const VirtualizedListScrollView = forwardRef<
6969
const { inverted, freeze, mode, keyboardLiftBehavior } =
7070
useChatConfigStore();
7171

72-
// on new arch only FlatList supports `inverted` prop
73-
const isInvertedSupported = inverted && mode === "flat" ? inverted : false;
72+
// only FlatList and FlashList supports `inverted` prop
73+
const isInvertedSupported =
74+
inverted && (mode === "flat" || mode === "flash") ? inverted : false;
7475
const onLayout = useCallback(
7576
(e: LayoutChangeEvent) => {
7677
setLayoutPass((l) => l + 1);

FabricExample/src/screens/Examples/KeyboardChatScrollView/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ function KeyboardChatScrollViewPlayground() {
119119
<FlashList
120120
contentContainerStyle={contentContainerStyle}
121121
data={messages}
122+
inverted={inverted}
122123
keyExtractor={(item) => item.text}
123124
maintainVisibleContentPosition={{
124125
startRenderingFromBottom: inverted,

FabricExample/yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1909,10 +1909,10 @@
19091909
"@react-navigation/elements" "^2.4.6"
19101910
color "^4.2.3"
19111911

1912-
"@shopify/flash-list@^2.2.0":
1913-
version "2.2.0"
1914-
resolved "https://registry.yarnpkg.com/@shopify/flash-list/-/flash-list-2.2.0.tgz#bafd714576182681cba25fb13195dee19f5ca521"
1915-
integrity sha512-mL61IofcfBNRZ/qazIf+pghGULkcZUQ7EZNldH1JBbIjtDb25ADSiQrt62ZTnRz0H5+bPFEZUmN9+WChHzX8pw==
1912+
"@shopify/flash-list@^2.3.1":
1913+
version "2.3.1"
1914+
resolved "https://registry.yarnpkg.com/@shopify/flash-list/-/flash-list-2.3.1.tgz#d4f90b1471a741a97c07d9aadbfaf200e92c86f7"
1915+
integrity sha512-7oktg2NQR7KAODjFoDaWe8/OBzyYbdTE3zQTrUBMxjIbxHTHN7UXRX1hX3DHk8KvtkgQdRfZOV8Gjj2l4fGrXw==
19161916

19171917
"@sideway/address@^4.1.5":
19181918
version "4.1.5"

android/src/main/java/com/reactnativekeyboardcontroller/views/ClippingScrollViewDecoratorView.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class ClippingScrollViewDecoratorView(
4848
// virtualizer calculations correct (it reads layout positions,
4949
// not translationY).
5050
val contentView = scrollView.getChildAt(0) as? ViewGroup ?: return
51-
(contentView.getChildAt(0) as? ViewGroup)?.translationY = newTopInsetPx.toFloat()
51+
contentView.translationY = newTopInsetPx.toFloat()
5252

5353
scrollView.setPadding(
5454
scrollView.paddingLeft,

example/src/screens/Examples/KeyboardChatScrollView/VirtualizedListScrollView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ const VirtualizedListScrollView = forwardRef<
6969
const { inverted, freeze, mode, keyboardLiftBehavior } =
7070
useChatConfigStore();
7171

72-
// on old arch only FlatList and FlashList supports `inverted` prop
72+
// only FlatList and FlashList supports `inverted` prop
7373
const isInvertedSupported =
7474
inverted && (mode === "flat" || mode === "flash") ? inverted : false;
7575
const onLayout = useCallback(

example/src/screens/Examples/KeyboardChatScrollView/index.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,7 @@ function KeyboardChatScrollViewPlayground() {
104104

105105
return (
106106
<SafeAreaView edges={["bottom"]} style={styles.container}>
107-
<KeyboardGestureArea
108-
interpolator="ios"
109-
offset={inputHeight}
110-
style={styles.container}
111-
textInputNativeID="chat-input"
112-
>
107+
<>
113108
{mode === "legend" && (
114109
<LegendList
115110
alignItemsAtEnd={inverted}
@@ -180,7 +175,7 @@ function KeyboardChatScrollViewPlayground() {
180175
<Image source={require("./send.png")} style={styles.icon} />
181176
</TouchableOpacity>
182177
</KeyboardStickyView>
183-
</KeyboardGestureArea>
178+
</>
184179
<ConfigSheet />
185180
</SafeAreaView>
186181
);

src/components/ScrollViewWithBottomPadding/index.tsx

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -125,17 +125,7 @@ const ScrollViewWithBottomPadding = forwardRef<
125125
style={styles.container}
126126
>
127127
<ScrollViewComponent ref={ref} animatedProps={animatedProps} {...rest}>
128-
{inverted && OS === "android" ? (
129-
// The only thing it can break is `StickyHeader`, but it's already broken in FlatList and other lists
130-
// don't support this functionality, so we can add additional view here
131-
// The correct fix would be to add a new prop in ScrollView that allows
132-
// to customize children extraction logic and skip custom view
133-
<View collapsable={false} nativeID="container">
134-
{children}
135-
</View>
136-
) : (
137-
children
138-
)}
128+
{children}
139129
</ScrollViewComponent>
140130
</ReanimatedClippingScrollView>
141131
);

0 commit comments

Comments
 (0)