From d5efa209b7a88181d07858d70b6fd15272991dec Mon Sep 17 00:00:00 2001 From: Guy Tepper Date: Sat, 28 Dec 2024 14:00:31 +0200 Subject: [PATCH 1/6] update lib --- package.json | 2 +- yarn.lock | 39 ++++++++++++++++++++++++++++++++------- 2 files changed, 33 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index fd81b3dee..14bdaea52 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ }, "dependencies": { "@expo/react-native-action-sheet": "^4.1.0", - "@gorhom/bottom-sheet": "^4", + "@gorhom/bottom-sheet": "^5.0.6", "@notifee/react-native": "^9.1.2", "@react-native-async-storage/async-storage": "^2.0.0", "@react-native-community/blur": "^4.3.2", diff --git a/yarn.lock b/yarn.lock index 64e69444a..c6340fb92 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2331,10 +2331,10 @@ find-up "^5.0.0" js-yaml "^4.1.0" -"@gorhom/bottom-sheet@^4": - version "4.5.1" - resolved "https://registry.yarnpkg.com/@gorhom/bottom-sheet/-/bottom-sheet-4.5.1.tgz#1ac4b234a80e7dff263f0b7ac207f92e41562849" - integrity sha512-4Qy6hzvN32fXu2hDxDXOIS0IBGBT6huST7J7+K1V5bXemZ08KIx5ZffyLgwhCUl+CnyeG2KG6tqk6iYLkIwi7Q== +"@gorhom/bottom-sheet@^5.0.6": + version "5.0.6" + resolved "https://registry.yarnpkg.com/@gorhom/bottom-sheet/-/bottom-sheet-5.0.6.tgz#f20736502399c7bcf8c73ea09e6b571dc07fe0eb" + integrity sha512-SI/AhPvgRfnCWN6/+wbE6TXwRE4X8F2fLyE4L/0bRwgE34Zenq585qLT139uEcfCIyovC2swC3ICqQpkmWEcFA== dependencies: "@gorhom/portal" "1.0.14" invariant "^2.2.4" @@ -18015,7 +18015,7 @@ string-natural-compare@^3.0.1: resolved "https://registry.yarnpkg.com/string-natural-compare/-/string-natural-compare-3.0.1.tgz#7a42d58474454963759e8e8b7ae63d71c1e7fdf4" integrity sha512-n3sPwynL1nwKi3WJ6AIsClwBMa0zTi54fn2oLU6ndfTSIO05xaznjSf15PcBZU6FNWbmN5Q6cxT4V5hGvB4taw== -"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0": version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -18041,6 +18041,15 @@ string-width@^1.0.1: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" +"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + string-width@^3.0.0, string-width@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" @@ -18187,7 +18196,7 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -18215,6 +18224,13 @@ strip-ansi@^4.0.0: dependencies: ansi-regex "^3.0.0" +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + strip-ansi@^7.0.1: version "7.1.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" @@ -19824,7 +19840,7 @@ workerpool@6.0.2: resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.0.2.tgz#e241b43d8d033f1beb52c7851069456039d1d438" integrity sha512-DSNyvOpFKrNusaaUwk+ej6cBj1bmhLcBfj80elGk+ZIo5JSkq+unB1dLKEOcNfJDZgjGICfhQ0Q5TbP0PvF4+Q== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -19851,6 +19867,15 @@ wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" From d75a89c512aff83e0c1aee19e1e901465711d367 Mon Sep 17 00:00:00 2001 From: Guy Tepper Date: Sat, 28 Dec 2024 14:00:40 +0200 Subject: [PATCH 2/6] fix type imports --- app/screens/route-details/route-details-screen.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/screens/route-details/route-details-screen.tsx b/app/screens/route-details/route-details-screen.tsx index 78aa1576f..8f4c3ee07 100644 --- a/app/screens/route-details/route-details-screen.tsx +++ b/app/screens/route-details/route-details-screen.tsx @@ -9,9 +9,7 @@ import Animated, { FadeInDown, FadeOutDown } from "react-native-reanimated" import { format } from "date-fns" import { useStores } from "../../models" -import { RouteItem } from "../../services/api" import { useRideProgress } from "../../hooks/use-ride-progress" -import { RouteDetailsScreenProps } from "../../navigators/main-navigator" import { color, spacing } from "../../theme" import { RouteDetailsHeader, Screen } from "../../components" import { @@ -23,9 +21,12 @@ import { RouteStopCard, StartRideButton, } from "./components" -import BottomSheet from "@gorhom/bottom-sheet" import { LivePermissionsSheet } from "./components/live-permissions-sheet" +import type { RouteItem } from "../../services/api" +import type { RouteDetailsScreenProps } from "../../navigators/main-navigator" +import type BottomSheet from "@gorhom/bottom-sheet" + const ROOT: ViewStyle = { flex: 1, backgroundColor: color.background, @@ -37,7 +38,7 @@ export const RouteDetailsScreen = observer(function RouteDetailsScreen({ route } // When we present the Live Permissions Sheet we initiate a promise that // resolves when all the permissions are given and the user starts a ride - const permissionsPromise = useRef(null) + const permissionsPromise = useRef<() => void>(null) // we re-run this check every time the ride changes const isRideOnThisRoute = useMemo(() => ride.isRouteActive(route.params.routeItem), [ride.route]) From 083d23677315c18a7eefed079ef9515bc41f3bb7 Mon Sep 17 00:00:00 2001 From: Guy Tepper Date: Sat, 28 Dec 2024 14:17:01 +0200 Subject: [PATCH 3/6] remove `enableDynamicSizing` prop as it's now enabled by default --- app/screens/route-details/components/live-permissions-sheet.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/screens/route-details/components/live-permissions-sheet.tsx b/app/screens/route-details/components/live-permissions-sheet.tsx index 224fed793..da2c01f22 100644 --- a/app/screens/route-details/components/live-permissions-sheet.tsx +++ b/app/screens/route-details/components/live-permissions-sheet.tsx @@ -43,7 +43,7 @@ export const LivePermissionsSheet = observer( } return ( - + From ecb541b5eb1041ff1d750c18f50383855eaf9256 Mon Sep 17 00:00:00 2001 From: Guy Tepper Date: Sat, 28 Dec 2024 14:17:06 +0200 Subject: [PATCH 4/6] fxix type imports --- .../route-details/components/live-permissions-sheet.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/screens/route-details/components/live-permissions-sheet.tsx b/app/screens/route-details/components/live-permissions-sheet.tsx index da2c01f22..4a9c6ae40 100644 --- a/app/screens/route-details/components/live-permissions-sheet.tsx +++ b/app/screens/route-details/components/live-permissions-sheet.tsx @@ -1,6 +1,7 @@ import { forwardRef } from "react" -import { Image, PermissionsAndroid, TextStyle, View, ViewStyle } from "react-native" -import BottomSheet, { BottomSheetView } from "@gorhom/bottom-sheet" +import { Image, PermissionsAndroid, View, type TextStyle, type ViewStyle } from "react-native" +import type BottomSheet from "@gorhom/bottom-sheet" +import { BottomSheetView } from "@gorhom/bottom-sheet" import { Button, Text } from "../../../components" import { BottomSheetModal } from "../../../components/sheets/bottom-sheet-modal" import { color, spacing } from "../../../theme" From d266625c2aa31b0fd2ff9d47594e5dfec0bcb3a7 Mon Sep 17 00:00:00 2001 From: Guy Tepper Date: Sat, 28 Dec 2024 14:34:17 +0200 Subject: [PATCH 5/6] Remove max height to handle large font scales --- app/screens/route-details/components/live-permissions-sheet.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/screens/route-details/components/live-permissions-sheet.tsx b/app/screens/route-details/components/live-permissions-sheet.tsx index 4a9c6ae40..728f4e73e 100644 --- a/app/screens/route-details/components/live-permissions-sheet.tsx +++ b/app/screens/route-details/components/live-permissions-sheet.tsx @@ -68,7 +68,7 @@ export const LivePermissionsSheet = observer(