Skip to content

Conversation

@birkskyum
Copy link
Member

@birkskyum birkskyum commented Nov 11, 2025

Summary by CodeRabbit

  • New Features

    • Added a new "View Transitions" example project showcasing page transition animations with Solid Router, including slide-left, slide-right, and warp transition effects.
  • Documentation

    • Added example setup instructions and configuration guide for running the view transitions example locally.

@github-actions github-actions bot added the documentation Everything documentation related label Nov 11, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 11, 2025

Walkthrough

A new Solid Router example demonstrating view transitions has been added. This includes configuration documentation updates, a complete example project at examples/solid/view-transitions/ with routing setup, route definitions for posts and navigation, data fetching utilities, and CSS animations implementing view transition effects for page navigation.

Changes

Cohort / File(s) Summary
Documentation Update
docs/router/config.json
Added "View Transitions" entry to the Solid Router Examples list, linking to the new example.
Project Setup & Configuration
.gitignore, .vscode/settings.json, README.md, index.html, package.json, postcss.config.mjs, tsconfig.json, vite.config.js
Standard project scaffolding including dependency declarations (TanStack Router, Solid.js, Tailwind CSS, Vite), build tooling configuration, editor settings, and entry-point HTML.
Application Core
src/main.tsx
Entry file initializing the router with route tree, configuring preload and stale-time defaults, and rendering the RouterProvider into the app root. Includes module augmentation for type-safe router instance exposure.
Routing Structure
src/routeTree.gen.ts
Auto-generated route tree defining hierarchical route relationships, interfaces for file-based route mappings, and module augmentations for TanStack Router type integration.
Route Modules
src/routes/__root.tsx, src/routes/index.tsx, src/routes/explore.tsx, src/routes/how-it-works.tsx, src/routes/posts.route.tsx, src/routes/posts.index.tsx, src/routes/posts.$postId.tsx
Individual route definitions with components implementing navigation, post list display, and post detail views. Routes leverage view-transition directives for custom page transition animations.
Data Utilities
src/posts.tsx
Defines PostType interface and fetchPost/fetchPosts functions for retrieving post data from JSONPlaceholder with error handling and logging.
Styling
src/styles.css
Tailwind CSS integration with custom view-transition animation keyframes (slide-left, slide-right, warp) defining transitions for navigation between routes.

Sequence Diagram

sequenceDiagram
    participant User
    participant Router
    participant View as View Transition<br/>(CSS)
    participant Component
    participant Data as Data Loader

    User->>Router: Click link with viewTransition
    Router->>Data: Trigger loader (e.g., fetchPosts)
    Data-->>Router: Return data
    Router->>View: Activate transition type<br/>(slide-left/right/warp)
    View->>View: Old component animates out<br/>(::view-transition-old)
    View->>Component: New component renders
    View->>View: New component animates in<br/>(::view-transition-new)
    Component-->>User: Display updated view
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Key areas for review:
    • Route tree generation and hierarchy correctness (routeTree.gen.ts)
    • View transition animation CSS selectors and their alignment with route navigation (styles.css, route components using viewTransition prop)
    • Post detail loader and error handling for 404 cases (posts.tsx, posts.$postId.tsx)
    • Vite and TanStack Router plugin configuration with target: 'solid' and autoCodeSplitting (vite.config.js)

Possibly related PRs

Suggested labels

package: solid-router

Suggested reviewers

  • birkskyum
  • brenelz

Poem

🐰 Hops through the transitions so neat,
View transitions make routing so sweet,
Slides left and right with grace,
Warp effects setting the pace,
TanStack Router—hopping complete!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: porting a view-transition example to Solid Router. The changeset adds a complete new example directory with view transitions functionality, config documentation, and supporting files.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs(solid-router)--port-view-transition-example

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.

@birkskyum birkskyum force-pushed the docs(solid-router)--port-view-transition-example branch from fb1ddf4 to 4de1743 Compare November 11, 2025 02:03
@nx-cloud
Copy link

nx-cloud bot commented Nov 11, 2025

View your CI Pipeline Execution ↗ for commit 7bf1ffa

Command Status Duration Result
nx affected --targets=test:eslint,test:unit,tes... ✅ Succeeded 1m 53s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 2s View ↗

