Skip to content

Commit e9c4d17

Browse files
regression: bottom sheet content not accessible (#6350)
* fix: rollback discord/bottom-sheet * fix: reset patch package * fix: yarn.lock * fix: rollback jest.setup.js * fix: rollback podfile * fix: e2eencryption test
1 parent 9c28a6e commit e9c4d17

File tree

9 files changed

+74
-16
lines changed

9 files changed

+74
-16
lines changed

app/containers/ActionSheet/ActionSheet.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as Haptics from 'expo-haptics';
33
import React, { forwardRef, isValidElement, useEffect, useImperativeHandle, useRef, useState, useCallback } from 'react';
44
import { Keyboard, LayoutChangeEvent, useWindowDimensions } from 'react-native';
55
import { Easing, useDerivedValue, useSharedValue } from 'react-native-reanimated';
6-
import BottomSheet, { BottomSheetBackdrop, BottomSheetBackdropProps } from '@gorhom/bottom-sheet';
6+
import BottomSheet, { BottomSheetBackdrop, BottomSheetBackdropProps } from '@discord/bottom-sheet';
77
import { useSafeAreaInsets } from 'react-native-safe-area-context';
88

99
import { useTheme } from '../../theme';

app/containers/ActionSheet/BottomSheetContent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Text, useWindowDimensions, ViewProps } from 'react-native';
22
import React from 'react';
3-
import { BottomSheetView, BottomSheetFlatList } from '@gorhom/bottom-sheet';
3+
import { BottomSheetView, BottomSheetFlatList } from '@discord/bottom-sheet';
44
import { useSafeAreaInsets } from 'react-native-safe-area-context';
55

66
import I18n from '../../i18n';

app/containers/TextInput/FormTextInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { useState } from 'react';
22
import { StyleProp, StyleSheet, Text, TextInput as RNTextInput, TextInputProps, TextStyle, View, ViewStyle } from 'react-native';
3-
import { BottomSheetTextInput } from '@gorhom/bottom-sheet';
3+
import { BottomSheetTextInput } from '@discord/bottom-sheet';
44
import Touchable from 'react-native-platform-touchable';
55

66
import i18n from '../../i18n';

e2e/tests/assorted/01-e2eencryption.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ describe('E2E Encryption', () => {
120120
await changeE2EEPassword();
121121
await loginAs(UserA, false);
122122
await changeE2EEPassword();
123-
});
123+
}, 180000);
124124

