Skip to content
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

feat: Add {first name} variable to Organizer & Scheduler custom event… #14156

Merged

Conversation

Amit91848
Copy link
Contributor

What does this PR do?

Fixes #13974

Screen.Recording.2024-03-20.at.7.05.00.PM.mov

Type of change

  • New feature (non-breaking change which adds functionality)

Mandatory Tasks

  • Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected.

@graphite-app graphite-app bot requested a review from a team March 20, 2024 13:41
Copy link

vercel bot commented Mar 20, 2024

@Amit91848 is attempting to deploy a commit to the cal Team on Vercel.

A member of the Team first needs to authorize it.

@graphite-app graphite-app bot added the community Created by Linear-GitHub Sync label Mar 20, 2024
Copy link
Contributor

github-actions bot commented Mar 20, 2024

Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link.

@github-actions github-actions bot added event-types area: event types, event-types Low priority Created by Linear-GitHub Sync ✨ feature New feature or request labels Mar 20, 2024
Copy link

graphite-app bot commented Mar 20, 2024

Graphite Automations

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

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

"Add community label" took an action on this PR • (03/20/24)

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

Copy link
Contributor

github-actions bot commented Mar 20, 2024

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

New Pages Added

The following pages were added to the bundle from the code in this PR:

Page Size (compressed) First Load % of Budget (350 KB)
/settings/organizations/platform/oauth-clients 264.75 KB 493.32 KB 140.95%
/settings/organizations/platform/oauth-clients/create 264.93 KB 493.5 KB 141.00%

Thirteen 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)
/availability 464.73 KB 693.3 KB 198.09% (🟡 +10.59%)
/event-types/[type] 435.7 KB 664.27 KB 189.79% (🟢 -0.16%)
/settings/admin/lockedSMS/UsersTable 78.89 KB 307.46 KB 87.85% (🟢 -0.18%)
/settings/admin/lockedSMS/lockedSMSView 118.56 KB 347.13 KB 99.18% (🟢 -0.20%)
/settings/admin/oAuth/oAuthView 94.97 KB 323.54 KB 92.44% (🟢 -0.19%)
/settings/admin/orgMigrations/_OrgMigrationLayout 250.58 KB 479.16 KB 136.90% (🟢 -0.18%)
/settings/organizations/[id]/about 155.73 KB 384.3 KB 109.80% (🟢 -0.53%)
/settings/organizations/[id]/add-teams 155.72 KB 384.29 KB 109.80% (🟢 -0.53%)
/settings/organizations/dsync 331.47 KB 560.04 KB 160.01% (🟡 +10.54%)
/settings/organizations/members 430.56 KB 659.13 KB 188.32% (🟡 +8.75%)
/settings/organizations/new 155.74 KB 384.31 KB 109.80% (🟢 -0.53%)
/settings/organizations/teams/other/[id]/profile 468.65 KB 697.22 KB 199.21% (🟢 -0.19%)
/settings/teams/[id]/profile 469.48 KB 698.05 KB 199.44% (🟢 -0.18%)
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 "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.

@Udit-takkar Udit-takkar added this to the v4.0 milestone Mar 22, 2024
@keithwillcode keithwillcode modified the milestones: v4.0, v4.1 Apr 15, 2024
Copy link
Member

@CarinaWolli CarinaWolli left a comment

Choose a reason for hiding this comment

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

Like mentioned in the issue, this should use the first name when split name is enabled.

Split name can be enabled in, Booking questions -> Advanced -> Booking question -> Edit name:
Screenshot 2024-04-19 at 5 21 17 PM

We should add {Scheduler first name} and {Scheduler last name} and use the values from the booking question

@CarinaWolli CarinaWolli marked this pull request as draft April 19, 2024 21:25
@Amit91848
Copy link
Contributor Author

Should we only show those variables when split full name is checked? Or should we add some helper text that it will only work when you have set it to true?

@CarinaWolli
Copy link
Member

Should we only show those variables when split full name is checked? Or should we add some helper text that it will only work when you have set it to true?

It would be best to only show them if split name is enabled

@Amit91848
Copy link
Contributor Author

Made changes @CarinaWolli. Also the issue was closed, is this still relevant?

@Amit91848 Amit91848 marked this pull request as ready for review April 27, 2024 07:15
@dosubot dosubot bot added core area: core, team members only ui area: UI, frontend, button, form, input labels Apr 27, 2024
@dosubot dosubot bot removed this from the v4.1 milestone Apr 29, 2024
@CarinaWolli
Copy link
Member

I reopened the issue, I think it's still nice to have

@keithwillcode keithwillcode added this to the v4.1 milestone May 8, 2024
packages/core/event.ts Outdated Show resolved Hide resolved
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
@keithwillcode keithwillcode modified the milestones: v4.1, v4.2 May 15, 2024
Udit-takkar
Udit-takkar previously approved these changes May 24, 2024
Copy link
Contributor

@Udit-takkar Udit-takkar left a comment

Choose a reason for hiding this comment

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

LGTM. pushed some changes.

@@ -105,6 +113,8 @@ export const validateCustomEventName = (
"{Organiser}",
"{Scheduler}",
"{Location}",
"{Organiser first name}",
Copy link
Member

Choose a reason for hiding this comment

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

as mentioned in #14156 (review), we wanted {Scheduler first name} and {Scheduler last name}

But you can leave {Organiser first name}, that's fine

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The issue stated first name, which is why I did not include last name. I will make changes to it. 

Copy link
Member

@CarinaWolli CarinaWolli left a comment

Choose a reason for hiding this comment

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

See comment #14156 (comment)

Copy link
Member

@CarinaWolli CarinaWolli left a comment

Choose a reason for hiding this comment

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

Nice work, looks good 👏🏻

@CarinaWolli CarinaWolli added this pull request to the merge queue May 28, 2024
Merged via the queue into calcom:main with commit 889ff17 May 28, 2024
16 of 23 checks passed
p6l-richard pushed a commit to p6l-richard/cal.com-fork that referenced this pull request Jul 22, 2024
calcom#14156)

* feat: Add {first name} variable to Organizer & Scheduler custom event name

* fix: use split name booking field

* remove unwanted translation changes

* Update packages/core/event.ts

Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>

* chore: improve code

* add scheduler last name

---------

Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
Co-authored-by: Udit Takkar <udit222001@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Created by Linear-GitHub Sync core area: core, team members only event-types area: event types, event-types ✨ feature New feature or request Low priority Created by Linear-GitHub Sync ui area: UI, frontend, button, form, input
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CAL-3302] [CAL-3258] Add {first name} variable to Organizer & Scheduler custom event name
4 participants