☁️ Nx Cloud last updated this comment at 2025-11-11 02:08:17 UTC

@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 11, 2025

More templates

@tanstack/arktype-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/arktype-adapter@5815

@tanstack/directive-functions-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/directive-functions-plugin@5815

@tanstack/eslint-plugin-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/eslint-plugin-router@5815

@tanstack/history

npm i https://pkg.pr.new/TanStack/router/@tanstack/history@5815

@tanstack/nitro-v2-vite-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/nitro-v2-vite-plugin@5815

@tanstack/react-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router@5815

@tanstack/react-router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-devtools@5815

@tanstack/react-router-ssr-query

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-ssr-query@5815

@tanstack/react-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start@5815

@tanstack/react-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-client@5815

@tanstack/react-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-server@5815

@tanstack/router-cli

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-cli@5815

@tanstack/router-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-core@5815

@tanstack/router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools@5815

@tanstack/router-devtools-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools-core@5815

@tanstack/router-generator

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-generator@5815

@tanstack/router-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-plugin@5815

@tanstack/router-ssr-query-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-ssr-query-core@5815

@tanstack/router-utils

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-utils@5815

@tanstack/router-vite-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-vite-plugin@5815

@tanstack/server-functions-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/server-functions-plugin@5815

@tanstack/solid-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router@5815

@tanstack/solid-router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router-devtools@5815

@tanstack/solid-router-ssr-query

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router-ssr-query@5815

@tanstack/solid-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start@5815

@tanstack/solid-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-client@5815

@tanstack/solid-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-server@5815

@tanstack/start-client-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-client-core@5815

@tanstack/start-plugin-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-plugin-core@5815

@tanstack/start-server-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-core@5815

@tanstack/start-static-server-functions

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-static-server-functions@5815

@tanstack/start-storage-context

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-storage-context@5815

@tanstack/valibot-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/valibot-adapter@5815

@tanstack/virtual-file-routes

npm i https://pkg.pr.new/TanStack/router/@tanstack/virtual-file-routes@5815

@tanstack/zod-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/zod-adapter@5815

commit: 7bf1ffa

Copy link
Contributor

@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: 2

🧹 Nitpick comments (2)
examples/solid/view-transitions/src/posts.tsx (2)

26-32: Consider adding meaningful delay for demo purposes.

Line 28 has the same zero-delay setTimeout as in fetchPost. If you're simulating network latency for demonstration purposes, consider using a non-zero delay value.

Apply this diff if you want to add a delay:

 export const fetchPosts = async () => {
   console.info('Fetching posts...')
-  await new Promise((r) => setTimeout(r, 0))
+  await new Promise((r) => setTimeout(r, 300))
   return axios
     .get<Array<PostType>>('https://jsonplaceholder.typicode.com/posts')
     .then((r) => r.data.slice(0, 10))
 }

10-24: Consider adding meaningful delay to the simulated network request.

The setTimeout(r, 0) on line 12 doesn't add any actual delay. If this is meant to simulate network latency for demo purposes, consider using a non-zero value like 300 or 500 milliseconds.

The error handling at line 17 is correct—redaxios exposes HTTP status codes as error.status on the error object (not error.response.status).

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d0e33fa and 7bf1ffa.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (20)
  • docs/router/config.json (1 hunks)
  • examples/solid/view-transitions/.gitignore (1 hunks)
  • examples/solid/view-transitions/.vscode/settings.json (1 hunks)
  • examples/solid/view-transitions/README.md (1 hunks)
  • examples/solid/view-transitions/index.html (1 hunks)
  • examples/solid/view-transitions/package.json (1 hunks)
  • examples/solid/view-transitions/postcss.config.mjs (1 hunks)
  • examples/solid/view-transitions/src/main.tsx (1 hunks)
  • examples/solid/view-transitions/src/posts.tsx (1 hunks)
  • examples/solid/view-transitions/src/routeTree.gen.ts (1 hunks)
  • examples/solid/view-transitions/src/routes/__root.tsx (1 hunks)
  • examples/solid/view-transitions/src/routes/explore.tsx (1 hunks)
  • examples/solid/view-transitions/src/routes/how-it-works.tsx (1 hunks)
  • examples/solid/view-transitions/src/routes/index.tsx (1 hunks)
  • examples/solid/view-transitions/src/routes/posts.$postId.tsx (1 hunks)
  • examples/solid/view-transitions/src/routes/posts.index.tsx (1 hunks)
  • examples/solid/view-transitions/src/routes/posts.route.tsx (1 hunks)
  • examples/solid/view-transitions/src/styles.css (1 hunks)
  • examples/solid/view-transitions/tsconfig.json (1 hunks)
  • examples/solid/view-transitions/vite.config.js (1 hunks)
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use TypeScript in strict mode with extensive type safety across the codebase