125125
afterAll(async () => {
126126
await deleteCreatedUsers(deleteUsersAfterAll);

ios/Podfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2384,7 +2384,7 @@ SPEC CHECKSUMS:
23842384
boost: 7e761d76ca2ce687f7cc98e698152abd03a18f90
23852385
BugsnagReactNative: 99075268e263b0dffd630a560156d3b1f4a2df56
23862386
BVLinearGradient: 7815a70ab485b7b155186dd0cc836363e0288cad
2387-
DoubleConversion: cb417026b2400c8f53ae97020b2be961b59470cb
2387+
DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953
23882388
EXAV: 4c41f0a6ae54a0b96597abc90e37962ab2ee0d85
23892389
EXConstants: fcfc75800824ac2d5c592b5bc74130bad17b146b
23902390
EXImageLoader: e5da974e25b13585c196b658a440720c075482d5
@@ -2415,7 +2415,7 @@ SPEC CHECKSUMS:
24152415
FirebaseRemoteConfigInterop: 7c9a9c65eff32cbb0f7bf8d18140612ad57dfcc6
24162416
FirebaseSessions: 9b3b30947b97a15370e0902ee7a90f50ef60ead6
24172417
fmt: a40bb5bd0294ea969aaaba240a927bd33d878cdd
2418-
glog: eb93e2f488219332457c3c4eafd2738ddc7e80b8
2418+
glog: c5d68082e772fa1c511173d6b30a9de2c05a69a2
24192419
GoogleAppMeasurement: 36684bfb3ee034e2b42b4321eb19da3a1b81e65d
24202420
GoogleDataTransport: aae35b7ea0c09004c3797d53c8c41f66f219d6a7
24212421
GoogleUtilities: 26a3abef001b6533cf678d3eb38fd3f614b7872d
@@ -2428,7 +2428,7 @@ SPEC CHECKSUMS:
24282428
OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c
24292429
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
24302430
PromisesSwift: 9d77319bbe72ebf6d872900551f7eeba9bce2851
2431-
RCT-Folly: e78785aa9ba2ed998ea4151e314036f6c49e6d82
2431+
RCT-Folly: 36fe2295e44b10d831836cc0d1daec5f8abcf809
24322432
RCTDeprecation: 85b72250b63cfb54f29ca96ceb108cb9ef3c2079
24332433
RCTRequired: 567cb8f5d42b990331bfd93faad1d8999b1c1736
24342434
RCTTypeSafety: 5e57924492a5e0a762654f814dd018953274eca9

jest.setup.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,15 @@ jest.mock('react-native-notifications', () => ({
111111
}
112112
}));
113113

114+
jest.mock('@discord/bottom-sheet', () => {
115+
const react = require('react-native');
116+
return {
117+
__esModule: true,
118+
default: react.View,
119+
BottomSheetScrollView: react.ScrollView
120+
};
121+
});
122+
114123
jest.mock('react-native-math-view', () => {
115124
const react = require('react-native');
116125
return {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"dependencies": {
3434
"@bugsnag/react-native": "^8.3.0",
3535
"@codler/react-native-keyboard-aware-scroll-view": "2.0.1",
36-
"@gorhom/bottom-sheet": "4.6.4",
36+
"@discord/bottom-sheet": "bluesky-social/react-native-bottom-sheet",
3737
"@hookform/resolvers": "^2.9.10",
3838
"@notifee/react-native": "7.8.2",
3939
"@nozbe/watermelondb": "^0.28.0-2",
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
diff --git a/node_modules/@discord/bottom-sheet/src/components/bottomSheet/BottomSheet.tsx b/node_modules/@discord/bottom-sheet/src/components/bottomSheet/BottomSheet.tsx
2+
index 2897fef..9a8505e 100644
3+
--- a/node_modules/@discord/bottom-sheet/src/components/bottomSheet/BottomSheet.tsx
4+
+++ b/node_modules/@discord/bottom-sheet/src/components/bottomSheet/BottomSheet.tsx
5+
@@ -1382,7 +1382,8 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
6+
if (containerHeight !== _previousContainerHeight) {
7+
animationSource = ANIMATION_SOURCE.CONTAINER_RESIZE;
8+
animationConfig = {
9+
- duration: 0,
10+
+ // https://github.com/gorhom/react-native-bottom-sheet/pull/1497
11+
+ duration: 1,
12+
};
13+
}
14+
}
15+
diff --git a/node_modules/@discord/bottom-sheet/src/components/bottomSheetHandleContainer/BottomSheetHandleContainer.tsx b/node_modules/@discord/bottom-sheet/src/components/bottomSheetHandleContainer/BottomSheetHandleContainer.tsx
16+
index 2219e0f..59f90ba 100644
17+
--- a/node_modules/@discord/bottom-sheet/src/components/bottomSheetHandleContainer/BottomSheetHandleContainer.tsx
18+
+++ b/node_modules/@discord/bottom-sheet/src/components/bottomSheetHandleContainer/BottomSheetHandleContainer.tsx
19+
@@ -92,10 +92,6 @@ function BottomSheetHandleContainerComponent({
20+
>
21+
<Animated.View
22+
key="BottomSheetHandleContainer"
23+
- accessible={true}
24+
- accessibilityRole="adjustable"
25+
- accessibilityLabel="Bottom Sheet handle"
26+
- accessibilityHint="Drag up or down to extend or minimize the Bottom Sheet"
27+
onLayout={handleContainerLayout}
28+
>
29+
<HandleComponent
30+
diff --git a/node_modules/@discord/bottom-sheet/src/utilities/animate.ts b/node_modules/@discord/bottom-sheet/src/utilities/animate.ts
31+
index 0ce4c9a..9562675 100644
32+
--- a/node_modules/@discord/bottom-sheet/src/utilities/animate.ts
33+
+++ b/node_modules/@discord/bottom-sheet/src/utilities/animate.ts
34+
@@ -4,6 +4,7 @@ import {
35+
withTiming,
36+
withSpring,
37+
AnimationCallback,
38+
+ ReduceMotion,
39+
} from 'react-native-reanimated';
40+
import { ANIMATION_CONFIGS, ANIMATION_METHOD } from '../constants';
41+
42+
@@ -26,6 +27,8 @@ export const animate = ({
43+
configs = ANIMATION_CONFIGS;
44+
}
45+
46+
+ configs.reduceMotion = ReduceMotion.Never;
47+
+
48+
// detect animation type
49+
const type =
50+
'duration' in configs || 'easing' in configs

yarn.lock

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2354,6 +2354,13 @@
23542354
enabled "2.0.x"
23552355
kuler "^2.0.0"
23562356

2357+
"@discord/bottom-sheet@bluesky-social/react-native-bottom-sheet":
2358+
version "4.6.1"
2359+
resolved "https://codeload.github.com/bluesky-social/react-native-bottom-sheet/tar.gz/28a87d1bb55e10fc355fa1455545a30734995908"
2360+
dependencies:
2361+
"@gorhom/portal" "1.0.14"
2362+
invariant "^2.2.4"
2363+
23572364
"@egjs/hammerjs@^2.0.17":
23582365
version "2.0.17"
23592366
resolved "https://registry.yarnpkg.com/@egjs/hammerjs/-/hammerjs-2.0.17.tgz#5dc02af75a6a06e4c2db0202cae38c9263895124"
@@ -3240,14 +3247,6 @@
32403247
resolved "https://registry.yarnpkg.com/@flatten-js/interval-tree/-/interval-tree-1.1.2.tgz#fcc891da48bc230392884be01c26fe8c625702e8"
32413248
integrity sha512-OwLoV9E/XM6b7bes2rSFnGNjyRy7vcoIHFTnmBR2WAaZTf0Fe4EX4GdA65vU1KgFAasti7iRSg2dZfYd1Zt00Q==
32423249

3243-
3244-
version "4.6.4"
3245-
resolved "https://registry.yarnpkg.com/@gorhom/bottom-sheet/-/bottom-sheet-4.6.4.tgz#387d0f0f21e3470eb8575498cb81ce96f5108e79"
3246-
integrity sha512-0itLMblLBvepE065w3a60S030c2rNUsGshPC7wbWDm31VyqoaU2xjzh/ojH62YIJOcobBr5QoC30IxBBKDGovQ==
3247-
dependencies:
3248-
"@gorhom/portal" "1.0.14"
3249-
invariant "^2.2.4"
3250-
32513250
32523251
version "1.0.14"
32533252
resolved "https://registry.yarnpkg.com/@gorhom/portal/-/portal-1.0.14.tgz#1953edb76aaba80fb24021dc774550194a18e111"

0 commit comments

Comments
 (0)