Upgrade to Expo 49 (#1331)

* update to expo 49

* update expo-camera to fix console erorrs

* run doctor again

* fix ts errors

* patch @sentry/react-native

Getting `cannot read property 'ignoreLogs' of undefined` in this file.
Ironically, this may be a cyclical imports problem. LogBox isn't enabled
in production, so this patch should only affect dev/test.

* fix type error

* reinstall newer reanimated

* pin expo-dev-client to fix reanimated dev-build issue

* fix type errors, fix bad conflict res

* Fix to notifications badge z-index on desktop

---------

Co-authored-by: Paul Frazee <pfrazee@gmail.com>
This commit is contained in:
Eric Bailey 2023-09-05 14:23:22 -05:00 committed by GitHub
parent 9a3fa512eb
commit e3e91816d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 1133 additions and 1768 deletions

View file

@ -90,6 +90,7 @@ const styles = StyleSheet.create({
containerInner: {
height: '100%',
justifyContent: 'center',
// @ts-ignore web only
paddingBottom: '20vh',
paddingHorizontal: 20,
},

View file

@ -242,6 +242,7 @@ const styles = StyleSheet.create({
overflow: 'hidden',
whiteSpace: 'nowrap',
textOverflow: 'ellipsis',
// @ts-ignore only rendered on web
maxWidth: '400px',
},
description: {

View file

@ -145,7 +145,9 @@ const styles = StyleSheet.create({
},
container: {
width: 500,
// @ts-ignore web only
maxWidth: '100vw',
// @ts-ignore web only
maxHeight: '100vh',
paddingVertical: 20,
paddingHorizontal: 24,

View file

@ -54,6 +54,7 @@ export function Component({}: {}) {
style={[
pal.view,
styles.container,
// @ts-ignore vh is web only
isMobile
? {
paddingTop: 20,

View file

@ -55,6 +55,7 @@ export const Component = observer(() => {
style={[
pal.view,
styles.container,
// @ts-ignore vh is on web only
isMobile
? {
paddingTop: 20,

View file

@ -36,7 +36,7 @@ export const Pager = forwardRef<PagerRef, React.PropsWithChildren<Props>>(
ref,
) => {
const [selectedPage, setSelectedPage] = React.useState(0)
const pagerView = React.useRef<PagerView>()
const pagerView = React.useRef<PagerView>(null)
React.useImperativeHandle(ref, () => ({
setPage: (index: number) => pagerView.current?.setPage(index),

View file

@ -1,5 +1,11 @@
import React from 'react'
import {StyleSheet, StyleProp, View, ViewStyle} from 'react-native'
import {
StyleSheet,
StyleProp,
View,
ViewStyle,
DimensionValue,
} from 'react-native'
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
import {HeartIcon} from 'lib/icons'
import {s} from 'lib/styles'
@ -11,8 +17,8 @@ export function LoadingPlaceholder({
height,
style,
}: {
width: string | number
height: string | number
width: DimensionValue
height: DimensionValue
style?: StyleProp<ViewStyle>
}) {
const theme = useTheme()

View file

@ -4,7 +4,10 @@
import React, {useState, useEffect} from 'react'
import {StyleSheet, Text, View} from 'react-native'
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
import {
FontAwesomeIcon,
FontAwesomeIconStyle,
} from '@fortawesome/react-native-fontawesome'
const DURATION = 3500
@ -32,7 +35,11 @@ export const ToastContainer: React.FC<ToastContainerProps> = ({}) => {
<>
{activeToast && (
<View style={styles.container}>
<FontAwesomeIcon icon="check" size={24} style={styles.icon} />
<FontAwesomeIcon
icon="check"
size={24}
style={styles.icon as FontAwesomeIconStyle}
/>
<Text style={styles.text}>{activeToast.text}</Text>
</View>
)}
@ -57,6 +64,7 @@ const styles = StyleSheet.create({
position: 'absolute',
left: 20,
bottom: 20,
// @ts-ignore web only
width: 'calc(100% - 40px)',
maxWidth: 350,
padding: 20,

View file

@ -118,6 +118,7 @@ const styles = StyleSheet.create({
contentContainer: {
borderLeftWidth: 1,
borderRightWidth: 1,
// @ts-ignore web only
minHeight: '100vh',
},
container: {
@ -133,6 +134,7 @@ const styles = StyleSheet.create({
marginRight: 'auto',
},
fixedHeight: {
// @ts-ignore web only
height: '100vh',
},
stableGutters: {

View file

@ -60,6 +60,7 @@ export const LoggedOutLayout = ({
const styles = StyleSheet.create({
container: {
flexDirection: 'row',
// @ts-ignore web only
height: '100vh',
},
side: {

View file

@ -74,6 +74,7 @@ const styles = StyleSheet.create({
alignItems: 'center',
justifyContent: 'center',
position: 'absolute',
// @ts-ignore web only
left: '50vw',
// @ts-ignore web only -prf
transform: 'translateX(-282px)',
@ -92,6 +93,7 @@ const styles = StyleSheet.create({
alignItems: 'center',
justifyContent: 'center',
position: 'absolute',
// @ts-ignore web only
left: '50vw',
// @ts-ignore web only -prf
transform: 'translateX(-50%)',

View file

@ -246,6 +246,7 @@ const styles = StyleSheet.create({
desktopContainer: {
borderLeftWidth: 1,
borderRightWidth: 1,
// @ts-ignore only rendered on web
minHeight: '100vh',
},
empty: {

View file

@ -76,11 +76,13 @@ const styles = StyleSheet.create({
borderRadius: 8,
marginBottom: 0,
borderWidth: 1,
// @ts-ignore web only
maxHeight: 'calc(100% - (40px * 2))',
},
containerMobile: {
borderRadius: 0,
marginBottom: BOTTOM_BAR_HEIGHT,
// @ts-ignore web only
maxHeight: `calc(100% - ${BOTTOM_BAR_HEIGHT}px)`,
},
})

View file

@ -367,8 +367,10 @@ const styles = StyleSheet.create({
leftNav: {
position: 'absolute',
top: 10,
// @ts-ignore web only
right: 'calc(50vw + 312px)',
width: 220,
// @ts-ignore web only
maxHeight: 'calc(100vh - 10px)',
overflowY: 'auto',
},
@ -413,6 +415,7 @@ const styles = StyleSheet.create({
width: 28,
height: 28,
marginTop: 2,
zIndex: 1,
},
navItemIconWrapperTablet: {
width: 40,

View file

@ -120,6 +120,7 @@ const styles = StyleSheet.create({
rightNav: {
position: 'absolute',
top: 20,
// @ts-ignore web only
left: 'calc(50vw + 310px)',
width: 304,
},

View file

@ -1,7 +1,12 @@
import React from 'react'
import {observer} from 'mobx-react-lite'
import {StatusBar} from 'expo-status-bar'
import {StyleSheet, useWindowDimensions, View} from 'react-native'
import {
DimensionValue,
StyleSheet,
useWindowDimensions,
View,
} from 'react-native'
import {useSafeAreaInsets} from 'react-native-safe-area-context'
import {Drawer} from 'react-native-drawer-layout'
import {useNavigationState} from '@react-navigation/native'
@ -25,7 +30,7 @@ const ShellInner = observer(() => {
const winDim = useWindowDimensions()
const safeAreaInsets = useSafeAreaInsets()
const containerPadding = React.useMemo(
() => ({height: '100%', paddingTop: safeAreaInsets.top}),
() => ({height: '100%' as DimensionValue, paddingTop: safeAreaInsets.top}),
[safeAreaInsets],
)
const renderDrawerContent = React.useCallback(() => <DrawerContent />, [])