fix: Routing Form and other org related fixes#10320
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Thank you for following the naming conventions! 🙏 |
|
🤖 Meticulous spotted visual differences in 41 of 234 screens tested: view and approve differences detected. Last updated for commit 1be908f. This comment will update as new commits are pushed. |
| <Link href={`${CAL_URL}/${profile.slug}`} className="text-subtle block text-xs"> | ||
| {orgBranding | ||
| ? `${orgBranding.fullDomain.replace("https://", "").replace("http://", "")}${profile.slug}` | ||
| ? `${orgBranding.fullDomain.replace("https://", "").replace("http://", "")}/${profile.slug}` |
There was a problem hiding this comment.
Because fullDomain doesn't have an ending slash now, we need to add it manually here. this is now consistent with WEBAPP and CAL_URL
📦 Next.js Bundle Analysis for @calcom/webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
Current Playwright Test Results Summary✅ 96 Passing - ❌ 1 Failing - Run may still be in progress, this comment will be updated as current testing workflow or job completes... (Last updated on 07/24/2023 08:32:10pm UTC) Run DetailsRunning Workflow PR Update on Github Actions Commit: 1be908f Started: 07/24/2023 08:28:33pm UTC ❌ Failures📄 packages/embeds/embed-core/playwright/tests/embed-pages.e2e.ts • 1 FailureTest Case Results
|
|
|
2 Test Cases Affected |
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Manage Booking Questions For User EventType Do a booking with a user added question and verify a few thing in b/w
Retry 1 • Initial Attempt |
1.82% (6)6 / 329 runsfailed over last 7 days |
1.52% (5)5 / 329 runsflaked over last 7 days |
|
Manage Booking Questions For Team EventType Do a booking with a user added question and verify a few thing in b/w
Retry 1 • Initial Attempt |
1.82% (6)6 / 329 runsfailed over last 7 days |
1.22% (4)4 / 329 runsflaked over last 7 days |
📄 packages/embeds/embed-core/playwright/tests/action-based.e2e.ts • 1 Flake
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Popup Tests should be able to reschedule
Retry 1 • Initial Attempt |
1.63% (3)3 / 184 runsfailed over last 7 days |
97.28% (179)179 / 184 runsflaked over last 7 days |
📄 apps/web/playwright/webhook.e2e.ts • 1 Flake
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
FORM_SUBMITTED can submit a form and get a submission event
Retry 1 • Initial Attempt |
0.62% (2)2 / 325 runsfailed over last 7 days |
3.69% (12)12 / 325 runsflaked over last 7 days |
| {orgBranding | ||
| ? `${orgBranding.fullDomain.replace("https://", "").replace("http://", "")}${profile.slug}` | ||
| : `${CAL_URL?.replace("https://", "").replace("http://", "")}/${profile.slug}`} | ||
| {`${bookerUrl.replace("https://", "").replace("http://", "")}/${profile.slug}`} |
There was a problem hiding this comment.
Because fullDomain doesn't have an ending slash now which is consistent with WEBAPP and CAL_URL. We can simplify the logic using bookerUrl
| const form = await prisma.app_RoutingForms_Form.findUnique({ | ||
| const { currentOrgDomain, isValidOrgDomain } = orgDomainConfig(context.req.headers.host ?? ""); | ||
|
|
||
| const form = await prisma.app_RoutingForms_Form.findFirst({ |
There was a problem hiding this comment.
Changed to findFirst because you can have user has in where clause for findUnique
| export function getOrgFullDomain(slug: string, options: { protocol: boolean } = { protocol: true }) { | ||
| // TODO: It is a replacement for WEBAPP_URL and that doesn't have / in the end. Remove / after ensuring that it works reliably everywhere | ||
| return `${options.protocol ? `${new URL(WEBAPP_URL).protocol}//` : ""}${slug}.${subdomainSuffix()}/`; | ||
| return `${options.protocol ? `${new URL(WEBAPP_URL).protocol}//` : ""}${slug}.${subdomainSuffix()}`; |
There was a problem hiding this comment.
Comment has the reason why this change was made.
| <Button | ||
| target="_blank" | ||
| href={"/" + props.member.username} | ||
| href={`${bookerUrl}/${props.member.username}`} |
There was a problem hiding this comment.
This link would have given 404 for org member.
| export const useBookerUrl = () => { | ||
| const orgBranding = useOrgBranding(); | ||
| return orgBranding?.fullDomain ?? WEBAPP_URL; | ||
| return orgBranding?.fullDomain ?? CAL_URL ?? WEBAPP_URL; |
There was a problem hiding this comment.
Prefer CAL_URL for public links, if not available , go for WEBAPP_URL.
leog
left a comment
There was a problem hiding this comment.
Looks good to me, thank you for taking care of this @hariombalhara.
Co-authored-by: Leo Giovanetti <hello@leog.me>
Co-authored-by: Leo Giovanetti <hello@leog.me>
What does this PR do?
Fixes #9821 by fixing the last pending item

/routerand/forms/{FORMID}) org context awareType of change
How should this be tested?
Mandatory Tasks
Checklist