Skip to content

Conversation

@Mohamed-Hashem
Copy link

@Mohamed-Hashem Mohamed-Hashem commented Nov 5, 2025

Upgrade Arabic Repo to Align with React 19

📋 Summary

This PR merges the latest updates from the upstream react.dev repository (React 19.0.0) while preserving all existing Arabic translations and fixing all documentation issues.

Demo Live: https://ar-react-dev.vercel.app


⚠️ IMPORTANT: DO NOT SQUASH MERGE THIS PULL REQUEST!

Doing so will "erase" the commits from main and cause them to appear as conflicts the next time we merge.

This PR contains merge commits from the upstream repository. Squashing these commits will break the git history and cause conflicts in future syncs with the upstream react.dev repository and the @react-translations-bot.

✅ Required merge method: Use "Create a merge commit" or "Rebase and merge"


✨ Changes

✅ Completed

  • Successfully rebased onto latest upstream (all merge conflicts resolved)
  • ✅ Merged upstream React 19.0.0 updates (318 files changed)
  • ✅ Preserved all existing Arabic translations (119+ files)
  • Translated navigation components to Arabic (TopNav, Sidebar, Footer, BrandMenu, Feedback)
  • Fixed all Copilot AI review issues (5 documentation corrections)
  • Resolved all merge conflicts while maintaining commit history
  • ✅ Fixed compilation and TypeScript issues:
    • Fixed mime-db missing db.json issue in postinstall script
    • Fixed JSX runtime compatibility for React 19
    • Fixed TypeScript errors in Icon components (JSX namespace)
    • Added missing dependencies (@types/prop-types, React Compiler dependencies)
    • Resolved ESLint plugin conflict (react-hooks)
    • Fixed Sandpack preview ESLint integration
  • ✅ Updated documentation structure for React 19 features
  • All CI checks passing (prettier, lint, tsc, link validation, heading IDs)
  • All dead links fixed (1774 links validated)

📊 Statistics

  • 318 files changed: +37,224 insertions, -7,130 deletions
  • Arabic translations: Fully preserved and functional
  • New content: React Compiler docs, new blog posts, updated APIs
  • UI localization: Navigation, headers, and sidebar fully translated to Arabic
  • Documentation fixes: 5 typos and inconsistencies corrected
  • Merge conflicts resolved: All conflicts in rebase handled successfully

🔄 New Content Added

React 19 Features

  • React Compiler documentation (installation, configuration, debugging)
  • New React APIs: Activity, ViewTransition, useEffectEvent, cacheSignal, etc.
  • React DOM static prerendering APIs
  • Enhanced server rendering functions

Documentation Updates

  • ESLint plugin documentation (17 pages)
  • React Compiler configuration guides (10 pages)
  • Updated blog posts (6 new posts)
  • Performance tracking tools documentation

🌐 UI Localization Completed

  • ✅ TopNav component (Search, Learn, Reference, Community, Blog)
  • ✅ Sidebar navigation (all sections)
  • ✅ Footer links and labels
  • ✅ BrandMenu component
  • ✅ Feedback widget
  • ✅ Page headings and status tags
  • ✅ Version badges and tooltips

🐛 Documentation Fixes Applied

Based on Copilot AI review feedback:

  1. addTransitionType.md - Fixed incorrect function name in return documentation
  2. ViewTransition.md - Fixed backtick spacing in nested ViewTransition reference
  3. resumeAndPrerenderToNodeStream.md - Removed duplicate article "a a"
  4. resumeAndPrerenderToNodeStream.md - Fixed anchor ID typo (added missing 'o')
  5. resumeAndPrerenderToNodeStream.md - Fixed grammar: "rendering the is" → "rendering is"

Additional Fixes After Rebase

  • startTransition.md - Updated dead link anchor reference
  • react-compiler-beta-release.md - Updated documentation links to new structure
  • form.md - Fixed comment typo
  • use-server.md - Resolved duplicate translation sections
  • hydrateRoot.md - Integrated new error logging documentation

⚠️ Translation Needed