Files:

  • examples/solid/view-transitions/src/routes/__root.tsx
  • examples/solid/view-transitions/src/routes/index.tsx
  • examples/solid/view-transitions/src/main.tsx
  • examples/solid/view-transitions/src/routes/how-it-works.tsx
  • examples/solid/view-transitions/src/routes/posts.index.tsx
  • examples/solid/view-transitions/src/posts.tsx
  • examples/solid/view-transitions/src/routes/explore.tsx
  • examples/solid/view-transitions/src/routes/posts.route.tsx
  • examples/solid/view-transitions/src/routeTree.gen.ts
  • examples/solid/view-transitions/src/routes/posts.$postId.tsx
**/src/routes/**

📄 CodeRabbit inference engine (AGENTS.md)

Place file-based routes under src/routes/ directories

Files:

  • examples/solid/view-transitions/src/routes/__root.tsx
  • examples/solid/view-transitions/src/routes/index.tsx
  • examples/solid/view-transitions/src/routes/how-it-works.tsx
  • examples/solid/view-transitions/src/routes/posts.index.tsx
  • examples/solid/view-transitions/src/routes/explore.tsx
  • examples/solid/view-transitions/src/routes/posts.route.tsx
  • examples/solid/view-transitions/src/routes/posts.$postId.tsx
examples/{react,solid}/**

📄 CodeRabbit inference engine (AGENTS.md)

Keep example applications under examples/react/ and examples/solid/

Files:

  • examples/solid/view-transitions/src/routes/__root.tsx
  • examples/solid/view-transitions/src/routes/index.tsx
  • examples/solid/view-transitions/src/styles.css
  • examples/solid/view-transitions/src/main.tsx
  • examples/solid/view-transitions/vite.config.js
  • examples/solid/view-transitions/src/routes/how-it-works.tsx
  • examples/solid/view-transitions/src/routes/posts.index.tsx
  • examples/solid/view-transitions/src/posts.tsx
  • examples/solid/view-transitions/README.md
  • examples/solid/view-transitions/index.html
  • examples/solid/view-transitions/src/routes/explore.tsx
  • examples/solid/view-transitions/package.json
  • examples/solid/view-transitions/src/routes/posts.route.tsx
  • examples/solid/view-transitions/postcss.config.mjs
  • examples/solid/view-transitions/src/routeTree.gen.ts
  • examples/solid/view-transitions/tsconfig.json
  • examples/solid/view-transitions/src/routes/posts.$postId.tsx
docs/{router,start}/**

📄 CodeRabbit inference engine (AGENTS.md)

Place router docs under docs/router/ and start framework docs under docs/start/

Files:

  • docs/router/config.json
**/package.json

📄 CodeRabbit inference engine (AGENTS.md)

Use workspace:* protocol for internal dependencies in package.json files

Files:

  • examples/solid/view-transitions/package.json
