Conversation
❌ Deploy Preview for reactnativecn failed. Why did it fail? →
|
📝 WalkthroughWalkthroughDocumentation updates across multiple Chinese React Native docs: removed DatePickerAndroid/DatePickerIOS content in favor of removal notices, reorganized debugging content with new DevTools and LogBox guidance, and refreshed several component and guide pages with updated examples and admonitions. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@cndocs/imagebackground.md`:
- Around line 16-17: The SnackPlayer example declaration is missing the external
dependency for the imports SafeAreaView and SafeAreaProvider; update the
SnackPlayer tag (the example header named ImageBackground) to include
dependencies=react-native-safe-area-context so the example becomes SnackPlayer
name=ImageBackground&dependencies=react-native-safe-area-context, ensuring the
imported SafeAreaView and SafeAreaProvider are available at runtime.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: b25d42c8-9795-4967-a51d-deec854fc233
📒 Files selected for processing (9)
cndocs/datepickerandroid.mdcndocs/datepickerios.mdcndocs/debugging.mdcndocs/dynamiccolorios.mdcndocs/handling-text-input.mdcndocs/imagebackground.mdcndocs/introduction.mdcndocs/javascript-environment.mdcndocs/keyboard.md
| import {ImageBackground, StyleSheet, Text} from 'react-native'; | ||
| import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context'; |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Check for react-native-safe-area-context references and installation instructions
# Check if package.json or dependencies documentation mentions this package
fd -e json -e md package.json yarn.lock | xargs rg -l "react-native-safe-area-context" -C 2
# Check for any installation or setup documentation
rg -n "react-native-safe-area-context" --glob "*.md" -C 3Repository: reactnativecn/react-native-website
Length of output: 50507
🏁 Script executed:
#!/bin/bash
# Check the actual file content to see context around the changes
cat -n cndocs/imagebackground.md | head -80Repository: reactnativecn/react-native-website
Length of output: 2313
🏁 Script executed:
#!/bin/bash
# Search for setup/installation documentation in Chinese docs
rg -l "react-native-safe-area-context" cndocs/ -A 3 -B 3Repository: reactnativecn/react-native-website
Length of output: 1024
🏁 Script executed:
#!/bin/bash
# Check if there's any note about SnackPlayer dependencies in the Chinese docs
rg -i "snackplayer|dependencies|install|安装" cndocs/imagebackground.md | head -20Repository: reactnativecn/react-native-website
Length of output: 115
🏁 Script executed:
#!/bin/bash
# Check navigation.md in Chinese docs for setup/installation instructions
cat -n cndocs/navigation.md | grep -A 10 -B 2 "react-native-safe-area-context\|安装\|install" | head -50Repository: reactnativecn/react-native-website
Length of output: 1209
🏁 Script executed:
#!/bin/bash
# Compare SnackPlayer declarations - check if cndocs examples declare dependencies
echo "=== English docs example with dependencies ==="
grep -n "SnackPlayer.*dependencies" docs/shadow-props.md | head -3
echo ""
echo "=== Chinese docs examples ==="
grep -n "SnackPlayer" cndocs/imagebackground.md
grep -n "SnackPlayer" cndocs/shadow-props.mdRepository: reactnativecn/react-native-website
Length of output: 648
🏁 Script executed:
#!/bin/bash
# Check if the example in cndocs actually works by looking at similar patterns
rg "SnackPlayer.*SafeAreaProvider|SafeAreaView.*SnackPlayer" cndocs/ -A 1 -B 1 | head -30Repository: reactnativecn/react-native-website
Length of output: 60
Add the missing dependency declaration to the SnackPlayer example.
The code imports SafeAreaView and SafeAreaProvider from react-native-safe-area-context, but the SnackPlayer declaration does not include this dependency. Update line 14 to:
```SnackPlayer name=ImageBackground&dependencies=react-native-safe-area-context
Other examples in the documentation (e.g., shadow-props.md) correctly declare external dependencies using the dependencies= parameter, which ensures they are available when the example runs in SnackPlayer.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@cndocs/imagebackground.md` around lines 16 - 17, The SnackPlayer example
declaration is missing the external dependency for the imports SafeAreaView and
SafeAreaProvider; update the SnackPlayer tag (the example header named
ImageBackground) to include dependencies=react-native-safe-area-context so the
example becomes SnackPlayer
name=ImageBackground&dependencies=react-native-safe-area-context, ensuring the
imported SafeAreaView and SafeAreaProvider are available at runtime.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@cndocs/more-resources.md`:
- Line 47: Update the four legacy documentation links in the sentence that
currently point to `legacy/native-modules-android.md`,
`legacy/native-modules-ios.md`, `legacy/native-components-android.md`, and
`legacy/native-components-ios.md` by removing the `.md` extension so they become
`legacy/native-modules-android`, `legacy/native-modules-ios`,
`legacy/native-components-android`, and `legacy/native-components-ios`; locate
the sentence containing these link targets (the line referencing Native Modules
and Native Components) and replace each `.md` suffixed link with the
corresponding extensionless path.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
| 世界各地有很多React Native[聚会](http://www.meetup.com/topics/react-native/)。在 React 聚会中通常也有 React Native 内容。 | ||
|
|
||
| 有时我们会有 React 会议。我们发布了[React.js Conf 2017](https://www.youtube.com/playlist?list=PLb0IAmt7-GS3fZ46IGFirdqKTIxlws7e0)和[React.js Conf 2016](https://www.youtube.com/playlist?list=PLb0IAmt7-GS0M8Q95RIc2lOM6nc77q1IY)的视频,未来我们可能还会举办更多会议,敬请关注。您还可以在[此处](http://www.awesome-react-native.com/#conferences)找到专门的 React Native 会议列表。 | ||
| 想自己创建 Native Component 或 Module 吗?为自己的使用场景编写模块,并通过 NPM 和 GitHub 与他人分享,有助于壮大 React Native 的生态与社区!可以阅读以下指南来创建你自己的 Native Modules([Android](legacy/native-modules-android.md)、[iOS](legacy/native-modules-ios.md))以及 Native Components([Android](legacy/native-components-android.md)、[iOS](legacy/native-components-ios.md))。 |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Check how legacy docs are referenced elsewhere in cndocs
# Search for links to legacy native modules/components in other Chinese docs
rg -n "legacy/native-" --type=md -g 'cndocs/**' -C2
# Also check if .md extensions are used in links elsewhere
rg -nP '\]\([^)]+\.md\)' --type=md -g 'cndocs/**'Repository: reactnativecn/react-native-website
Length of output: 22160
Remove .md file extensions from legacy documentation links on this line.
The links to legacy documentation on this line include .md extensions, which is inconsistent with how the same legacy pages are referenced in other Chinese docs. In communication-ios.md, communication-android.md, and native-platforms.md, these same legacy pages are linked without .md extensions (e.g., legacy/native-modules-android instead of legacy/native-modules-android.md).
Update the links to:
legacy/native-modules-androidlegacy/native-modules-ioslegacy/native-components-androidlegacy/native-components-ios
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@cndocs/more-resources.md` at line 47, Update the four legacy documentation
links in the sentence that currently point to
`legacy/native-modules-android.md`, `legacy/native-modules-ios.md`,
`legacy/native-components-android.md`, and `legacy/native-components-ios.md` by
removing the `.md` extension so they become `legacy/native-modules-android`,
`legacy/native-modules-ios`, `legacy/native-components-android`, and
`legacy/native-components-ios`; locate the sentence containing these link
targets (the line referencing Native Modules and Native Components) and replace
each `.md` suffixed link with the corresponding extensionless path.
Summary
Updated files
Notes
sync-translations.sh在改动合入production前,仍可能继续将这些文件列为候选,这是当前按production时间戳判断的脚本行为。Test Plan
Summary by CodeRabbit
Documentation
Deprecated