feat: Organizations no middleware rewrite#9548
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
Current Playwright Test Results Summary✅ 114 Passing - Run may still be in progress, this comment will be updated as current testing workflow or job completes... (Last updated on 06/21/2023 09:11:36pm UTC) Run DetailsRunning Workflow PR Update on Github Actions Commit: 9d3aaa2 Started: 06/21/2023 09:08:36pm UTC
|
|
|
2 Test Cases Affected |
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Popup Tests should be able to reschedule
Retry 1 • Initial Attempt |
19.44% (42)42 / 216 runsfailed over last 7 days |
77.31% (167)167 / 216 runsflaked over last 7 days |
|
Popup Tests should open Routing Forms embed on click
Retry 1 • Initial Attempt |
16.74% (36)36 / 215 runsfailed over last 7 days |
1.86% (4)4 / 215 runsflaked over last 7 days |
📄 packages/embeds/embed-core/playwright/tests/inline.e2e.ts • 1 Flake
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Inline Iframe - Configured with Dark Theme
Retry 1 • Initial Attempt |
18.52% (40)40 / 216 runsfailed over last 7 days |
1.85% (4)4 / 216 runsflaked over last 7 days |
📦 Next.js Bundle Analysis for @calcom/webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 New Pages AddedThe following pages were added to the bundle from the code in this PR:
|
|
Mentioning here for awareness, /:path* matcher is also being used now to enable new booker. It's a temp change. So, when it works, let's not remove that /:path* right now. |
# Conflicts: # apps/web/middleware.ts # apps/web/next.config.js
|
There's something breaking e2e-embed tests. We need to investigate. Seems like the embed file is returning a 404
@hariombalhara any pointers on how to debug this? |
|
They are passing now @zomars. But I am debugging this behaviour now which sometimes happen. |
ericrommel
left a comment
There was a problem hiding this comment.
@roae, thanks for guiding me to put my local to work. I have done some more test as I said and everything looks fine.
…AL-1993] [CAL-1994] (#9693) * Fixing signup from org invitation and other tweaks * feat: Organizations no middleware rewrite (#9548) Co-authored-by: Leo Giovanetti <hello@leog.me> Co-authored-by: zomars <zomars@me.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com> * Revert "fix: redirect to 404 page for invalid email verification token" (#9703) * New Crowdin translations by Github Action * refactor: Skip license checks for development (#9375) * Allow closing the embed on clicking the black transparent area (#9706) * New Crowdin translations by Github Action * perf: [CAL-1928] Deduplicate eventTypes.getByViewer query (#9700) Co-authored-by: alannnc <alannnc@gmail.com> Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com> * perf: Remove useless data on EvenTypes getByViewer endpoint (#9704) * feat: [CAL-910] Pre-select country for phone number (CALCOM-5759) (#9526) Co-authored-by: gitstart-calcom <gitstart@users.noreply.github.com> * Fix settings layout + org headings (#9712) * Simplifying prop * Removing restriction to choose username * Formatting --------- Co-authored-by: Efraín Rochín <roae.85@gmail.com> Co-authored-by: zomars <zomars@me.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: Crowdin Bot <support+bot@crowdin.com> Co-authored-by: alannnc <alannnc@gmail.com> Co-authored-by: Hariom Balhara <hariombalhara@gmail.com> Co-authored-by: Afzal Sayed <14029371+afzalsayed96@users.noreply.github.com> Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com> Co-authored-by: GitStart-Cal.com <121884634+gitstart-calcom@users.noreply.github.com> Co-authored-by: gitstart-calcom <gitstart@users.noreply.github.com> Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com>
* Creating team and preview URL fixes * Renamed function in tests too * fix: Signup from org wizard invitation and other tweaks [CAL-1973] [CAL-1993] [CAL-1994] (#9693) * Fixing signup from org invitation and other tweaks * feat: Organizations no middleware rewrite (#9548) Co-authored-by: Leo Giovanetti <hello@leog.me> Co-authored-by: zomars <zomars@me.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com> * Revert "fix: redirect to 404 page for invalid email verification token" (#9703) * New Crowdin translations by Github Action * refactor: Skip license checks for development (#9375) * Allow closing the embed on clicking the black transparent area (#9706) * New Crowdin translations by Github Action * perf: [CAL-1928] Deduplicate eventTypes.getByViewer query (#9700) Co-authored-by: alannnc <alannnc@gmail.com> Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com> * perf: Remove useless data on EvenTypes getByViewer endpoint (#9704) * feat: [CAL-910] Pre-select country for phone number (CALCOM-5759) (#9526) Co-authored-by: gitstart-calcom <gitstart@users.noreply.github.com> * Fix settings layout + org headings (#9712) * Simplifying prop * Removing restriction to choose username * Formatting --------- Co-authored-by: Efraín Rochín <roae.85@gmail.com> Co-authored-by: zomars <zomars@me.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: Crowdin Bot <support+bot@crowdin.com> Co-authored-by: alannnc <alannnc@gmail.com> Co-authored-by: Hariom Balhara <hariombalhara@gmail.com> Co-authored-by: Afzal Sayed <14029371+afzalsayed96@users.noreply.github.com> Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com> Co-authored-by: GitStart-Cal.com <121884634+gitstart-calcom@users.noreply.github.com> Co-authored-by: gitstart-calcom <gitstart@users.noreply.github.com> Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com> * Fix conditional before hook * Fix lints --------- Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com> Co-authored-by: Efraín Rochín <roae.85@gmail.com> Co-authored-by: zomars <zomars@me.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: Crowdin Bot <support+bot@crowdin.com> Co-authored-by: alannnc <alannnc@gmail.com> Co-authored-by: Hariom Balhara <hariombalhara@gmail.com> Co-authored-by: Afzal Sayed <14029371+afzalsayed96@users.noreply.github.com> Co-authored-by: GitStart-Cal.com <121884634+gitstart-calcom@users.noreply.github.com> Co-authored-by: gitstart-calcom <gitstart@users.noreply.github.com> Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com>
…m#9648) * Creating team and preview URL fixes * Renamed function in tests too * fix: Signup from org wizard invitation and other tweaks [CAL-1973] [CAL-1993] [CAL-1994] (calcom#9693) * Fixing signup from org invitation and other tweaks * feat: Organizations no middleware rewrite (calcom#9548) Co-authored-by: Leo Giovanetti <hello@leog.me> Co-authored-by: zomars <zomars@me.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com> * Revert "fix: redirect to 404 page for invalid email verification token" (calcom#9703) * New Crowdin translations by Github Action * refactor: Skip license checks for development (calcom#9375) * Allow closing the embed on clicking the black transparent area (calcom#9706) * New Crowdin translations by Github Action * perf: [CAL-1928] Deduplicate eventTypes.getByViewer query (calcom#9700) Co-authored-by: alannnc <alannnc@gmail.com> Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com> * perf: Remove useless data on EvenTypes getByViewer endpoint (calcom#9704) * feat: [CAL-910] Pre-select country for phone number (CALCOM-5759) (calcom#9526) Co-authored-by: gitstart-calcom <gitstart@users.noreply.github.com> * Fix settings layout + org headings (calcom#9712) * Simplifying prop * Removing restriction to choose username * Formatting --------- Co-authored-by: Efraín Rochín <roae.85@gmail.com> Co-authored-by: zomars <zomars@me.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: Crowdin Bot <support+bot@crowdin.com> Co-authored-by: alannnc <alannnc@gmail.com> Co-authored-by: Hariom Balhara <hariombalhara@gmail.com> Co-authored-by: Afzal Sayed <14029371+afzalsayed96@users.noreply.github.com> Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com> Co-authored-by: GitStart-Cal.com <121884634+gitstart-calcom@users.noreply.github.com> Co-authored-by: gitstart-calcom <gitstart@users.noreply.github.com> Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com> * Fix conditional before hook * Fix lints --------- Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com> Co-authored-by: Efraín Rochín <roae.85@gmail.com> Co-authored-by: zomars <zomars@me.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: Crowdin Bot <support+bot@crowdin.com> Co-authored-by: alannnc <alannnc@gmail.com> Co-authored-by: Hariom Balhara <hariombalhara@gmail.com> Co-authored-by: Afzal Sayed <14029371+afzalsayed96@users.noreply.github.com> Co-authored-by: GitStart-Cal.com <121884634+gitstart-calcom@users.noreply.github.com> Co-authored-by: gitstart-calcom <gitstart@users.noreply.github.com> Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com>

What does this PR do?
Use the rewrite beforeFiles config on next.config.js to rewrite the requests to an organization subdomain to the correct page.
https://www.loom.com/share/d4502f3b93754bb694b8655bda1eea0d
Type of change
Mandatory Tasks
How should this be tested?
In order to test this org routing approach, you must run the app using a local domain e.g. http://app.cal.local:3000
/settings/organizations/newto create the organization, owner user, teams and send invites to org members.acme.cal.local.http://[your-org-slug].cal.local/the org profile page should be displayed.http://[your-org-slug].cal.local/[your-team-slug]the team profile page should be displayedhttp://[your-org-slug].cal.local/[org-user-slug]the user profile page should be displayed.http://[your-org-slug].cal.local/proyou should get 404 error.http://app.cal.local/[org-user-slug]you should get 404 error.