-
Notifications
You must be signed in to change notification settings - Fork 436
feat(e2e): add next-app-router-bundled-ui integration template #7826
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
a226526
feat(integration): add next-app-router-bundled-ui integration template
jacekradko 8fafac1
test(e2e): add smoke tests for bundled UI integration app
jacekradko 46d2a63
test(e2e): assert no external ui.browser.js requests in bundled UI test
jacekradko c96b6ca
chore: empty changeset
jacekradko 1971f44
chore(integration): upgrade bundled-ui template to react 19
jacekradko File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| --- | ||
| --- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
integration/templates/next-app-router-bundled-ui/.gitignore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
|
||
| # dependencies | ||
| /node_modules | ||
| /.pnp | ||
| .pnp.js | ||
|
|
||
| # testing | ||
| /coverage | ||
|
|
||
| # next.js | ||
| /.next/ | ||
| /out/ | ||
|
|
||
| # production | ||
| /build | ||
|
|
||
| # misc | ||
| .DS_Store | ||
| *.pem | ||
|
|
||
| # debug | ||
| npm-debug.log* | ||
| yarn-debug.log* | ||
| yarn-error.log* | ||
|
|
||
| # local env files | ||
| .env*.local | ||
|
|
||
| # vercel | ||
| .vercel | ||
|
|
||
| # typescript | ||
| *.tsbuildinfo | ||
| next-env.d.ts |
4 changes: 4 additions & 0 deletions
4
integration/templates/next-app-router-bundled-ui/next.config.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| /** @type {import('next').NextConfig} */ | ||
| const nextConfig = {}; | ||
|
|
||
| module.exports = nextConfig; |
23 changes: 23 additions & 0 deletions
23
integration/templates/next-app-router-bundled-ui/package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| { | ||
| "name": "next-app-router-bundled-ui", | ||
| "version": "0.1.0", | ||
| "private": true, | ||
| "scripts": { | ||
| "build": "next build", | ||
| "dev": "next dev", | ||
| "lint": "next lint", | ||
| "start": "next start" | ||
| }, | ||
| "dependencies": { | ||
| "@types/node": "^20.12.12", | ||
| "@types/react": "19.2.14", | ||
| "@types/react-dom": "19.2.3", | ||
| "next": "^15.0.1", | ||
| "react": "19.2.4", | ||
| "react-dom": "19.2.4", | ||
| "typescript": "^5.7.3" | ||
| }, | ||
| "engines": { | ||
| "node": ">=20.9.0" | ||
| } | ||
| } |
1 change: 1 addition & 0 deletions
1
integration/templates/next-app-router-bundled-ui/public/next.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions
1
integration/templates/next-app-router-bundled-ui/public/vercel.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
78 changes: 78 additions & 0 deletions
78
integration/templates/next-app-router-bundled-ui/src/app/globals.css
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| :root { | ||
| --max-width: 1100px; | ||
| --border-radius: 12px; | ||
| --font-mono: | ||
| ui-monospace, Menlo, Monaco, 'Cascadia Mono', 'Segoe UI Mono', 'Roboto Mono', 'Oxygen Mono', 'Ubuntu Monospace', | ||
| 'Source Code Pro', 'Fira Mono', 'Droid Sans Mono', 'Courier New', monospace; | ||
|
|
||
| --foreground-rgb: 0, 0, 0; | ||
| --background-start-rgb: 214, 219, 220; | ||
| --background-end-rgb: 255, 255, 255; | ||
|
|
||
| --primary-glow: conic-gradient( | ||
| from 180deg at 50% 50%, | ||
| #16abff33 0deg, | ||
| #0885ff33 55deg, | ||
| #54d6ff33 120deg, | ||
| #0071ff33 160deg, | ||
| transparent 360deg | ||
| ); | ||
| --secondary-glow: radial-gradient(rgba(255, 255, 255, 1), rgba(255, 255, 255, 0)); | ||
|
|
||
| --tile-start-rgb: 239, 245, 249; | ||
| --tile-end-rgb: 228, 232, 233; | ||
| --tile-border: conic-gradient(#00000080, #00000040, #00000030, #00000020, #00000010, #00000010, #00000080); | ||
|
|
||
| --callout-rgb: 238, 240, 241; | ||
| --callout-border-rgb: 172, 175, 176; | ||
| --card-rgb: 180, 185, 188; | ||
| --card-border-rgb: 131, 134, 135; | ||
| } | ||
|
|
||
| @media (prefers-color-scheme: dark) { | ||
| :root { | ||
| --foreground-rgb: 255, 255, 255; | ||
| --background-start-rgb: 0, 0, 0; | ||
| --background-end-rgb: 0, 0, 0; | ||
|
|
||
| --primary-glow: radial-gradient(rgba(1, 65, 255, 0.4), rgba(1, 65, 255, 0)); | ||
| --secondary-glow: linear-gradient(to bottom right, rgba(1, 65, 255, 0), rgba(1, 65, 255, 0), rgba(1, 65, 255, 0.3)); | ||
|
|
||
| --tile-start-rgb: 2, 13, 46; | ||
| --tile-end-rgb: 2, 5, 19; | ||
| --tile-border: conic-gradient(#ffffff80, #ffffff40, #ffffff30, #ffffff20, #ffffff10, #ffffff10, #ffffff80); | ||
|
|
||
| --callout-rgb: 20, 20, 20; | ||
| --callout-border-rgb: 108, 108, 108; | ||
| --card-rgb: 100, 100, 100; | ||
| --card-border-rgb: 200, 200, 200; | ||
| } | ||
jacekradko marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
| * { | ||
| box-sizing: border-box; | ||
| padding: 0; | ||
| margin: 0; | ||
| } | ||
|
|
||
| html, | ||
| body { | ||
| max-width: 100vw; | ||
| overflow-x: hidden; | ||
| } | ||
|
|
||
| body { | ||
| color: rgb(var(--foreground-rgb)); | ||
| background: linear-gradient(to bottom, transparent, rgb(var(--background-end-rgb))) rgb(var(--background-start-rgb)); | ||
| } | ||
|
|
||
| a { | ||
| color: inherit; | ||
| text-decoration: none; | ||
| } | ||
|
|
||
| @media (prefers-color-scheme: dark) { | ||
| html { | ||
| color-scheme: dark; | ||
| } | ||
| } | ||
28 changes: 28 additions & 0 deletions
28
integration/templates/next-app-router-bundled-ui/src/app/layout.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| import './globals.css'; | ||
| import { Inter } from 'next/font/google'; | ||
| import { ClerkProvider } from '@clerk/nextjs'; | ||
| import { ui } from '@clerk/ui'; | ||
|
|
||
| const inter = Inter({ subsets: ['latin'] }); | ||
|
|
||
| export const metadata = { | ||
| title: 'Bundled UI Test App', | ||
| }; | ||
|
|
||
| export default function RootLayout({ children }: { children: React.ReactNode }) { | ||
| return ( | ||
| <ClerkProvider | ||
| ui={ui} | ||
| appearance={{ | ||
| options: { | ||
| showOptionalFields: true, | ||
| socialButtonsVariant: 'blockButton', | ||
| }, | ||
| }} | ||
| > | ||
| <html lang='en'> | ||
| <body className={inter.className}>{children}</body> | ||
| </html> | ||
| </ClerkProvider> | ||
| ); | ||
| } |
17 changes: 17 additions & 0 deletions
17
integration/templates/next-app-router-bundled-ui/src/app/page.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| import { Show, SignInButton, SignUpButton, UserButton } from '@clerk/nextjs'; | ||
|
|
||
| export default function Home() { | ||
| return ( | ||
| <header> | ||
| <Show when='signed-out'> | ||
| <p>signed-out-state</p> | ||
| <SignInButton /> | ||
| <SignUpButton /> | ||
| </Show> | ||
| <Show when='signed-in'> | ||
| <p>signed-in-state</p> | ||
| <UserButton /> | ||
| </Show> | ||
| </header> | ||
| ); | ||
| } |
14 changes: 14 additions & 0 deletions
14
integration/templates/next-app-router-bundled-ui/src/app/sign-in/[[...catchall]]/page.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| import { SignIn } from '@clerk/nextjs'; | ||
|
|
||
| export default function Page() { | ||
| return ( | ||
| <div> | ||
| <SignIn | ||
| routing={'path'} | ||
| path={'/sign-in'} | ||
| signUpUrl={'/sign-up'} | ||
| fallback={<>Loading sign in</>} | ||
| /> | ||
| </div> | ||
| ); | ||
| } |
14 changes: 14 additions & 0 deletions
14
integration/templates/next-app-router-bundled-ui/src/app/sign-up/[[...catchall]]/page.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| import { SignUp } from '@clerk/nextjs'; | ||
|
|
||
| export default function Page() { | ||
| return ( | ||
| <div> | ||
| <SignUp | ||
| routing={'path'} | ||
| path={'/sign-up'} | ||
| signInUrl={'/sign-in'} | ||
| fallback={<>Loading sign up</>} | ||
| /> | ||
| </div> | ||
| ); | ||
| } |
43 changes: 43 additions & 0 deletions
43
integration/templates/next-app-router-bundled-ui/src/app/themes/page.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| 'use client'; | ||
|
|
||
| import { SignIn } from '@clerk/nextjs'; | ||
| import { dark, neobrutalism, shadesOfPurple, shadcn } from '@clerk/ui/themes'; | ||
|
|
||
| export default function ThemesPage() { | ||
| return ( | ||
| <div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: '2rem', padding: '2rem' }}> | ||
| <div> | ||
| <h2>Dark</h2> | ||
| <SignIn | ||
| appearance={{ baseTheme: dark }} | ||
| routing='hash' | ||
| fallback={<>Loading dark theme</>} | ||
| /> | ||
| </div> | ||
| <div> | ||
| <h2>Neobrutalism</h2> | ||
| <SignIn | ||
| appearance={{ baseTheme: neobrutalism }} | ||
| routing='hash' | ||
| fallback={<>Loading neobrutalism theme</>} | ||
| /> | ||
| </div> | ||
| <div> | ||
| <h2>Shades of Purple</h2> | ||
| <SignIn | ||
| appearance={{ baseTheme: shadesOfPurple }} | ||
| routing='hash' | ||
| fallback={<>Loading shadesOfPurple theme</>} | ||
| /> | ||
| </div> | ||
| <div> | ||
| <h2>Shadcn</h2> | ||
| <SignIn | ||
| appearance={{ baseTheme: shadcn }} | ||
| routing='hash' | ||
| fallback={<>Loading shadcn theme</>} | ||
| /> | ||
| </div> | ||
| </div> | ||
| ); | ||
| } |
9 changes: 9 additions & 0 deletions
9
integration/templates/next-app-router-bundled-ui/src/app/user-button/page.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| import { UserButton } from '@clerk/nextjs'; | ||
|
|
||
| export default function Page() { | ||
| return ( | ||
| <div> | ||
| <UserButton fallback={<>Loading user button</>} /> | ||
| </div> | ||
| ); | ||
| } |
7 changes: 7 additions & 0 deletions
7
integration/templates/next-app-router-bundled-ui/src/middleware.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| import { clerkMiddleware } from '@clerk/nextjs/server'; | ||
|
|
||
| export default clerkMiddleware(); | ||
|
|
||
| export const config = { | ||
| matcher: ['/((?!.*\\..*|_next).*)', '/', '/(api|trpc)(.*)'], | ||
| }; |
28 changes: 28 additions & 0 deletions
28
integration/templates/next-app-router-bundled-ui/tsconfig.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| { | ||
| "compilerOptions": { | ||
| "target": "es5", | ||
| "lib": ["dom", "dom.iterable", "esnext"], | ||
| "allowJs": true, | ||
| "skipLibCheck": true, | ||
| "strict": true, | ||
| "forceConsistentCasingInFileNames": true, | ||
| "noEmit": true, | ||
| "esModuleInterop": true, | ||
| "module": "esnext", | ||
| "moduleResolution": "bundler", | ||
| "resolveJsonModule": true, | ||
| "isolatedModules": true, | ||
| "jsx": "preserve", | ||
| "incremental": true, | ||
| "plugins": [ | ||
| { | ||
| "name": "next" | ||
| } | ||
| ], | ||
| "paths": { | ||
| "@/*": ["./src/*"] | ||
| } | ||
| }, | ||
| "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], | ||
| "exclude": ["node_modules"] | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.