-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chat Composer Glow Up / Changed Functionality #1513
Changes from all commits
54026ef
952b479
db9553b
cc44c63
f78c3bb
8102c02
1728c8c
b6419ad
99e3525
a3d0d83
55814f5
4a9fb97
9517160
5b29a45
ea59bf7
cd458c7
39474b6
f4824a4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
import "expo-dev-client"; | ||
import "./polyfills"; | ||
|
||
import { | ||
configureReanimatedLogger, | ||
ReanimatedLogLevel, | ||
} from "react-native-reanimated"; | ||
import { configure as configureCoinbase } from "@coinbase/wallet-mobile-sdk"; | ||
import DebugButton from "@components/DebugButton"; | ||
import { BottomSheetModalProvider } from "@design-system/BottomSheet/BottomSheetModalProvider"; | ||
|
@@ -10,7 +13,7 @@ | |
import { queryClient } from "@queries/queryClient"; | ||
import { MaterialDarkTheme, MaterialLightTheme } from "@styles/colors"; | ||
import { QueryClientProvider } from "@tanstack/react-query"; | ||
import { useAppTheme, useThemeProvider } from "@theme/useAppTheme"; | ||
import { useCoinbaseWalletListener } from "@utils/coinbaseWallet"; | ||
import { converseEventEmitter } from "@utils/events"; | ||
import logger from "@utils/logger"; | ||
|
@@ -48,8 +51,21 @@ | |
"Privy: Expected status code 200, received 400", // Privy | ||
"Error destroying session", // Privy | ||
'event="noNetwork', // ethers | ||
"[Reanimated] Reading from `value` during component render. Please ensure that you do not access the `value` property or use `get` method of a shared value while React is rendering a component.", | ||
"Attempted to import the module", | ||
]); | ||
|
||
// This is the default configuration | ||
configureReanimatedLogger({ | ||
level: ReanimatedLogLevel.warn, | ||
strict: /* | ||
Ignores the following warning: | ||
"[Reanimated] Reading from `value` during component render. Please ensure that you do not access the `value` property or use `get` method of a shared value while React is rendering a component.", | ||
todo investigate | ||
|
||
*/ false, | ||
}); | ||
Comment on lines
+58
to
+67
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Improve the TODO comment and reconsider strict mode configuration.
-todo investigate
+TODO(owner): Investigate shared value access during render and determine if strict mode can be enabled
+Target: DD/MM/YYYY
|
||
|
||
configureCoinbase({ | ||
callbackURL: new URL(`https://${config.websiteDomain}/coinbase`), | ||
hostURL: new URL("https://wallet.coinbase.com/wsegue"), | ||
|
@@ -79,10 +95,10 @@ | |
}, []); | ||
|
||
const showDebugMenu = useCallback(() => { | ||
if (!debugRef.current || !(debugRef.current as any).showDebugMenu) { | ||
return; | ||
} | ||
(debugRef.current as any).showDebugMenu(); | ||
}, []); | ||
|
||
useEffect(() => { | ||
|
@@ -126,7 +142,7 @@ | |
const AppKeyboardProvider = | ||
Platform.OS === "ios" ? KeyboardProvider : React.Fragment; | ||
|
||
export default function AppWithProviders() { | ||
const colorScheme = useColorScheme(); | ||
|
||
const paperTheme = useMemo(() => { | ||
|
@@ -144,7 +160,7 @@ | |
<ActionSheetProvider> | ||
<ThemeProvider value={{ themeScheme, setThemeContextOverride }}> | ||
<PaperProvider theme={paperTheme}> | ||
<GestureHandlerRootView style={{ flex: 1 }}> | ||
<BottomSheetModalProvider> | ||
<App /> | ||
<Snackbars /> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ import { ParsedText } from "@components/ParsedText/ParsedText"; | |
import Clipboard from "@react-native-clipboard/clipboard"; | ||
import { actionSheetColors } from "@styles/colors"; | ||
import * as Linking from "expo-linking"; | ||
import { useCallback } from "react"; | ||
import { useCallback, useEffect } from "react"; | ||
import { StyleProp, StyleSheet, TextStyle, useColorScheme } from "react-native"; | ||
import { navigate } from "../utils/navigation"; | ||
import { | ||
|
@@ -38,7 +38,7 @@ export function ClickableText({ children, style }: Props) { | |
}, []); | ||
|
||
const handleNewConversationPress = useCallback((peer: string) => { | ||
navigate("NewConversation", { peer }); | ||
navigate("Conversation", { peer }); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Navigation route inconsistency detected The change to use "Conversation" in
🔗 Analysis chainVerify navigation flow changes. The navigation destination has changed from "NewConversation" to "Conversation". Ensure this change is intentional and all related navigation flows have been updated accordingly. 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Search for any remaining references to the old navigation route
rg '"NewConversation"' --type ts --type tsx
# Search for navigation.navigate calls to verify consistency
ast-grep --pattern 'navigate("Conversation"'
Length of output: 120 Script: #!/bin/bash
# Search for both old and new navigation routes
rg -t typescript -t javascriptreact -t typescriptreact '"NewConversation"|"Conversation"'
# Search for navigation patterns using ast-grep
ast-grep --pattern 'navigate($ROUTE, $$$)'
# Also search for navigation.navigate pattern
ast-grep --pattern 'navigation.navigate($ROUTE, $$$)'
Length of output: 4641 |
||
}, []); | ||
|
||
const showCopyActionSheet = useCallback( | ||
|
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Fix shared value access in JoinGroup screen
The warning is caused by direct access to
state.value
during render infeatures/GroupInvites/joinGroup/JoinGroup.screen.tsx
. To fix this:useDerivedValue
🔗 Analysis chain
Investigate the root cause of the Reanimated warning.
While ignoring the warning allows the app to function, it masks a potential performance or correctness issue. The warning indicates that shared values are being accessed during component rendering, which could lead to unnecessary re-renders or race conditions.
Let's search for potential causes:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 20729
Script:
Length of output: 10328