-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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: removed the confirm step in creating bookings #18380
base: main
Are you sure you want to change the base?
Conversation
@theVedanta is attempting to deploy a commit to the cal Team on Vercel. A member of the Team first needs to authorize it. |
Hey there and thank you for opening this pull request! 👋🏼 We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted. Details:
|
Graphite Automations"Add consumer team as reviewer" took an action on this PR • (12/27/24)1 reviewer was added to this PR based on Keith Williams's automation. "Add foundation team as reviewer" took an action on this PR • (12/27/24)1 reviewer was added to this PR based on Keith Williams's automation. "Add community label" took an action on this PR • (12/27/24)1 label was added to this PR based on Keith Williams's automation. |
also can you please add a loom recording of the fix @theVedanta 🙏 ? |
I've added it in the first comment or the PR description. |
Alright, thanks! One thing I wanted to ask is, if someone accidentally clicks the button, it’ll immediately book the meeting. I think it would be better to have a confirmation dialog box or something similar to prevent this. |
This has been discussed in the GitHub issue before. Please check the issue once and let me know if a dialog box is required. |
yeah, got the answer, thank you 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have a test case for this feature @theVedanta?
Sure, can you please provide some context and more information on how you want the tescases generaeted? |
We need to test it on a variety of events, ensuring the behavior is expected for all events. |
@@ -95,7 +95,10 @@ export const BookEventForm = ({ | |||
// still change the timeslot, and comes back to the form, all their values | |||
// still exist. This gets cleared when the form is submitted. | |||
const values = bookingForm.getValues(); | |||
setFormValues(values); | |||
|
|||
if (JSON.stringify(values) !== JSON.stringify(bookingData)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does it do? Doesn't seem like the correct approach.
The comparison is sensitive to irrelevant changes like property order or case, leading to unexpected form behavior
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh ok I will correct this then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this addressed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is fixed
@theVedanta needs confirmation on skipping the Booking Form as well here cc @CarinaWolli I think we should skip the form and the loader should be the there on the slot itself. Also @theVedanta, keep in mind that users can configure custom booking questions under Advanced section of the event and mark some of them required. We would be able to submit the slot directly only if all required fields have the data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments
I understand. I will make some changes soon, let me know if they are ok according to the tests. |
correct we only skip the "confirm" step if all required inputs are prefilled maybe even if all inputs are prefilled, no? not only required but also the optional ones |
E2E results are ready! |
…e updates and maximum limit is reached)
…eVedanta/cal.com into remove-confirm-before-booking
@PeerRich @Praashh @hariombalhara @CarinaWolli @keithwillcode I have made a change to the PR. Now, it checks for every field being filled in the form based on URL-Params. I can't figure out however, why the "maximum update depth reached" error occurs. This is what I mean with the help of an example: Can you please help me figure out the cause and potential fixes for this? This is my first PR and I'm not very familiar with the workspace, so your help would be highly appreciated. |
Also, I have fixed the JSON.stringify comparison which was not necessary |
What does this PR do?
Removed the confirm step changes in this PR because as I see it, once the URL params are passed and checked in the useEffect, the booking state is changed, where I've replaced it with the handleEventBooking();
Mandatory Tasks (DO NOT REMOVE)
LOOM LINK: https://www.loom.com/share/2967cdb902fb4945908e17c79bb379b8?sid=88459728-1b9e-46e9-af1a-9168cd8cc0cc
How should this be tested?
You can start by creating event types with varying complexity and check if any URL params are conflicting this direct booking without confirmation.
No ENV vars required to test.