🧠 Learnings (10)
📓 Common learnings
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/{react-router,solid-router}/** : Implement React and Solid bindings/components only in packages/react-router/ and packages/solid-router/
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/{react-router,solid-router}/** : Implement React and Solid bindings/components only in packages/react-router/ and packages/solid-router/

Applied to files:

  • examples/solid/view-transitions/src/routes/__root.tsx
  • examples/solid/view-transitions/src/routes/index.tsx
  • examples/solid/view-transitions/src/main.tsx
  • examples/solid/view-transitions/vite.config.js
  • examples/solid/view-transitions/src/routes/how-it-works.tsx
  • examples/solid/view-transitions/src/routes/posts.index.tsx
  • docs/router/config.json
  • examples/solid/view-transitions/src/routes/explore.tsx
  • examples/solid/view-transitions/package.json
  • examples/solid/view-transitions/src/routes/posts.route.tsx
  • examples/solid/view-transitions/src/routeTree.gen.ts
  • examples/solid/view-transitions/tsconfig.json
📚 Learning: 2025-10-08T08:11:47.088Z
Learnt from: nlynzaad
Repo: TanStack/router PR: 5402
File: packages/router-generator/tests/generator/no-formatted-route-tree/routeTree.nonnested.snapshot.ts:19-21
Timestamp: 2025-10-08T08:11:47.088Z
Learning: Test snapshot files in the router-generator tests directory (e.g., files matching the pattern `packages/router-generator/tests/generator/**/routeTree*.snapshot.ts` or `routeTree*.snapshot.js`) should not be modified or have issues flagged, as they are fixtures used to verify the generator's output and are intentionally preserved as-is.

Applied to files:

  • examples/solid/view-transitions/src/routes/__root.tsx
  • examples/solid/view-transitions/src/main.tsx
  • examples/solid/view-transitions/.vscode/settings.json
  • examples/solid/view-transitions/src/routes/how-it-works.tsx
  • examples/solid/view-transitions/src/routes/posts.index.tsx
  • examples/solid/view-transitions/src/routes/posts.route.tsx
  • examples/solid/view-transitions/src/routeTree.gen.ts
📚 Learning: 2025-10-01T18:31:35.420Z
Learnt from: schiller-manuel
Repo: TanStack/router PR: 5330
File: e2e/react-start/custom-basepath/src/routeTree.gen.ts:58-61
Timestamp: 2025-10-01T18:31:35.420Z
Learning: Do not review files named `routeTree.gen.ts` in TanStack Router repositories, as these are autogenerated files that should not be manually modified.

Applied to files:

  • examples/solid/view-transitions/src/routes/__root.tsx
  • examples/solid/view-transitions/src/main.tsx
  • examples/solid/view-transitions/.vscode/settings.json
  • examples/solid/view-transitions/src/routeTree.gen.ts
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/router-core/** : Keep framework-agnostic core router logic in packages/router-core/

Applied to files:

  • examples/solid/view-transitions/src/routes/__root.tsx
  • examples/solid/view-transitions/src/main.tsx
  • examples/solid/view-transitions/src/routeTree.gen.ts
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to **/src/routes/** : Place file-based routes under src/routes/ directories

Applied to files:

  • examples/solid/view-transitions/src/routes/index.tsx
  • examples/solid/view-transitions/src/routes/posts.index.tsx
  • examples/solid/view-transitions/src/routes/posts.route.tsx
  • examples/solid/view-transitions/src/routeTree.gen.ts
📚 Learning: 2025-11-02T16:16:24.898Z
Learnt from: nlynzaad
Repo: TanStack/router PR: 5732
File: packages/start-client-core/src/client/hydrateStart.ts:6-9
Timestamp: 2025-11-02T16:16:24.898Z
Learning: In packages/start-client-core/src/client/hydrateStart.ts, the `import/no-duplicates` ESLint disable is necessary for imports from `#tanstack-router-entry` and `#tanstack-start-entry` because both aliases resolve to the same placeholder file (`fake-start-entry.js`) in package.json during static analysis, even though they resolve to different files at runtime.

Applied to files:

  • examples/solid/view-transitions/src/main.tsx
  • examples/solid/view-transitions/package.json
  • examples/solid/view-transitions/src/routeTree.gen.ts
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/{router-cli,router-generator,router-plugin,virtual-file-routes}/** : Keep CLI, generators, bundler plugins, and virtual file routing utilities in their dedicated tooling package directories

Applied to files:

  • examples/solid/view-transitions/package.json
  • examples/solid/view-transitions/src/routeTree.gen.ts
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/{router-devtools,*-router-devtools}/** : Keep router devtools packages in packages/router-devtools/ and packages/*-router-devtools/

Applied to files:

  • examples/solid/view-transitions/package.json
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to **/*.{ts,tsx} : Use TypeScript in strict mode with extensive type safety across the codebase

Applied to files:

  • examples/solid/view-transitions/tsconfig.json
🧬 Code graph analysis (7)
examples/solid/view-transitions/src/routes/__root.tsx (5)
examples/solid/view-transitions/src/routes/index.tsx (1)
  • Route (3-5)
examples/solid/view-transitions/src/routes/posts.$postId.tsx (1)
  • Route (9-16)
