Skip to content

docs(cndocs): 同步更多 React Native 中文文档更新#1009

Open
sunnylqm wants to merge 4 commits intoproductionfrom
auto-translate-20260410-batch-2
Open

docs(cndocs): 同步更多 React Native 中文文档更新#1009
sunnylqm wants to merge 4 commits intoproductionfrom
auto-translate-20260410-batch-2

Conversation

@sunnylqm
Copy link
Copy Markdown

@sunnylqm sunnylqm commented Apr 10, 2026

Summary

  • 同步已移除的 DatePickerAndroid / DatePickerIOS 文档
  • 更新 debugging、handling-text-input、imagebackground 等页面到当前上游结构
  • 同步 introduction、javascript-environment、keyboard 的内容与文档结构
  • 补齐 dynamiccolorios 的高对比度与辅助功能说明

Updated files

  • cndocs/datepickerandroid.md
  • cndocs/datepickerios.md
  • cndocs/dynamiccolorios.md
  • cndocs/debugging.md
  • cndocs/handling-text-input.md
  • cndocs/imagebackground.md
  • cndocs/introduction.md
  • cndocs/javascript-environment.md
  • cndocs/keyboard.md

Notes

  • sync-translations.sh 在改动合入 production 前,仍可能继续将这些文件列为候选,这是当前按 production 时间戳判断的脚本行为。

Test Plan

  • 逐文件对照英文源文档检查结构与内容
  • 确认仅提交文档同步改动
  • 本地检查 git diff 与提交内容

Summary by CodeRabbit

  • Documentation

    • Expanded debugging guide with refreshed DevTools, LogBox, and developer-menu guidance.
    • Added high-contrast support to dynamic color guidance.
    • Clarified TextInput behavior and examples; refreshed introduction and JavaScript runtime docs.
    • Updated ImageBackground examples and keyboard event notes.
    • Reorganized resources into topic-oriented learning and tooling guidance.
  • Deprecated

    • DatePickerAndroid and DatePickerIOS removed; migrate to community packages.

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 10, 2026

Deploy Preview for reactnativecn failed. Why did it fail? →

Name Link
🔨 Latest commit c54cc40
🔍 Latest deploy log https://app.netlify.com/projects/reactnativecn/deploys/69d92db57cf96a000821ca62

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 10, 2026

📝 Walkthrough

Walkthrough

Documentation 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

Cohort / File(s) Summary
Deprecated date pickers
cndocs/datepickerandroid.md, cndocs/datepickerios.md
Removed prior API and example content; replaced with danger callouts stating the components were removed from React Native and directing readers to community packages.
Debugging docs rework
cndocs/debugging.md
Rewrote page: renamed title, simplified developer-menu instructions, added DevTools section, expanded LogBox behavior and ignore APIs, removed older debugger/Flipper details, and updated images.
Component docs updates
cndocs/dynamiccolorios.md, cndocs/imagebackground.md, cndocs/handling-text-input.md, cndocs/keyboard.md
Clarified DynamicColorIOS input options and runtime selection, changed ImageBackground example to SafeAreaProvider/View and adjusted image ref description, updated TextInput examples/handlers and formatting, and rephrased Android keyboard event notes.
Guides & environment docs
cndocs/introduction.md, cndocs/javascript-environment.md, cndocs/more-resources.md
Added frontmatter description, adjusted intro banner/snack examples and callouts, simplified JS runtime wording and Babel/tooling references, and restructured resource recommendations and community links.
Misc docs polish
cndocs/imagebackground.md, cndocs/handling-text-input.md, cndocs/more-resources.md
Minor example and wording refinements, admonition/block replacements, updated imports and JSX formatting across examples.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 I nibbled through docs with tidy care,
Removed old leaves, made new callouts fair,
Examples hop clearer, warnings shine bright,
A little rabbit's edit — just right! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: synchronizing additional React Native Chinese documentation updates across multiple files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch auto-translate-20260410-batch-2

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 769e14c and 163bebd.

📒 Files selected for processing (9)
  • cndocs/datepickerandroid.md
  • cndocs/datepickerios.md
  • cndocs/debugging.md
  • cndocs/dynamiccolorios.md
  • cndocs/handling-text-input.md
  • cndocs/imagebackground.md
  • cndocs/introduction.md
  • cndocs/javascript-environment.md
  • cndocs/keyboard.md

Comment on lines +16 to +17
import {ImageBackground, StyleSheet, Text} from 'react-native';
import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 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 3

Repository: 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 -80

Repository: 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 3

Repository: 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 -20

Repository: 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 -50

Repository: 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.md

Repository: 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 -30

Repository: 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.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a6e31b5a-6eab-414b-a446-20fb50ea0264

📥 Commits

Reviewing files that changed from the base of the PR and between 163bebd and c54cc40.

📒 Files selected for processing (1)
  • cndocs/more-resources.md

世界各地有很多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))。
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 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-android
  • legacy/native-modules-ios
  • legacy/native-components-android
  • legacy/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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant