-
Notifications
You must be signed in to change notification settings - Fork 0
[fix] WebView 레이아웃 최적화를 위한 Safe Area Insets 주입 기능 구현 #11
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
🧩 Analysis chain
🏁 Script executed:
fd "club-detail-screen.tsx" --type fRepository: Moadong/moadong-react-native
Length of output: 109
🏁 Script executed:
Repository: Moadong/moadong-react-native
Length of output: 113
🏁 Script executed:
Repository: Moadong/moadong-react-native
Length of output: 6110
🏁 Script executed:
Repository: Moadong/moadong-react-native
Length of output: 3376
🏁 Script executed:
rg "useEffect|injectJavaScript|insets" ui/club-detail/club-detail-screen.tsx -A 3 -B 1Repository: Moadong/moadong-react-native
Length of output: 434
🏁 Script executed:
rg "injectedJavaScript|injectJavaScript|webviewRef" --type tsx --type ts -B 2 -A 2Repository: Moadong/moadong-react-native
Length of output: 99
🏁 Script executed:
rg "injectedJavaScript|injectJavaScript|webviewRef" -B 2 -A 2Repository: Moadong/moadong-react-native
Length of output: 469
🏁 Script executed:
rg "onLayout|onOrientationChange|useEffect|useCallback" ui/club-detail/club-detail-screen.tsxRepository: Moadong/moadong-react-native
Length of output: 54
🏁 Script executed:
rg "useSafeAreaInsets|useWindowDimensions|Dimensions.addEventListener" -B 2 -A 2Repository: Moadong/moadong-react-native
Length of output: 2820
기기 회전 및 멀티윈도우 시 인셋 값이 업데이트되지 않음
injectedJavaScript는 WebView 로드 시점에 한 번만 실행되므로, 기기 회전이나 멀티윈도우 진입 시useSafeAreaInsets()에서 반환하는 값이 변경되어도 WebView 내 CSS 변수(--rn-safe-top,--rn-safe-bottom)는 초기값으로 유지됩니다. WebView ref를 생성하고useEffect에서 insets 변경을 감지하여injectJavaScript()메서드로 재주입하거나, WebView의onLayout핸들러를 통해 적절히 대응해야 합니다.🤖 Prompt for AI Agents