Skip to content

feat: add instant meeting parameter#17647

Merged
Udit-takkar merged 7 commits intomainfrom
feat/instant-meeting-parameter
Nov 18, 2024
Merged

feat: add instant meeting parameter#17647
Udit-takkar merged 7 commits intomainfrom
feat/instant-meeting-parameter

Conversation

@Udit-takkar
Copy link
Copy Markdown
Contributor

@Udit-takkar Udit-takkar commented Nov 14, 2024

What does this PR do?

Screenshot 2024-11-15 at 6 08 16 PM

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • N/A I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • N/A I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

  1. Create a team org event types
  2. Enabled instant bookings and add a parameter value and click save
  3. Go to booking page and you should only see the modal when all parameter values are present

@vercel
Copy link
Copy Markdown

vercel Bot commented Nov 14, 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 Nov 18, 2024 9:11am
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview Nov 18, 2024 9:11am

@github-actions github-actions Bot added the ❗️ migrations contains migration files label Nov 14, 2024
@keithwillcode keithwillcode added core area: core, team members only enterprise area: enterprise, audit log, organisation, SAML, SSO labels Nov 14, 2024
@linear
Copy link
Copy Markdown

linear Bot commented Nov 15, 2024

@Udit-takkar Udit-takkar marked this pull request as ready for review November 15, 2024 12:13
@graphite-app graphite-app Bot requested a review from a team November 15, 2024 12:13
@Udit-takkar Udit-takkar added this to the v4.7 milestone Nov 15, 2024
@dosubot dosubot Bot added the ✨ feature New feature or request label Nov 15, 2024
@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented Nov 15, 2024

Graphite Automations

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

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

"Add ready-for-e2e label" took an action on this PR • (11/18/24)

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

Comment on lines +72 to +77
const searchParams = useSearchParams();

const areInstantMeetingParametersSet = !!event.data?.instantMeetingParameters
? event.data.instantMeetingParameters.every((param) => Array.from(searchParams.values()).includes(param))
: true;

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.

if there are instantMeetingParameters then all of them should be present

Comment on lines +179 to +181
<div>
<Label>{t("only_show_if_parameter_set")}</Label>
<div className="space-y-2">
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.

In the next iteration i would be refactoring it to something like this

Screenshot 2024-11-15 at 5 47 26 PM

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

#17361 Something similar is achieved here.

@github-actions github-actions Bot added the High priority Created by Linear-GitHub Sync label Nov 15, 2024
Comment on lines +79 to +82
const [parameters, setParameters] = useState<string[]>(
formMethods.getValues("instantMeetingParameters") || []
);

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.

I tried using useFieldArray but it had some issues and type errors

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What were the issues?

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.

  • It was splitting the string to object like { 1: "I", 2: "N" , 3 :"D" }.

and it's mentioned in the docs that useFieldArray doesn't support flat field arrays.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🫠

Copy link
Copy Markdown
Member

@alishaz-polymath alishaz-polymath left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@github-actions
Copy link
Copy Markdown
Contributor

E2E results are ready!

@Udit-takkar Udit-takkar merged commit 0f3773d into main Nov 18, 2024
@Udit-takkar Udit-takkar deleted the feat/instant-meeting-parameter branch November 18, 2024 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core area: core, team members only enterprise area: enterprise, audit log, organisation, SAML, SSO ✨ feature New feature or request High priority Created by Linear-GitHub Sync ❗️ migrations contains migration files ready-for-e2e

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CAL-4734] Show instant meeting modal when params are set

3 participants