examples/solid/view-transitions/src/routes/posts.index.tsx (1)
  • Route (3-5)
examples/solid/view-transitions/src/routes/posts.route.tsx (1)
  • Route (4-7)
examples/solid/quickstart-file-based/src/routes/__root.tsx (1)
  • RootComponent (13-41)
examples/solid/view-transitions/src/routes/index.tsx (2)
examples/solid/view-transitions/src/routes/__root.tsx (1)
  • Route (9-19)
examples/solid/view-transitions/src/routes/how-it-works.tsx (1)
  • Route (3-5)
examples/solid/view-transitions/src/routes/how-it-works.tsx (2)
examples/solid/view-transitions/src/routes/explore.tsx (1)
  • Route (3-5)
examples/solid/view-transitions/src/routes/index.tsx (1)
  • Route (3-5)
examples/solid/view-transitions/src/routes/posts.index.tsx (2)
examples/solid/view-transitions/src/routes/posts.$postId.tsx (1)
  • Route (9-16)
examples/solid/view-transitions/src/routes/posts.route.tsx (1)
  • Route (4-7)
examples/solid/view-transitions/src/routes/explore.tsx (3)
examples/solid/view-transitions/src/routes/__root.tsx (1)
  • Route (9-19)
examples/solid/view-transitions/src/routes/how-it-works.tsx (1)
  • Route (3-5)
examples/solid/view-transitions/src/routes/index.tsx (1)
  • Route (3-5)
examples/solid/view-transitions/src/routes/posts.route.tsx (2)
examples/solid/view-transitions/src/routes/posts.$postId.tsx (1)
  • Route (9-16)
examples/solid/view-transitions/src/posts.tsx (1)
  • fetchPosts (26-32)
examples/solid/view-transitions/src/routes/posts.$postId.tsx (3)
examples/solid/view-transitions/src/routes/posts.index.tsx (1)
  • Route (3-5)
examples/solid/view-transitions/src/routes/posts.route.tsx (1)
  • Route (4-7)
examples/solid/view-transitions/src/posts.tsx (1)
  • fetchPost (10-24)
🪛 Biome (2.1.2)
examples/solid/view-transitions/src/styles.css

[error] 24-24: expected , but instead found (

Remove (

(parse)


[error] 24-24: expected , but instead found slide-left

Remove slide-left

(parse)


[error] 24-24: expected , but instead found )

Remove )

(parse)


[error] 52-52: expected , but instead found (

Remove (

(parse)


[error] 52-52: expected , but instead found slide-right

Remove slide-right

(parse)


[error] 52-52: expected , but instead found )

Remove )

(parse)


[error] 80-80: expected , but instead found (

Remove (

(parse)


[error] 80-80: expected , but instead found warp

Remove warp

(parse)


[error] 80-80: expected , but instead found )

Remove )

(parse)


[error] 24-24: Unexpected unknown pseudo-class active-view-transition-type

See MDN web docs for more details.

(lint/correctness/noUnknownPseudoClass)


[error] 52-52: Unexpected unknown pseudo-class active-view-transition-type

See MDN web docs for more details.

(lint/correctness/noUnknownPseudoClass)


[error] 80-80: Unexpected unknown pseudo-class active-view-transition-type

See MDN web docs for more details.

(lint/correctness/noUnknownPseudoClass)


[error] 80-80: Unknown type selector is not allowed.

See MDN web docs for more details.
Consider replacing the unknown type selector with valid one.

(lint/correctness/noUnknownTypeSelector)


[error] 81-81: Unknown type selector is not allowed.

See MDN web docs for more details.
Consider replacing the unknown type selector with valid one.

(lint/correctness/noUnknownTypeSelector)


[error] 85-85: Unknown type selector is not allowed.

See MDN web docs for more details.
Consider replacing the unknown type selector with valid one.

(lint/correctness/noUnknownTypeSelector)

🪛 LanguageTool
examples/solid/view-transitions/README.md

[duplication] ~5-~5: Possible typo: you repeated a word.
Context: ... To run this example: - npm install or yarn - npm start or yarn start

(ENGLISH_WORD_REPEAT_RULE)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Test
🔇 Additional comments (22)
docs/router/config.json (1)

632-636: LGTM! Documentation entry follows the established pattern.