56 new English files require Arabic translation:

Category Count Examples
Blog Posts 6 React 19.2, React Compiler 1.0, React Foundation
Learn Section 8 React Compiler guides, setup documentation
ESLint Plugin 17 Linting rules documentation
React Compiler Config 10 Configuration options
React DOM APIs 8 Server/static rendering functions
React APIs 7 New hooks and components

📄 Complete list: See files-needing-translation.txt


🔧 Technical Details

Dependencies Updated

  • React 19.0.0
  • Next.js 15.1.0
  • TypeScript 5.7.2
  • babel-plugin-react-compiler 1.0.0
  • @codesandbox/sandpack-react 2.20.0

Breaking Changes Handled

  • Removed deprecated APIs: findDOMNode, render, hydrate, createFactory, unmountComponentAtNode
  • Updated JSX runtime for React 19 compatibility
  • Fixed Icon component TypeScript types for React 19
  • Resolved ESLint plugin conflicts with eslint-config-next

ESLint & Sandpack Fixes

  • Removed duplicate react-hooks plugin from .eslintrc (provided by eslint-config-next)
  • Added robust error handling in Sandpack ESLint runner
  • Fixed in-browser linting to gracefully handle missing plugin rules

Rebase Strategy

  • ✅ Used proper git rebase (not squash) to preserve commit references
  • ✅ All merge conflicts resolved manually
  • ✅ Commit history maintained for @react-translations-bot compatibility
  • ✅ All files formatted with Prettier after rebase

✅ Testing & Validation

All CI Checks Passing ✅

✅ yarn install works correctly
✅ yarn dev starts development server
✅ yarn ci-check passes (exit code: 0)
  ├─ ✅ Prettier formatting
  ├─ ✅ ESLint (only pre-existing img warnings)
  ├─ ✅ TypeScript compilation
  ├─ ✅ Heading ID validation
  ├─ ✅ RSS generation
  └─ ✅ Dead link checker (1774 links validated)
✅ Arabic content displays correctly
✅ Sandpack preview boxes function properly
✅ Navigation fully localized to Arabic
✅ All merge conflicts resolved

Copilot AI review requested due to automatic review settings November 5, 2025 21:06
@vercel
Copy link

vercel bot commented Nov 5, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
legacy-ar-reactjs-org Ignored Ignored Preview Nov 9, 2025 0:51am

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR upgrades the Arabic React documentation repository to align with React 19.2, merging upstream changes while preserving all existing Arabic translations. The update includes React 19 features, React Compiler documentation, and fixes for compilation and TypeScript issues.

Key changes:

  • Merged React 19.0.0 upstream updates (294 files)
  • Updated React version from 18.3.1 to 19.2
  • Added copyright headers from Meta Platforms, Inc.

Reviewed Changes

Copilot reviewed 233 out of 294 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/siteConfig.js Updated React version to 19.2
src/sidebarLearn.json Updated sidebar titles (reverted Arabic to English)
src/sidebarReference.json Added React 19 APIs and removed deprecated ones
src/utils/compileMDX.ts Updated for React 19 JSX runtime compatibility
src/styles/index.css Changed font URLs from CDN to local paths
Multiple utility files Added Meta Platforms copyright headers


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 219 out of 318 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@AhmedBaset
Copy link
Collaborator

Thanks @Mohamed-Hashem for opening this — the work you’ve put into this is very much appreciated.
However, upstreaming this way will prevent @react-translations-bot from syncing the repository later, since this approach loses the original commit references.

https://github.com/reactjs/translations.react.dev/blob/c9f70c8528cdbf5213e0bfc95ba8a3c7a3656a3b/scripts/sync-translations.js#L332-L333

DO NOT SQUASH MERGE THIS PULL REQUEST!

Doing so will “erase” the commits from main and cause them to appear as conflicts the next time we merge.

The correct way to sync is by using rebase or cherry-pick, not squash merging.

I’ve just updated the repo to be up to date with reactjs/react.dev, which introduced several merge conflicts in your PR. Could you please resolve the conflicts so I can review and merge it?

Thank you for your contribution! 🙏

- Merged 294 files with React 19.0.0 updates from upstream

- Added React Compiler documentation

- Added new React 19 APIs (Activity, ViewTransition, useEffectEvent)

- Updated server rendering APIs

- Removed deprecated APIs (findDOMNode, render, hydrate, etc.)

- 56 new files need Arabic translation (see files-needing-translation.txt)
- Fixed JSX namespace errors in Icon components (React 19 compatibility)

- Added @types/prop-types dependency

- Added React Compiler dependencies to eslint-local-rules

- Fixed all Icon components to use React.JSX.IntrinsicElements

- Added proper TypeScript types to all Icon component props
… the exact same versions of all dependencies, including nested dependencies
- Changed all font URLs from https://react.dev/fonts/ to /fonts/

- Ensures site works independently without external dependencies

- Improves loading performance and reliability

- Addresses Copilot code review feedback
- Resolves React 19 peer dependency conflict with @codesandbox/sandpack-react

- Allows npm to install with --legacy-peer-deps automatically
- Upgraded from 2.13.5 to 2.20.0 which natively supports React 19

- Removed .npmrc workaround - no longer needed

- This is a proper solution instead of using legacy-peer-deps
- @headlessui/react: ^1.7.0  ^2.2.9 (React 19 support)

- react-collapsed: 4.0.4  ^4.2.0 (React 19 support)

- Fixes all peer dependency conflicts for Vercel build
Translated sidebar files while preserving technical terms:

sidebarLearn.json:
- Main sections: 'تعلم React', 'البدأ', 'بداية سريعة'
- Installation: 'التثبيت', 'إنشاء تطبيق React', 'بناء تطبيق React من الصفر'
- Setup: 'الإعداد', 'تجهيز المحرر', 'أدوات مطوري React'
- Learning sections: 'وصف واجهة المستخدم', 'إضافة التفاعلية', 'إدارة الحالة', 'مخارج الطوارئ'
- React Compiler subsections: 'مقدمة', 'التثبيت', 'التبني التدريجي', 'تصحيح الأخطاء واستكشاف المشاكل'

sidebarHome.json:
- 'توثيق React', 'بداية سريعة', 'التثبيت', 'الإعداد'
- Sections: 'تعلم React', 'شارك معنا', 'ابق على اطلاع'
- 'المكونات', 'الإعدادات', 'تصريف المكتبات', 'مجتمع React', 'مدونة React'

sidebarCommunity.json:
- 'المجتمع', 'شارك معنا'
- 'مؤتمرات React', 'لقاءات React', 'فيديوهات React'
- 'تعرف على الفريق', 'المساهمون في التوثيق', 'الترجمات'
- 'شكر وتقدير', 'سياسة الإصدارات'

sidebarBlog.json:
- 'المدونة', 'ابق على اطلاع'

sidebarReference.json:
- 'مرجع API', 'نظرة عامة', 'المكونات'
- 'الإعدادات', 'تصريف المكتبات'
- Rules section: 'قواعد React', 'Components و Hooks يجب أن تكون نقية'

Technical terms preserved: React, Hooks, APIs, TypeScript, Compiler, DevTools, Server Components, Server Functions, Directives, Legacy APIs, Client APIs, Server APIs, Static APIs
Mohamed-Hashem and others added 18 commits November 9, 2025 14:27
…larity, and enhance documentation links for hooks and server actions.
…r handling in forms, and enhance static path generation logic
…n TypeScript usage, invalid ARIA prop warnings, deprecation warnings for react-dom/test-utils and react-test-renderer, and special props warnings.
Add Space

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…eStream.md


Remove extra word 'the'. Should be 'If rendering is successful'.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…eStream.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…eStream.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Mohamed-Hashem
Copy link
Author

Thank you, @AhmedBaset

I have completed the updates as requested. The PR has been rebased successfully, all merge conflicts have been resolved, and all CI checks are passing.

Please review at your convenience. I'm happy to make any additional changes if needed.

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.

2 participants