-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
chore: app router - /team, /org, /[user] booking pages (excl. embeds) #18186
base: main
Are you sure you want to change the base?
Conversation
Graphite Automations"Add consumer team as reviewer" took an action on this PR • (12/14/24)1 reviewer was added to this PR based on Keith Williams's automation. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Skipped Deployments
|
@@ -103,3 +104,22 @@ export const _generateMetadata = async ( | |||
}, | |||
}; | |||
}; | |||
|
|||
export const generateMeetingMetadata = async ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The key difference is const image = SEO_IMG_OGIMG + constructMeetingImage(meeting);
. Using constructMeetingImage is important to generate correct OG images.
follow: !(event?.hidden || !isSEOIndexable), | ||
index: !(event?.hidden || !isSEOIndexable), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noindex
andnofollow
are not supported in App Router. We need to usefollow
andindex
instead.
@@ -249,7 +249,6 @@ | |||
"APP_ROUTER_AUTH_ERROR_ENABLED", | |||
"APP_ROUTER_AUTH_PLATFORM_ENABLED", | |||
"APP_ROUTER_AUTH_OAUTH2_ENABLED", | |||
"APP_ROUTER_TEAM_ENABLED", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I confirmed that we do not have env variables for user or org
@@ -20,13 +19,6 @@ export default function Type({ | |||
}: PageProps) { | |||
return ( | |||
<main className={getBookerWrapperClasses({ isEmbed: !!isEmbed })}> | |||
<BookerSeo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BookerSeo is not needed anymore as we handle the metadata using app router metadata API (by exporting generateMetadata funtion)
const searchParams = useSearchParams(); | ||
const { profile, users, hidden, title } = eventData; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no longer used
@@ -11,6 +11,8 @@ import { | |||
selectSecondAvailableTimeSlotNextMonth, | |||
} from "./lib/testUtils"; | |||
|
|||
test.describe.configure({ mode: "parallel" }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small optimization
@@ -66,7 +66,7 @@ async function verifyRobotsMetaTag({ page, orgSlug, urls, expectedContent }: Ver | |||
await doOnOrgDomain({ orgSlug, page }, async ({ page, goToUrlWithErrorHandling }) => { | |||
for (const relativeUrl of urls) { | |||
const { url } = await goToUrlWithErrorHandling(relativeUrl); | |||
const metaTag = await page.locator('head > meta[name="robots"]'); | |||
const metaTag = await page.locator('head > meta[name="robots"]').first(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because we didn't completely deprecate NextSeo
yet (we can completely deprecate once we are 100% done with migration), we can have two metadata tags with robots
in the html.
@@ -132,6 +133,7 @@ export const getServerSideProps: GetServerSideProps<UserPageProps> = async (cont | |||
const [user] = usersInOrgContext; //to be used when dealing with single user, not dynamic group | |||
|
|||
const profile = { | |||
id: user.id, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
passing id here to get user's avatar url (needed for OG image generation in generateMetadata function)
a55294c
to
876ea41
Compare
Some notes to make your review easier: @zomars @emrysal
|
const isEmbedSnippetGeneratorPath = pathname.startsWith("/event-types"); | ||
const isEmbed = | ||
(pathname.endsWith("/embed") || (searchParams?.get("embedType") ?? null) !== null) && | ||
!isEmbedSnippetGeneratorPath; | ||
const embedColorScheme = searchParams?.get("ui.color-scheme"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I synced this file with _document.tsx
in pages router
What does this PR do?
Tested /team sub-pages
test.mov
Mandatory Tasks (DO NOT REMOVE)
How should this be tested?