Skip to content

Commit 832a06d

Browse files
committed
chore: upgrade bottom-sheet dependency
1 parent fb80da7 commit 832a06d

File tree

14 files changed

+162
-112
lines changed

14 files changed

+162
-112
lines changed

ios/Podfile.lock

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1719,7 +1719,7 @@ PODS:
17191719
- React-Core
17201720
- RNFS (2.20.0):
17211721
- React-Core
1722-
- RNGestureHandler (2.15.0):
1722+
- RNGestureHandler (2.21.2):
17231723
- DoubleConversion
17241724
- glog
17251725
- hermes-engine
@@ -1777,7 +1777,7 @@ PODS:
17771777
- React
17781778
- RNReactNativeHapticFeedback (2.2.0):
17791779
- React-Core
1780-
- RNReanimated (3.15.0):
1780+
- RNReanimated (3.16.5):
17811781
- DoubleConversion
17821782
- glog
17831783
- hermes-engine
@@ -1797,10 +1797,10 @@ PODS:
17971797
- ReactCodegen
17981798
- ReactCommon/turbomodule/bridging
17991799
- ReactCommon/turbomodule/core
1800-
- RNReanimated/reanimated (= 3.15.0)
1801-
- RNReanimated/worklets (= 3.15.0)
1800+
- RNReanimated/reanimated (= 3.16.5)
1801+
- RNReanimated/worklets (= 3.16.5)
18021802
- Yoga
1803-
- RNReanimated/reanimated (3.15.0):
1803+
- RNReanimated/reanimated (3.16.5):
18041804
- DoubleConversion
18051805
- glog
18061806
- hermes-engine
@@ -1820,8 +1820,30 @@ PODS:
18201820
- ReactCodegen
18211821
- ReactCommon/turbomodule/bridging
18221822
- ReactCommon/turbomodule/core
1823+
- RNReanimated/reanimated/apple (= 3.16.5)
18231824
- Yoga
1824-
- RNReanimated/worklets (3.15.0):
1825+
- RNReanimated/reanimated/apple (3.16.5):
1826+
- DoubleConversion
1827+
- glog
1828+
- hermes-engine
1829+
- RCT-Folly (= 2024.01.01.00)
1830+
- RCTRequired
1831+
- RCTTypeSafety
1832+
- React-Core
1833+
- React-debug
1834+
- React-Fabric
1835+
- React-featureflags
1836+
- React-graphics
1837+
- React-ImageManager
1838+
- React-NativeModulesApple
1839+
- React-RCTFabric
1840+
- React-rendererdebug
1841+
- React-utils
1842+
- ReactCodegen
1843+
- ReactCommon/turbomodule/bridging
1844+
- ReactCommon/turbomodule/core
1845+
- Yoga
1846+
- RNReanimated/worklets (3.16.5):
18251847
- DoubleConversion
18261848
- glog
18271849
- hermes-engine
@@ -2292,15 +2314,15 @@ SPEC CHECKSUMS:
22922314
RNCClipboard: 0a720adef5ec193aa0e3de24c3977222c7e52a37
22932315
RNDeviceInfo: b899ce37a403a4dea52b7cb85e16e49c04a5b88e
22942316
RNFS: 4ac0f0ea233904cb798630b3c077808c06931688
2295-
RNGestureHandler: e80cae4246813ee7f667a2552012a6b7da5550a1
2317+
RNGestureHandler: aa9690789023c9be8f06aa90e10ce637ea788f4d
22962318
RNKeychain: 4cfd0dc8634c2dd81a4607c8299ed424bfdee1a7
22972319
RNLocalize: dbea38dcb344bf80ff18a1757b1becf11f70cae4
22982320
RNNotifee: 8e2d3df3f0e9ce8f5d1fe4c967431138190b6175
22992321
RNPermissions: 2c0eec471f4de66d04d226c339898d10a6e123c4
23002322
RNQrGenerator: 1676221c08bfabec978242989c733810dad20959
23012323
RNQuickAction: 6d404a869dc872cde841ad3147416a670d13fa93
23022324
RNReactNativeHapticFeedback: ec56a5f81c3941206fd85625fa669ffc7b4545f9
2303-
RNReanimated: 74413c59c47123d7144db601d065627c75c746a3
2325+
RNReanimated: db4cd0009bf6f07da10d9e3a917f1abe29be6d9b
23042326
RNScreens: b03d696c70cc5235ce4587fcc27ae1a93a48f98c
23052327
RNShare: 554a91f5cfbe4adac4cfe3654826ee8b299fe365
23062328
RNSVG: 43b64ed39c14ce830d840903774154ca0c1f27ec

ios/bitkit.xcodeproj/project.pbxproj

Lines changed: 62 additions & 62 deletions
Large diffs are not rendered by default.

metro.config.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
const path = require('path');
22
const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config');
33
const exclusionList = require('metro-config/src/defaults/exclusionList');
4+
const {
5+
wrapWithReanimatedMetroConfig,
6+
} = require('react-native-reanimated/metro-config');
47

58
const defaultConfig = getDefaultConfig(__dirname);
69
const { assetExts, sourceExts } = defaultConfig.resolver;
@@ -35,4 +38,6 @@ const config = {
3538
},
3639
};
3740

38-
module.exports = mergeConfig(defaultConfig, config);
41+
const mergedConfig = mergeConfig(defaultConfig, config);
42+
43+
module.exports = wrapWithReanimatedMetroConfig(mergedConfig);

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"@formatjs/intl-numberformat": "8.10.1",
3838
"@formatjs/intl-pluralrules": "5.2.12",
3939
"@formatjs/intl-relativetimeformat": "11.2.12",
40-
"@gorhom/bottom-sheet": "4.6.3",
40+
"@gorhom/bottom-sheet": "5.0.6",
4141
"@notifee/react-native": "7.8.2",
4242
"@react-native-clipboard/clipboard": "1.14.1",
4343
"@react-native-community/blur": "4.4.0",
@@ -86,7 +86,7 @@
8686
"react-native-draggable-flatlist": "4.0.1",
8787
"react-native-fetch-api": "3.0.0",
8888
"react-native-fs": "2.20.0",
89-
"react-native-gesture-handler": "2.15.0",
89+
"react-native-gesture-handler": "2.21.2",
9090
"react-native-haptic-feedback": "2.2.0",
9191
"react-native-image-picker": "7.1.2",
9292
"react-native-keyboard-accessory": "0.1.16",
@@ -101,7 +101,7 @@
101101
"react-native-quick-base64": "2.1.2",
102102
"react-native-quick-bip39": "0.0.9",
103103
"react-native-quick-crypto": "0.7.1",
104-
"react-native-reanimated": "3.15.0",
104+
"react-native-reanimated": "3.16.5",
105105
"react-native-reanimated-carousel": "3.5.1",
106106
"react-native-restart": "0.0.27",
107107
"react-native-safe-area-context": "5.0.0",

src/components/BottomSheetWrapper.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,15 @@ const BottomSheetWrapper = forwardRef(
169169
index={index}
170170
snapPoints={snapPoints}
171171
animateOnMount={!reducedMotion && !__E2E__}
172+
enableDynamicSizing={false}
173+
enableOverdrag={false}
172174
enablePanDownToClose={true}
175+
keyboardBehavior="extend"
176+
// keyboardBehavior='fillParent'
173177
keyboardBlurBehavior="restore"
178+
// @ts-ignore
174179
activeOffsetX={activeOffsetX}
180+
// @ts-ignore
175181
activeOffsetY={activeOffsetY}
176182
onChange={handleSheetChanges}>
177183
<BottomSheetView style={style} testID={testID}>

src/components/KeyboardSpacer.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import React, { ReactElement } from 'react';
2+
import { ViewProps } from 'react-native';
3+
import Animated from 'react-native-reanimated';
4+
import useKeyboard from '../hooks/keyboard';
5+
6+
const KeyboardSpacer = (props: ViewProps): ReactElement => {
7+
const { keyboardHeight } = useKeyboard();
8+
return <Animated.View style={{ height: keyboardHeight }} {...props} />;
9+
};
10+
11+
export default KeyboardSpacer;

src/components/Suggestions.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ const Suggestions = (): ReactElement => {
189189
loop={false}
190190
height={170}
191191
width={167}
192+
// @ts-ignore
192193
panGestureHandlerProps={panGestureHandlerProps}
193194
onSnapToItem={setIndex}
194195
renderItem={handleRenderItem}

src/hooks/keyboard.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ const useKeyboard = (): {
99
const [keyboardShown, setKeyboardShown] = useState(false);
1010
const [keyboardHeight, setKeyboardHeight] = useState(0);
1111

12+
console.log({ keyboardHeight });
13+
1214
useEffect(() => {
1315
const keyboardWillShowListener = RNKeyboard.addListener(
1416
// ios has keyboardWillShow, android doesn't
@@ -20,7 +22,10 @@ const useKeyboard = (): {
2022
const keyboardDidShowListener = RNKeyboard.addListener(
2123
'keyboardDidShow',
2224
(event: KeyboardEvent) => {
23-
setKeyboardHeight(event.endCoordinates.height);
25+
const { height, screenY } = event.endCoordinates;
26+
console.log({ height, screenY });
27+
setKeyboardHeight(height);
28+
// setKeyboardHeight(screenY - height);
2429
},
2530
);
2631
const keyboardDidHideListener = RNKeyboard.addListener(

src/screens/Activity/ActivityTagsPrompt.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ const ActivityTagsPrompt = (): ReactElement => {
102102
text={t('tags_add_button')}
103103
size="large"
104104
disabled={text.length === 0}
105-
testID="ReceiveTagsSubmit"
105+
testID="ActivityTagsSubmit"
106106
onPress={handleSubmit}
107107
/>
108108
</View>

src/screens/Wallets/Receive/ReceiveDetails.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import {
3434
denominationSelector,
3535
nextUnitSelector,
3636
} from '../../../store/reselect/settings';
37+
import KeyboardSpacer from '../../../components/KeyboardSpacer';
3738

3839
const imageSrc = require('../../../assets/illustrations/coin-stack.png');
3940

@@ -250,6 +251,7 @@ const ReceiveDetails = ({
250251
)}
251252
</View>
252253
<SafeAreaInset type="bottom" minPadding={16} />
254+
<KeyboardSpacer />
253255
</GradientView>
254256
);
255257
};

0 commit comments

Comments
 (0)