cal.com
cal.com copied to clipboard
Feature/ `firstAndLastName` variant for name field
What does this PR do?
Fixes #5784
- Adds 2 variants to name type of booking Question.
fullName-> Default for all existing Event Types and any new one that is being created.firstAndLastName-> Adds the fields in same row on booking page.
Changes in Prefill Params
nameparam can still be used to prefillfullNamevariant and thus there would be no change required to prefill all existing event-types' and any new event-types' booking pages by default. So the format would remain asname=John Doe- To be very specific
fullNamevariant can also be filled asname={"fullName": "John Doe"}
- To be very specific
- If
firstAndLastNamevariant is chosen then the two fields can be prefilled asname={"firstName":"John", "lastName": "Doe"}
Changes in Webhook data
All listeners on webhooks for an existing event type would not have any change in data as those event-types would be using fullName variant which is the default.
ForfirstAndLastName variant the format would be{"label":"your_name","value":{"firstName":"ABC","lastName":"DEF"}
Changes in Emails
As expected there would be no changes in the case of fullName variant in terms of how and what is shown for User name.
For the firstAndLastName variant, the attendee.name is stored as ${firstName} ${lastName} and thus email would also mention the name as the concatenation of two parts of the name.
TODO
- [] Make a separate PR(and get that merged first) that allows the new variant kind of response ie.
z.record(z.string()). It would allow a possible revert to not break event-types - [x] Test the entire flow thoroughly
- [ ] Record a Loom
- [ ] Verify designs with Figma
- [x] PR Review and work on TODOs
- [x] Write a test for firstAndLastName variant
- [x] Verify reschedule flow for existing bookings which switch to firstName and lastName variant later.
- [ ] New Booker same tests.
Environment: Production
Type of change
- [x] New feature (non-breaking change which adds functionality)
How should this be tested?
- [ ] Test A
- [ ] Test B
Checklist
- I haven't added tests that prove my fix is effective or that my feature works
CAL-718 Ability to collect First Name and Last Name inputs separately
We are facing an issue with Name input collecting both First and Last name in one field.
In our database, first and last name are stored as separate attributes and used actively in email/SMS communication. And there is no good way to automatically split the full name into first and last names. This is especially challenging in locations where second names are commonly used.
We would like to be able to collect First and Last names as separate inputs. Ideally, we would like to be able to control all Inputs in a separate section of Event settings.
Tagging alishaz-polymath since we discussed this on a call today :) I, unfortunately, can't add labels to the issue.
Sharing a few screenshots from the previous booking solution that we used:
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| cal | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | May 4, 2023 0:35am |
| ui | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | May 4, 2023 0:35am |
| web | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | May 4, 2023 0:35am |
📦 Next.js Bundle Analysis for @calcom/web
This analysis was generated by the Next.js Bundle Analysis action. 🤖
Twenty-eight Pages Changed Size
The following pages changed size from the code in this PR compared to its base branch:
| Page | Size (compressed) | First Load | % of Budget (350 KB) |
|---|---|---|---|
/[user] |
136.51 KB |
286.98 KB | 82.00% (🟡 +0.36%) |
/[user]/[type] |
184.47 KB |
334.94 KB | 95.70% (🟡 +0.33%) |
/[user]/[type]/embed |
184.5 KB |
334.97 KB | 95.71% (🟡 +0.33%) |
/[user]/book |
256.13 KB |
406.6 KB | 116.17% (🟡 +0.73%) |
/[user]/embed |
136.57 KB |
287.05 KB | 82.01% (🟡 +0.37%) |
/apps/[slug]/[...pages] |
456.8 KB |
607.27 KB | 173.51% (🟡 +0.34%) |
/availability/[schedule] |
298.65 KB |
449.13 KB | 128.32% (🟢 -9.11%) |
/booking/[uid] |
216.62 KB |
367.1 KB | 104.89% (🟡 +0.36%) |
/bookings/[status] |
340.06 KB |
490.54 KB | 140.15% (🟡 +0.35%) |
/d/[link]/[slug] |
184.11 KB |
334.59 KB | 95.60% (🟡 +0.33%) |
/d/[link]/[slug]/embed |
184.14 KB |
334.62 KB | 95.61% (🟡 +0.33%) |
/d/[link]/book |
255.77 KB |
406.25 KB | 116.07% (🟡 +0.73%) |
/event-types |
417.13 KB |
567.6 KB | 162.17% (🟡 +0.34%) |
/event-types/[type] |
453.11 KB |
603.59 KB | 172.45% (🟡 +0.69%) |
/getting-started/[[...step]] |
382.55 KB |
533.02 KB | 152.29% (🟢 -9.09%) |
/new-booker/[user]/[type] |
287.47 KB |
437.95 KB | 125.13% (🟡 +0.70%) |
/new-booker/team/[slug]/[type] |
287.48 KB |
437.95 KB | 125.13% (🟡 +0.71%) |
/settings/admin/users/[id]/edit |
301.31 KB |
451.78 KB | 129.08% (🟢 -8.74%) |
/settings/admin/users/add |
300.98 KB |
451.46 KB | 128.99% (🟢 -8.75%) |
/settings/my-account/general |
293.6 KB |
444.08 KB | 126.88% (🟢 -9.09%) |
/settings/security/password |
257.14 KB |
407.62 KB | 116.46% (🟡 +0.35%) |
/settings/teams/[id]/members |
325 KB |
475.48 KB | 135.85% (🟢 -9.09%) |
/team/[slug] |
156.59 KB |
307.07 KB | 87.73% (🟡 +0.35%) |
/team/[slug]/[type] |
184.11 KB |
334.59 KB | 95.60% (🟡 +0.33%) |
/team/[slug]/[type]/embed |
184.14 KB |
334.62 KB | 95.61% (🟡 +0.33%) |
/team/[slug]/book |
255.78 KB |
406.25 KB | 116.07% (🟡 +0.73%) |
/team/[slug]/embed |
156.66 KB |
307.14 KB | 87.75% (🟡 +0.35%) |
/workflows/[workflow] |
358.9 KB |
509.38 KB | 145.54% (🟡 +0.34%) |
Details
Only the gzipped size is provided here based on an expert tip.
First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.
Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis
The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/-
Current Playwright Test Results Summary
✅ 75 Passing - ⚠️ 2 Flaky
Run may still be in progress, this comment will be updated as current testing workflow or job completes...
(Last updated on 05/04/2023 12:45:32pm UTC)
Run Details
Running Workflow PR Update on Github Actions
Commit: 75bb4e312c26fd64ecfe271ea6bb6388d043841f
Started: 05/04/2023 12:40:29pm UTC
⚠️ Flakes
📄 packages/app-store/routing-forms/playwright/tests/basic.e2e.ts • 1 Flake
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Routing Forms Seeded Routing Form Routing Link - Reporting and CSV Download
Retry 1 • Initial Attempt |
5.93% (8)8 / 135 runsfailed over last 7 days |
5.19% (7)7 / 135 runsflaked over last 7 days |
📄 packages/embeds/embed-core/playwright/tests/action-based.test.ts • 1 Flake
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Popup Tests should be able to reschedule
Retry 2 • Retry 1 • Initial Attempt |
16.67% (21)21 / 126 runsfailed over last 7 days |
58.73% (74)74 / 126 runsflaked over last 7 days |
📦 Next.js Bundle Analysis for @calcom/web
This analysis was generated by the Next.js Bundle Analysis action. 🤖
Two Pages Changed Size
The following pages changed size from the code in this PR compared to its base branch:
| Page | Size (compressed) | First Load | % of Budget (350 KB) |
|---|---|---|---|
/auth/setup |
82.15 KB |
313.19 KB | 89.48% (🟡 +0.19%) |
/event-types/[type] |
385.99 KB |
617.03 KB | 176.29% (🟡 +0.28%) |
Details
Only the gzipped size is provided here based on an expert tip.
First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.
Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis
The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/-