The new "View Transitions" example is properly placed in the Solid Router examples section and follows the same structure as other example entries.

examples/solid/view-transitions/.vscode/settings.json (1)

1-11: LGTM! Proper handling of generated files.

The VSCode settings correctly exclude the autogenerated routeTree.gen.ts from file watchers, search indexing, and mark it as read-only, preventing accidental modifications.

examples/solid/view-transitions/README.md (1)

1-6: LGTM! Clear and concise setup instructions.

The README provides the essential commands needed to run the example. The static analysis hint about word repetition is a false positive—these are distinct commands.

examples/solid/view-transitions/.gitignore (1)

1-10: LGTM! Standard gitignore patterns.

The ignore patterns appropriately cover Node.js dependencies, build outputs, test results, and common development artifacts.

examples/solid/view-transitions/tsconfig.json (1)

1-10: LGTM! Appropriate TypeScript configuration for Solid.js.

The compiler options are correctly configured with strict mode, Solid.js JSX handling, and modern ES2022 library support.

examples/solid/view-transitions/package.json (1)

5-9: LGTM! Well-structured npm scripts.

The scripts provide clear commands for development (dev, start), production build (build with type checking), and preview (serve).

examples/solid/view-transitions/postcss.config.mjs (1)

1-5: LGTM! Standard PostCSS configuration.

The configuration correctly loads the Tailwind CSS PostCSS plugin as expected for this setup.

examples/solid/view-transitions/src/styles.css (2)

1-21: LGTM! Proper Tailwind integration and base styles.

The base layer sets up appropriate border colors and dark mode support using Tailwind utilities.


23-114: LGTM! Well-implemented view transition animations.

The CSS correctly uses the View Transitions API Level 2 features including:

  • :active-view-transition-type() pseudo-class
  • ::view-transition-old() and ::view-transition-new() pseudo-elements

The three transition types (slide-left, slide-right, warp) are properly defined with smooth animations and consistent timing. The static analysis errors from Biome are false positives—these are valid modern CSS features supported in Chrome 111+, Edge 111+, and Safari 18+.

examples/solid/view-transitions/vite.config.js (1)

1-14: LGTM! Clean Vite configuration.

The configuration correctly sets up both the TanStack Router plugin and Solid plugin. The autoCodeSplitting: true option is a good choice for demonstrating code splitting in the example.

examples/solid/view-transitions/index.html (1)

1-12: LGTM! Standard HTML bootstrap.

The HTML structure is correct. The title could be more descriptive (e.g., "View Transitions Example"), but the generic "Vite App" is acceptable for an example project.

examples/solid/view-transitions/src/routes/index.tsx (1)

3-23: LGTM! Well-structured home route.

The route definition and view transition implementation are correct. The viewTransition={{ types: ['slide-left'] }} properly demonstrates custom transition types, and the [view-transition-name:main-content] CSS class correctly identifies the transitioning element.

examples/solid/view-transitions/src/routes/how-it-works.tsx (1)

3-31: LGTM! Demonstrates bidirectional transitions effectively.

The route correctly demonstrates both slide-left and slide-right transitions for forward and backward navigation. The comments helpfully reference styles.css for the actual transition definitions.

examples/solid/view-transitions/src/routes/posts.index.tsx (1)

3-9: LGTM! Clean index route implementation.

The posts index route is correctly defined with appropriate placeholder content.

examples/solid/view-transitions/src/main.tsx (3)

7-40: LGTM! Comprehensive router configuration.

The router setup is excellent with sensible defaults (defaultPreload: 'intent', scrollRestoration: true). The commented defaultViewTransition examples are educational and show advanced usage patterns with dynamic transition types based on navigation direction.


43-47: LGTM! Proper type augmentation.

The module augmentation correctly registers the router instance for type safety throughout the application.


49-53: LGTM! Safe rendering approach.

The check for !rootElement.innerHTML prevents double-rendering, which is a good practice especially during development with hot module replacement.

examples/solid/view-transitions/src/routes/explore.tsx (1)

3-30: LGTM! Educational content with helpful disclaimer.

The route provides clear explanations about view transitions and includes a helpful browser compatibility disclaimer. The implementation correctly demonstrates the slide-right transition.

examples/solid/view-transitions/src/routes/__root.tsx (2)

