-
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
Merged
+651
−825
Merged
Changes from all commits
Commits
Show all changes
68 commits
Select commit
Hold shift + click to select a range
ce0c847
update env vars
hbjORbj 5535bea
update middleware
hbjORbj eb98496
remove pages router and move pages to /app
hbjORbj 3c3b568
Merge remote-tracking branch 'origin/main' into chore/app-router-team…
hbjORbj c4fb7bc
move to /team
hbjORbj 704a667
update imports
hbjORbj 2081334
fix
hbjORbj d95d2d4
remove pages router and move org pages to /app
hbjORbj d3c53c1
wip
hbjORbj d308a82
fix orgSlug/user pages
hbjORbj 756fc52
fix orgSlug/user/type pages
hbjORbj dd7198d
remove generateMetadata from embed pages
hbjORbj 424d550
Merge remote-tracking branch 'origin/main' into chore/app-router-team…
hbjORbj 284b99c
fix
hbjORbj c67b23f
remove pages router for /user pages
hbjORbj ddb0f9b
generateMetadata is not needed in embed pages
hbjORbj d3e32a6
remove testing setups for app router migration
hbjORbj 068fbed
Merge remote-tracking branch 'origin/main' into chore/app-router-team…
hbjORbj dfe0977
Merge branch 'main' into chore/app-router-team-pages
hbjORbj 73d5d75
remove future/org
hbjORbj e35927d
no layout in [user] page
hbjORbj d6eb699
simplify
hbjORbj 8dec06b
fix
hbjORbj d7acf67
fix OG image for [user]
hbjORbj 8b6d226
fix OG images for org/user and team/slug
hbjORbj 095d985
Merge branch 'main' into chore/app-router-team-pages
hbjORbj 85d1c77
fix OG images for booking page
hbjORbj ead55e0
fix all metadata
hbjORbj 29f2b13
use isBrandingHidden
hbjORbj bf641c2
remove BookerSeo and its usages
hbjORbj 6889882
rename excludeAppNameFromTitle -> hideBranding
hbjORbj 77a0d66
remove logic for meeting type in HeadSeo
hbjORbj f7dc059
remove BookerSeo instances from team-view and users-public-view
hbjORbj 06c3d8e
create generateMeetingMetadata util and use it to reduce duplicate code
hbjORbj e821887
remove BookerSeo imports
hbjORbj 3a40e1b
fix spacing
hbjORbj 8427859
remove constructMeetingImage mock from head-seo.test
hbjORbj 11fdcd3
fetch avatarUrl using user id for user page metadata
hbjORbj c46562c
fix test
hbjORbj fafd2da
remove unused test cases
hbjORbj 883a0f5
index and follow must be true by default
hbjORbj c34926e
invert noindex/nofollow flags
hbjORbj 3199342
remove HeadSeo for already migrated pages and refactor prepareMetadata
hbjORbj 45aeb21
fix organization-settings.e2e.ts
hbjORbj 8082048
fix order
hbjORbj 5cd0634
Merge remote-tracking branch 'origin/main' into chore/app-router-team…
hbjORbj 95cd728
enable parallel test execution for dynamic-booking e2e test
hbjORbj 34bc4b2
fix
hbjORbj 373a229
+ could be %2B in app router
hbjORbj fc82764
refactor handling logic for embeds in app router
hbjORbj df08b06
fix isEmbed
hbjORbj 48a0066
Merge origin/main
hbjORbj d5f2276
fix embed-core
hbjORbj 3a3b4d0
remove dead code
hbjORbj ea08b53
Merge branch 'main' into chore/app-router-team-pages
hbjORbj 26c29ce
move embed pages back to /future
hbjORbj 876ea41
add back embed pages in pages router
hbjORbj 882d097
revert some changes
hbjORbj 43d29cd
fix import type checks
hbjORbj cbae15a
Merge branch 'main' into chore/app-router-team-pages
hbjORbj 59b53d1
Merge remote-tracking branch 'origin/main' into chore/app-router-team…
hbjORbj ee5c49e
simplify
hbjORbj baa6afc
fix
hbjORbj be31292
feat: Implement generateBookingPageMetadata function for improved SEO…
hariombalhara ea3445f
fix dirs
hbjORbj cad082c
Pr-review-fixes-app-router-team-pages (#18450)
hariombalhara f6113e9
Fix 404 for team page (#18451)
hariombalhara d685e8d
Remove console log
hariombalhara 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 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 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 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 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,39 @@ | ||
import { withAppDirSsr } from "app/WithAppDirSsr"; | ||
import type { PageProps } from "app/_types"; | ||
import { generateUserProfilePageMetadata } from "app/generateBookingPageMetadata"; | ||
import { WithLayout } from "app/layoutHOC"; | ||
import { headers, cookies } from "next/headers"; | ||
|
||
import { buildLegacyCtx } from "@lib/buildLegacyCtx"; | ||
|
||
import { getServerSideProps } from "@server/lib/[user]/getServerSideProps"; | ||
|
||
import type { PageProps as LegacyPageProps } from "~/users/views/users-public-view"; | ||
import LegacyPage from "~/users/views/users-public-view"; | ||
|
||
export const generateMetadata = async ({ params, searchParams }: PageProps) => { | ||
const props = await getData(buildLegacyCtx(headers(), cookies(), params, searchParams)); | ||
|
||
const { profile, markdownStrippedBio, isOrgSEOIndexable, entity } = props; | ||
|
||
const isOrg = !!profile?.organization; | ||
const allowSEOIndexing = !!( | ||
(!isOrg && profile.allowSEOIndexing) || | ||
(isOrg && isOrgSEOIndexable && profile.allowSEOIndexing) | ||
); | ||
return await generateUserProfilePageMetadata({ | ||
profile: { | ||
name: profile.name, | ||
image: profile.image ?? "", | ||
username: profile.username ?? "", | ||
markdownStrippedBio: markdownStrippedBio, | ||
}, | ||
event: null, | ||
hideBranding: false, | ||
orgSlug: entity.orgSlug ?? null, | ||
isSEOIndexable: allowSEOIndexing, | ||
}); | ||
}; | ||
|
||
const getData = withAppDirSsr<LegacyPageProps>(getServerSideProps); | ||
export default WithLayout({ getData, Page: LegacyPage })<"P">; |
This file contains 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 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 was deleted.
Oops, something went wrong.
7 changes: 3 additions & 4 deletions
7
apps/web/app/future/org/[orgSlug]/[user]/[type]/embed/page.tsx
This file contains 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 |
---|---|---|
@@ -1,10 +1,9 @@ | ||
import { type PageProps } from "@pages/org/[orgSlug]/[user]/[type]"; | ||
import Page from "@pages/org/[orgSlug]/[user]/[type]/embed"; | ||
import withEmbedSsrAppDir from "app/WithEmbedSSR"; | ||
import { WithLayout } from "app/layoutHOC"; | ||
import { Page, type OrgTypePageProps } from "app/org/[orgSlug]/[user]/[type]/page"; | ||
|
||
import { getServerSideProps } from "@lib/org/[orgSlug]/[user]/[type]/getServerSideProps"; | ||
|
||
const getEmbedData = withEmbedSsrAppDir<PageProps>(getServerSideProps); | ||
const getEmbedData = withEmbedSsrAppDir<OrgTypePageProps>(getServerSideProps); | ||
|
||
export default WithLayout({ getLayout: null, getData: getEmbedData, isBookingPage: true, Page }); | ||
export default WithLayout({ getLayout: null, getData: getEmbedData, isBookingPage: true, ServerPage: Page }); |
This file was deleted.
Oops, something went wrong.
This file contains 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 |
---|---|---|
@@ -1,8 +1,9 @@ | ||
import { getServerSideProps, type PageProps } from "@pages/org/[orgSlug]/[user]"; | ||
import Page from "@pages/org/[orgSlug]/[user]/embed"; | ||
import withEmbedSsrAppDir from "app/WithEmbedSSR"; | ||
import { WithLayout } from "app/layoutHOC"; | ||
import { Page, type OrgPageProps } from "app/org/[orgSlug]/[user]/page"; | ||
|
||
const getEmbedData = withEmbedSsrAppDir<PageProps>(getServerSideProps); | ||
import { getServerSideProps } from "@lib/org/[orgSlug]/[user]/getServerSideProps"; | ||
|
||
export default WithLayout({ getLayout: null, getData: getEmbedData, isBookingPage: true, Page }); | ||
const getEmbedData = withEmbedSsrAppDir<OrgPageProps>(getServerSideProps); | ||
|
||
export default WithLayout({ getLayout: null, getData: getEmbedData, isBookingPage: true, ServerPage: Page }); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
45 changes: 0 additions & 45 deletions
45
apps/web/app/future/org/[orgSlug]/team/[slug]/[type]/page.tsx
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
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.
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.