Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion e2e/solid-router/basic-esbuild-file-based/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>

<script src="https://unpkg.com/@tailwindcss/browser@4"></script>
<style type="text/tailwindcss">
html {
Expand Down
2 changes: 1 addition & 1 deletion e2e/solid-router/basic-esbuild-file-based/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@tanstack/solid-router": "workspace:^",
"@tanstack/zod-adapter": "workspace:^",
"redaxios": "^0.5.1",
"solid-js": "^1.9.4",
"solid-js": "^1.9.5",
"zod": "^3.24.1"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import { Link, Outlet, createRootRoute } from '@tanstack/solid-router'
import {
HeadContent,
Link,
Outlet,
createRootRoute,
} from '@tanstack/solid-router'
// import { TanStackRouterDevtools } from '@tanstack/router-devtools'

export const Route = createRootRoute({
Expand All @@ -16,6 +21,7 @@ export const Route = createRootRoute({
function RootComponent() {
return (
<>
<HeadContent />
<div class="p-2 flex gap-2 text-lg border-b">
<Link
to="/"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
</head>
<body>
<div id="app"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@tanstack/solid-router": "workspace:^",
"autoprefixer": "^10.4.20",
"postcss": "^8.5.1",
"solid-js": "^1.9.4",
"solid-js": "^1.9.5",
"tailwindcss": "^3.4.17",
"zod": "^3.24.1"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import { Link, Outlet, createRootRoute } from '@tanstack/solid-router'
import {
HeadContent,
Link,
Outlet,
createRootRoute,
} from '@tanstack/solid-router'
// import { TanStackRouterDevtools } from '@tanstack/router-devtools'

export const Route = createRootRoute({
Expand All @@ -16,6 +21,7 @@ export const Route = createRootRoute({
function RootComponent() {
return (
<>
<HeadContent />
<div class="p-2 flex gap-2 text-lg border-b">
<Link
to="/"
Expand Down
1 change: 0 additions & 1 deletion e2e/solid-router/basic-file-based/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
</head>
<body>
<div id="app"></div>
Expand Down
2 changes: 1 addition & 1 deletion e2e/solid-router/basic-file-based/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@tanstack/zod-adapter": "workspace:^",
"redaxios": "^0.5.1",
"postcss": "^8.5.1",
"solid-js": "^1.9.4",
"solid-js": "^1.9.5",
"autoprefixer": "^10.4.20",
"tailwindcss": "^3.4.17",
"zod": "^3.24.1"
Expand Down
2 changes: 2 additions & 0 deletions e2e/solid-router/basic-file-based/src/routes/__root.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {
HeadContent,
Link,
Outlet,
createRootRoute,
Expand All @@ -25,6 +26,7 @@ function RootComponent() {

return (
<>
<HeadContent />
<div class="flex gap-2 p-2 text-lg border-b">
<button
data-testid="back-button"
Expand Down
7 changes: 7 additions & 0 deletions e2e/solid-router/basic-file-based/src/routes/posts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ import { Link, Outlet, createFileRoute } from '@tanstack/solid-router'
import { fetchPosts } from '../posts'

export const Route = createFileRoute('/posts')({
head: () => ({
meta: [
{
title: 'Posts page',
},
],
}),
loader: fetchPosts,
component: PostsComponent,
})
Expand Down
8 changes: 8 additions & 0 deletions e2e/solid-router/basic-file-based/tests/app.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,3 +253,11 @@ async function structuralSharingTest(page: Page, enabled: boolean) {
await page.getByTestId('link').click()
await checkSearch({ bar: 'b2', foo: 'f2' })
}

test('Should change title on client side navigation', async ({ page }) => {
await page.goto('/')

await page.getByRole('link', { name: 'Posts' }).click()

await expect(page).toHaveTitle('Posts page')
})
1 change: 0 additions & 1 deletion e2e/solid-router/basic-scroll-restoration/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
</head>
<body>
<div id="app"></div>
Expand Down
2 changes: 1 addition & 1 deletion e2e/solid-router/basic-scroll-restoration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dependencies": {
"@tanstack/solid-router": "workspace:^",
"@tanstack/solid-virtual": "^3.13.0",
"solid-js": "^1.9.4",
"solid-js": "^1.9.5",
"redaxios": "^0.5.1",
"postcss": "^8.5.1",
"autoprefixer": "^10.4.20",
Expand Down
2 changes: 2 additions & 0 deletions e2e/solid-router/basic-scroll-restoration/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { render } from 'solid-js/web'
import {
HeadContent,
Link,
Outlet,
RouterProvider,
Expand All @@ -20,6 +21,7 @@ const rootRoute = createRootRoute({
function RootComponent() {
return (
<>
<HeadContent />
<div class="p-2 flex gap-2 sticky top-0 border-b bg-gray-100 dark:bg-gray-900">
<Link to="/" class="[&.active]:font-bold">
Home
Expand Down
1 change: 0 additions & 1 deletion e2e/solid-router/basic-solid-query-file-based/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
</head>
<body>
<div id="app"></div>
Expand Down
2 changes: 1 addition & 1 deletion e2e/solid-router/basic-solid-query-file-based/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@tanstack/solid-query-devtools": "^5.66.0",
"@tanstack/solid-router": "workspace:^",
"@tanstack/router-plugin": "workspace:^",
"solid-js": "^1.9.4",
"solid-js": "^1.9.5",
"redaxios": "^0.5.1",
"postcss": "^8.5.1",
"autoprefixer": "^10.4.20",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {
HeadContent,
Link,
Outlet,
createRootRouteWithContext,
Expand All @@ -24,6 +25,7 @@ export const Route = createRootRouteWithContext<{
function RootComponent() {
return (
<>
<HeadContent />
<div class="p-2 flex gap-2 text-lg">
<Link
to="/"
Expand Down
1 change: 0 additions & 1 deletion e2e/solid-router/basic-solid-query/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
</head>
<body>
<div id="app"></div>
Expand Down
2 changes: 1 addition & 1 deletion e2e/solid-router/basic-solid-query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@tanstack/solid-query": "^5.66.0",
"@tanstack/solid-query-devtools": "^5.66.0",
"@tanstack/solid-router": "workspace:^",
"solid-js": "^1.9.4",
"solid-js": "^1.9.5",
"redaxios": "^0.5.1",
"postcss": "^8.5.1",
"autoprefixer": "^10.4.20",
Expand Down
2 changes: 2 additions & 0 deletions e2e/solid-router/basic-solid-query/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { render } from 'solid-js/web'
import {
ErrorComponent,
HeadContent,
Link,
Outlet,
RouterProvider,
Expand Down Expand Up @@ -38,6 +39,7 @@ const rootRoute = createRootRouteWithContext<{
function RootComponent() {
return (
<>
<HeadContent />
<div class="p-2 flex gap-2 text-lg">
<Link
to="/"
Expand Down
1 change: 0 additions & 1 deletion e2e/solid-router/basic-virtual-file-based/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
</head>
<body>
<div id="app"></div>
Expand Down
2 changes: 1 addition & 1 deletion e2e/solid-router/basic-virtual-file-based/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@tanstack/solid-router": "workspace:^",
"@tanstack/router-plugin": "workspace:^",
"@tanstack/virtual-file-routes": "workspace:^",
"solid-js": "^1.9.4",
"solid-js": "^1.9.5",
"redaxios": "^0.5.1",
"postcss": "^8.5.1",
"autoprefixer": "^10.4.20",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import { Link, Outlet, createRootRoute } from '@tanstack/solid-router'
import {
HeadContent,
Link,
Outlet,
createRootRoute,
} from '@tanstack/solid-router'
// import { TanStackRouterDevtools } from '@tanstack/router-devtools'

export const Route = createRootRoute({
Expand All @@ -16,6 +21,7 @@ export const Route = createRootRoute({
function RootComponent() {
return (
<>
<HeadContent />
<div class="p-2 flex gap-2 text-lg border-b">
<Link
to="/"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
</head>
<body>
<div id="app"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@tanstack/solid-router": "workspace:^",
"@tanstack/router-plugin": "workspace:^",
"@tanstack/virtual-file-routes": "workspace:^",
"solid-js": "^1.9.4",
"solid-js": "^1.9.5",
"redaxios": "^0.5.1",
"postcss": "^8.5.1",
"autoprefixer": "^10.4.20",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import { Link, Outlet, createRootRoute } from '@tanstack/solid-router'
import {
HeadContent,
Link,
Outlet,
createRootRoute,
} from '@tanstack/solid-router'
// import { TanStackRouterDevtools } from '@tanstack/router-devtools'

export const Route = createRootRoute({
Expand All @@ -16,6 +21,7 @@ export const Route = createRootRoute({
function RootComponent() {
return (
<>
<HeadContent />
<div class="p-2 flex gap-2 text-lg border-b">
<Link
to="/"
Expand Down
1 change: 0 additions & 1 deletion e2e/solid-router/basic/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
</head>
<body>
<div id="app"></div>
Expand Down
2 changes: 1 addition & 1 deletion e2e/solid-router/basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"dependencies": {
"@tanstack/solid-router": "workspace:^",
"solid-js": "^1.9.4",
"solid-js": "^1.9.5",
"redaxios": "^0.5.1",
"postcss": "^8.5.1",
"autoprefixer": "^10.4.20",
Expand Down
2 changes: 2 additions & 0 deletions e2e/solid-router/basic/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { render } from 'solid-js/web'
import {
ErrorComponent,
HeadContent,
Link,
Outlet,
RouterProvider,
Expand Down Expand Up @@ -28,6 +29,7 @@ const rootRoute = createRootRoute({
function RootComponent() {
return (
<>
<HeadContent />
<div class="p-2 flex gap-2 text-lg border-b">
<Link
to="/"
Expand Down
2 changes: 1 addition & 1 deletion e2e/solid-router/rspack-basic-file-based/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"dependencies": {
"@tanstack/solid-router": "workspace:^",
"solid-js": "^1.9.4",
"solid-js": "^1.9.5",
"redaxios": "^0.5.1"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import { Link, Outlet, createRootRoute } from '@tanstack/solid-router'
import {
HeadContent,
Link,
Outlet,
createRootRoute,
} from '@tanstack/solid-router'
// import { TanStackRouterDevtools } from '@tanstack/router-devtools'

export const Route = createRootRoute({
Expand All @@ -16,6 +21,7 @@ export const Route = createRootRoute({
function RootComponent() {
return (
<>
<HeadContent />
<div class="p-2 flex gap-2 text-lg border-b">
<Link
to="/"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"dependencies": {
"@tanstack/solid-router": "workspace:^",
"solid-js": "^1.9.4",
"solid-js": "^1.9.5",
"redaxios": "^0.5.1"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import { Link, Outlet, createRootRoute } from '@tanstack/solid-router'
import {
HeadContent,
Link,
Outlet,
createRootRoute,
} from '@tanstack/solid-router'
// import { TanStackRouterDevtools } from '@tanstack/router-devtools'

export const Route = createRootRoute({
Expand All @@ -16,6 +21,7 @@ export const Route = createRootRoute({
function RootComponent() {
return (
<>
<HeadContent />
<div class="p-2 flex gap-2 text-lg border-b">
<Link
to="/"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
</head>
<body>
<div id="app"></div>
Expand Down
Loading