9-19: LGTM! Well-structured root route.

The root route is properly configured with both the main component and a helpful notFoundComponent fallback.


21-52: LGTM! Complete root layout with navigation and devtools.

The root component correctly implements:

  • HeadContent for document metadata
  • Navigation with active state styling
  • View transitions on navigation links (boolean prop for default transitions)
  • Outlet for child routes
  • TanStack Router Devtools for development

The exact: true option on the Home link ensures proper active state handling for the root path.

examples/solid/view-transitions/src/routes/posts.route.tsx (1)

1-42: LGTM! Well-structured route with view transitions.

The route implementation correctly demonstrates Solid Router patterns with view transitions. The intentional addition of the non-existent post (line 15) effectively showcases the error handling capabilities, and the view transition configuration is properly set up with both CSS properties and the viewTransition prop.

examples/solid/view-transitions/src/routes/posts.$postId.tsx (1)

1-27: LGTM! Comprehensive error handling and clean implementation.

The route correctly implements error boundaries with both errorComponent and notFoundComponent, and the component logic properly consumes the loader data. The implementation follows Solid Router best practices.

Comment on lines +13 to +15
"@tanstack/solid-router": "^1.135.0",
"@tanstack/solid-router-devtools": "^1.135.0",
"@tanstack/router-plugin": "^1.135.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Use workspace:* protocol for internal dependencies.

The TanStack packages should use the workspace:* protocol instead of explicit versions to ensure the example uses local workspace versions during monorepo development.

As per coding guidelines.

Apply this diff:

   "dependencies": {
     "@tailwindcss/postcss": "^4.1.15",
-    "@tanstack/solid-router": "^1.135.0",
-    "@tanstack/solid-router-devtools": "^1.135.0",
-    "@tanstack/router-plugin": "^1.135.0",
+    "@tanstack/solid-router": "workspace:*",
+    "@tanstack/solid-router-devtools": "workspace:*",
+    "@tanstack/router-plugin": "workspace:*",
     "postcss": "^8.5.1",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"@tanstack/solid-router": "^1.135.0",
"@tanstack/solid-router-devtools": "^1.135.0",
"@tanstack/router-plugin": "^1.135.0",
"@tailwindcss/postcss": "^4.1.15",
"@tanstack/solid-router": "workspace:*",
"@tanstack/solid-router-devtools": "workspace:*",
"@tanstack/router-plugin": "workspace:*",
"postcss": "^8.5.1",
🤖 Prompt for AI Agents
In examples/solid/view-transitions/package.json around lines 13 to 15, the
TanStack packages are pinned to explicit versions; update the three entries
("@tanstack/solid-router", "@tanstack/solid-router-devtools",
"@tanstack/router-plugin") to use the workspace:* protocol instead of version
strings so the example resolves local workspace packages during monorepo
development.

Comment on lines +4 to +8
export type PostType = {
id: string
title: string
body: string
}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Fix type mismatch for id field.

The JSONPlaceholder API returns id as a number, but PostType declares it as a string. This creates a type mismatch that undermines type safety.

Apply this diff to correct the type:

 export type PostType = {
-  id: string
+  id: number
   title: string
   body: string
 }

Note: You'll also need to update the route parameter handling in posts.route.tsx (line 22) to convert the string param to a number, or adjust fetchPost to accept a string and convert it internally.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
export type PostType = {
id: string
title: string
body: string
}
export type PostType = {
id: number
title: string
body: string
}
🤖 Prompt for AI Agents
In examples/solid/view-transitions/src/posts.tsx around lines 4 to 8, the
PostType currently declares id as a string but the JSONPlaceholder API returns
id as a number; update PostType so id is a number (id: number). Also update the
route parameter handling in posts.route.tsx (around line 22) to convert the
route param from string to number before using it, or alternatively adjust
fetchPost to accept a string id and convert it to a number internally so types
stay consistent.

@birkskyum birkskyum merged commit 864a2e0 into main Nov 11, 2025
6 checks passed
@birkskyum birkskyum deleted the docs(solid-router)--port-view-transition-example branch November 11, 2025 02:13
roduyemi pushed a commit to roduyemi/oss-router that referenced this pull request Nov 19, 2025
* docs(solid-router): port view-transition example

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Everything documentation related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants