Skip to content

fix: include app directory in rewrites generation logic + migrate /reschedule pages to App Router#18261

Merged
hbjORbj merged 11 commits into
mainfrom
fix/reschedule-links-for-orgs
Dec 19, 2024
Merged

fix: include app directory in rewrites generation logic + migrate /reschedule pages to App Router#18261
hbjORbj merged 11 commits into
mainfrom
fix/reschedule-links-for-orgs

Conversation

@hbjORbj
Copy link
Copy Markdown
Contributor

@hbjORbj hbjORbj commented Dec 19, 2024

This PR does the following:

@vercel
Copy link
Copy Markdown

vercel Bot commented Dec 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Visit Preview Dec 19, 2024 9:58am
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview Dec 19, 2024 9:58am

@graphite-app graphite-app Bot requested a review from a team December 19, 2024 00:15
@keithwillcode keithwillcode added consumer core area: core, team members only labels Dec 19, 2024
@dosubot dosubot Bot added organizations area: organizations, orgs 🐛 bug Something isn't working labels Dec 19, 2024
@hbjORbj hbjORbj changed the title fix: reschedule links for orgs fix: reschedule links for orgs are broken Dec 19, 2024
zomars
zomars previously approved these changes Dec 19, 2024
@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented Dec 19, 2024

Graphite Automations

"Add consumer team as reviewer" took an action on this PR • (12/19/24)

1 reviewer was added to this PR based on Keith Williams's automation.

CarinaWolli
CarinaWolli previously approved these changes Dec 19, 2024
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 19, 2024

E2E results are ready!

@hbjORbj hbjORbj closed this Dec 19, 2024
@hbjORbj hbjORbj reopened this Dec 19, 2024
@hbjORbj hbjORbj closed this Dec 19, 2024
@hbjORbj hbjORbj reopened this Dec 19, 2024
@hbjORbj hbjORbj changed the title fix: reschedule links for orgs are broken chore: do not use redirects for org domain pages Dec 19, 2024
@hbjORbj hbjORbj requested a review from CarinaWolli December 19, 2024 06:57
@hbjORbj hbjORbj marked this pull request as draft December 19, 2024 06:58
@hbjORbj hbjORbj closed this Dec 19, 2024
@hbjORbj hbjORbj reopened this Dec 19, 2024
@hbjORbj hbjORbj changed the title chore: do not use redirects for org domain pages fix: reschedule/booking links for orgs are broken Dec 19, 2024
@hbjORbj hbjORbj changed the title fix: reschedule/booking links for orgs are broken fix: reschedule/booking links for orgs are broken + migrate /reschedule pages to App Router Dec 19, 2024
import { headers, cookies } from "next/headers";

import { buildLegacyCtx } from "@lib/buildLegacyCtx";
import { getServerSideProps } from "@lib/reschedule/[uid]/getServerSideProps";

export const generateMetadata = async () =>
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

metadata not needed because we redirect users in this route

@hbjORbj hbjORbj marked this pull request as ready for review December 19, 2024 08:13
.sync("pages/**/[^_]*.{tsx,js,ts}", { cwd: __dirname })
// Pages found here are excluded from redirects in beforeFiles in next.config.js
const BEFORE_REWRITE_EXCLUDE_PAGES = (exports.pages = glob
.sync("{pages,app}/**/[^_]*.{tsx,js,ts}", { cwd: __dirname })
Copy link
Copy Markdown
Contributor Author

@hbjORbj hbjORbj Dec 19, 2024

Choose a reason for hiding this comment

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

  • Because /pages directory no longer had reschedule and booking, these were not excluded from the redirects.

Confirmed that these are included now:
Screenshot 2024-12-19 at 3 27 27 AM

Copy link
Copy Markdown
Contributor

@keithwillcode keithwillcode left a comment

Choose a reason for hiding this comment

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

Since this is fixing a regression let’s add tests that ensure it won’t regress in the future.

@github-actions github-actions Bot marked this pull request as draft December 19, 2024 09:20
auto-merge was automatically disabled December 19, 2024 09:20

Pull request was converted to draft

@hbjORbj hbjORbj marked this pull request as ready for review December 19, 2024 09:38
@hbjORbj
Copy link
Copy Markdown
Contributor Author

hbjORbj commented Dec 19, 2024

@keithwillcode Done!

Copy link
Copy Markdown
Contributor

@zomars zomars left a comment

Choose a reason for hiding this comment

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

Appreciate the tests

@zomars zomars dismissed keithwillcode’s stale review December 19, 2024 13:22

Tests were added

@hbjORbj hbjORbj merged commit 355aaa7 into main Dec 19, 2024
@hbjORbj hbjORbj deleted the fix/reschedule-links-for-orgs branch December 19, 2024 13:22
MuhammadAimanSulaiman pushed a commit to hit-pay/cal.com that referenced this pull request Jan 10, 2025
…schedule pages to App Router (calcom#18261)

* chore: app router - /reschedule pages (calcom#18150)

* app router - /reschedule pages

* add to config.matcher

* generateMetdata is not needed

* include app directory in rewrites generation logic

* make it more readable

* make code more elegant

* fix

* fix

* fix

* fix

* test and refactor
MuhammadAimanSulaiman pushed a commit to hit-pay/cal.com that referenced this pull request Feb 20, 2025
…schedule pages to App Router (calcom#18261)

* chore: app router - /reschedule pages (calcom#18150)

* app router - /reschedule pages

* add to config.matcher

* generateMetdata is not needed

* include app directory in rewrites generation logic

* make it more readable

* make code more elegant

* fix

* fix

* fix

* fix

* test and refactor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 bug Something isn't working consumer core area: core, team members only organizations area: organizations, orgs ready-for-e2e

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants