Skip to content

Conversation

@jonathanawesome
Copy link
Contributor

@jonathanawesome jonathanawesome commented Nov 7, 2025

This PR attempts migrates the site index from pages router to app router and sets up the proper layout files.

Notes:

  • Shuffled layouts around such that the root layout provides core html/head/body elements. (main) and (conf)/conf/year implement viz-only.
  • not-found.tsx uses NavBar and Footer because it needs to live at the /app root and can't use our (main) layout.
  • not-found.tsx uses a hacky way to get <title> working. We can remove this after we've updated to modern nextjs.

@vercel
Copy link

vercel bot commented Nov 7, 2025

@jonathanawesome is attempting to deploy a commit to the The GraphQL Foundation Team on Vercel.

A member of the Team first needs to authorize it.

@jonathanawesome jonathanawesome marked this pull request as draft November 7, 2025 15:50
@jonathanawesome jonathanawesome changed the title WIP: Move index to app router Move index to app router Nov 7, 2025
@jonathanawesome jonathanawesome marked this pull request as ready for review November 7, 2025 15:55
@jonathanawesome jonathanawesome marked this pull request as draft November 7, 2025 18:21
@vercel
Copy link

vercel bot commented Nov 7, 2025

Deployment failed with the following error:

The provided GitHub repository does not contain the requested branch or commit reference. Please ensure the repository is not empty.

@jonathanawesome jonathanawesome marked this pull request as ready for review November 7, 2025 18:26
className="size-16 saturate-[.1] dark:opacity-90 xl:size-32"
// @ts-expect-error React doesn't know it exists yet, but @types/react do
fetchpriority="low"
fetchPriority="low"
Copy link
Member

Choose a reason for hiding this comment

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

Did you bump the React version? so... if it's not lowercase and React doesn't know about it, will it still get passed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't bump react, but I had the same thought. Switching to camelCase displayed no warning and it I double-checked that it was passing though successfully.

Screenshot 2025-11-09 at 10 35 46 AM

{ children: "FAQ", href: "/conf/2025/#faq" },
]}
/>
<ThemeProvider attribute="class">
Copy link
Member

Choose a reason for hiding this comment

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

This means the old conference websites are now inside of ThemeProvider, right?

We should look through them. I don't think they relied on .dark class, but I'll spend a few minutes once the deploy preview is up.

Copy link
Contributor Author

@jonathanawesome jonathanawesome Nov 9, 2025

Choose a reason for hiding this comment

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

Ok, i certainly seem to have bungled this bit...I had a feeling there was something about these different theme strategies I was missing. That said, take a look at the live conf/2024...this is broken already.

Comment on lines +14 to +16
<Navbar items={topLevelNavbarItems} />
{children}
<Footer />
Copy link
Member

Choose a reason for hiding this comment

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

Seems you lifted .isolate by accident.

We can try to remove bg-neu-0 text-neu-900 classes if add them to body styles and test the old conference pages, but isolate was there to avoid fighting the z-index (we portal modals outside).

Suggested change
<Navbar items={topLevelNavbarItems} />
{children}
<Footer />
<Navbar items={topLevelNavbarItems} />
<div className="isolate">
{children}
</div>
<Footer />

Copy link
Member

@hasparus hasparus left a comment

Choose a reason for hiding this comment

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

looks good, but that isolate got lost (I think there should be a visible bug if you open a navbar submenu on 404 page without it) and it would be nice to have a deploy preview

import { events, EventCard } from "../../components/events"
import pinkCircle from "./pink-circle.svg"
import { Button } from '../../app/conf/_design-system/button'
import { Button } from '@/app/conf/_design-system/button'
Copy link
Member

@hasparus hasparus Nov 9, 2025

Choose a reason for hiding this comment

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

I postponed doing this, but in a separate PR we should lift @/app/conf/_design-system to @/_design-system.

It's like this because I did the conf website first, so I worked only in the conf dir.

---

import { Button } from "../../../app/conf/_components/button"
import { Button } from "@/app/conf/_components/button"
Copy link
Member

Choose a reason for hiding this comment

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

WDYT about adding https://github.com/dword-design/eslint-plugin-import-alias...

or actually https://github.com/steelsojka/eslint-import-alias because it's configurable but we'd have to fix the Windows bug.

Ideally I'd like it to match typescript.preferences.importModuleSpecifier: "shortest" setting in VSCode.

export function IndexPage() {
return (
<div className="gql-all-anchors-focusable bg-neu-0">
<Head>
Copy link
Member

Choose a reason for hiding this comment

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

oh nice, I see you removed it already, lemme write a suggestion to add it to metadata export then

https://github.com/vercel/next.js/pull/47328#issuecomment-1488891093
*/}
<title>
Not Found | Please click the button to file a broken-link issue if this
Copy link
Member

@hasparus hasparus Nov 9, 2025

Choose a reason for hiding this comment

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

Let's make it a bit shorter. It's landing in a browser tab, right?

Suggested change
Not Found | Please click the button to file a broken-link issue if this
GraphQL | Page Not Found
Image

Comment on lines +48 to +50
<div className="isolate bg-neu-0 text-neu-900 antialiased">
{children}
</div>
Copy link
Member

Choose a reason for hiding this comment

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

Let's move it back to where it was as a sibling of footer and navbar.

Suggested change
<div className="isolate bg-neu-0 text-neu-900 antialiased">
{children}
</div>
{children}

import { IndexPage } from "../../components/index-page"

export const metadata: Metadata = {
title: "GraphQL | A query language for your API",
Copy link
Member

Choose a reason for hiding this comment

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

oh I just noticed you already removed it from the index page, nice

here it is

Suggested change
title: "GraphQL | A query language for your API",
title: "GraphQL | A query language for your API",
description: "GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data."

Comment on lines +28 to +33
// conditionally add a key here to avoid react list key errors
<Tag
key={!links ? tag : undefined}
className={opaque ? "bg-neu-0" : ""}
color={color}
>
Copy link
Member

Choose a reason for hiding this comment

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

oh I can't believe I missed that

mby we could shorten it and add the tag unconditionally

it's the only child so even if it was a long string React won't spend a lot of time comparing it

Suggested change
// conditionally add a key here to avoid react list key errors
<Tag
key={!links ? tag : undefined}
className={opaque ? "bg-neu-0" : ""}
color={color}
>
<Tag
key={tag}
className={opaque ? "bg-neu-0" : ""}
color={color}
>

@vercel
Copy link

vercel bot commented Nov 9, 2025

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

Project Deployment Preview Comments Updated (UTC)
graphql-github-io Error Error Nov 10, 2025 9:58pm

@jonathanawesome jonathanawesome marked this pull request as draft November 9, 2025 18:39
@hasparus
Copy link
Member

hasparus commented Nov 10, 2025

Let's merge #2227 first. Should help with the sidebar issue.

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