Skip to content

[codex] Document transitions React JSX setup#666

Merged
riderx merged 1 commit into
mainfrom
codex/transitions-react-jsx-docs
May 12, 2026
Merged

[codex] Document transitions React JSX setup#666
riderx merged 1 commit into
mainfrom
codex/transitions-react-jsx-docs

Conversation

@riderx
Copy link
Copy Markdown
Member

@riderx riderx commented May 10, 2026

What

  • Add React JSX TypeScript setup docs for @capgo/capacitor-transitions.
  • Document automatic typings from the React subpath and manual .d.ts fallback for Vite, webpack/CRA, Next.js, and custom TypeScript setups.

Why

  • React TSX users can otherwise see custom elements like cap-router-outlet as unknown JSX elements.

How

  • Added the setup guidance to docs, mirrored docs, and the web tutorial.

Testing

  • bun run check
  • bun run ci:verify:docs
  • bun run ci:verify:web

Not Tested

  • Remote CI is still pending on this new PR.

Summary by CodeRabbit

  • Documentation
    • Added React JSX TypeScript configuration guidance for Capacitor Transitions plugin, including setup instructions for declaration files and tsconfig.json examples for common project setups (Vite, Create React App, webpack, Next.js, and custom configurations).

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 10, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6cafcc30-e125-44b8-9e81-c5543af4b31c

📥 Commits

Reviewing files that changed from the base of the PR and between efaccb2 and 3fe7ceb.

📒 Files selected for processing (3)
  • apps/docs/src/content/docs/docs/plugins/transitions/getting-started.mdx
  • apps/web/src/content/plugins-tutorials/en/capacitor-transitions.md
  • src/content/docs/docs/plugins/transitions/getting-started.mdx

📝 Walkthrough

Walkthrough

This PR adds React JSX TypeScript guidance documentation across multiple docs and tutorial files. It explains how to import from @capgo/capacitor-transitions/react to provide JSX typings for custom elements (cap-router-outlet, cap-page, cap-header, cap-content, cap-footer) and provides declaration file workarounds and tsconfig.json examples for common TypeScript setups.

Changes

React JSX TypeScript Support

Layer / File(s) Summary
Getting-started Documentation
apps/docs/src/content/docs/docs/plugins/transitions/getting-started.mdx, src/content/docs/docs/plugins/transitions/getting-started.mdx
React JSX TypeScript subsections added explaining @capgo/capacitor-transitions/react import and custom element typings, with tsconfig.json include examples for Vite/CRA/webpack, Next.js, and custom types/ folder configurations.
Plugin Tutorials Extension
apps/web/src/content/plugins-tutorials/en/capacitor-transitions.md
TypeScript workaround guidance for React usage, instructing creation of src/capgo-transitions.d.ts declaration file with React subpath import and tsconfig.json integration for custom setups.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • Cap-go/website#664: Main PR extends the Transitions docs with a React JSX/TypeScript typing subsection that complements React examples, providing complementary guidance on type configuration.

Poem

🐰 TypeScript types now align,
Custom elements shine within,
Declarations dance in harmony,
JSX elements finally free,
React Transitions sing!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: documenting React JSX TypeScript setup for capacitor transitions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ 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 codex/transitions-react-jsx-docs

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

@sonarqubecloud
Copy link
Copy Markdown

@riderx riderx marked this pull request as ready for review May 10, 2026 18:38
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@riderx
Copy link
Copy Markdown
Member Author

riderx commented May 10, 2026

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 10, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@riderx riderx merged commit 477e192 into main May 12, 2026
10 checks passed
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