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: Overlay Calendar v2 and Troubleshooter v2 #14575

Closed
wants to merge 22 commits into from

Conversation

kart1ka
Copy link
Contributor

@kart1ka kart1ka commented Apr 14, 2024

What does this PR do?

  • This PR currently only fetches event titles for Google Calendar.
  • This PR allows users to use Overlay Calendar feature by signing in using their Google Account.
  • It also pulls actual event title from the google calendar instead of just showing "Busy" for both overlay calendar and troubleshooter.
  • This feature upgrade does not need any Google scope changes.

Fixes #12763
Fixes #12752

Overlay Calendar v2
https://www.loom.com/share/8e3889f4f7034596adb2bfdc640cba11?sid=7242ef08-ef5e-4b9a-a102-c19eded1d882

Troubleshooter v2
https://www.loom.com/share/8024891797574a748b99c3c40979398c?sid=248174de-8abe-4fd3-a42e-c9146b86ddf1

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update:
    • Under Authorized redirect URI's in google cloud add the URI: <Cal.com URL>/api/auth/callback/google-for-overlay
      replacing Cal.com URL with the URI at which your application runs.

How should this be tested?

  • Please make sure to obtain google cloud API Credentials as mentioned here.
  • No new scopes required.
  • Edit the credential in the google cloud.
  • Under Authorized redirect URI's in google cloud add the URI: <Cal.com URL>/api/auth/callback/google-for-overlay
    replacing Cal.com URL with the URI at which your application runs.

Testing Overlay Calendar v2

  • Just go to a booking page and toggle the Overlay Calendar switch.
  • Choose Continue with Google and sign in with a google id.
  • You will see that now event titles are being displayed instead of just "Busy" for the calendar busy events.

Testing Troubleshooter v2

  • Just go to the Troubleshooter and make sure that google calendar is connected and the app is checking google calendar for conflicts.
  • You will see that now event titles are being displayed instead of just "Busy" for the calendar busy events.

Mandatory Tasks

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

Copy link

vercel bot commented Apr 14, 2024

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

A member of the Team first needs to authorize it.

Copy link
Contributor

github-actions bot commented Apr 14, 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 booking-page area: booking page, public booking page, booker Medium priority Created by Linear-GitHub Sync 🧹 Improvements Improvements to existing features. Mostly UX/UI ❗️ migrations contains migration files and removed 🧹 Improvements Improvements to existing features. Mostly UX/UI Medium priority Created by Linear-GitHub Sync booking-page area: booking page, public booking page, booker labels Apr 14, 2024
Copy link
Contributor

github-actions bot commented Apr 14, 2024

📦 Next.js Bundle Analysis for @calcom/web

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

This PR introduced no changes to the JavaScript bundle! 🙌

@github-actions github-actions bot added booking-page area: booking page, public booking page, booker Medium priority Created by Linear-GitHub Sync 🧹 Improvements Improvements to existing features. Mostly UX/UI labels Apr 14, 2024
Copy link
Member

@sean-brydon sean-brydon left a comment

Choose a reason for hiding this comment

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

Hi - awesome work on this.

However, we do not wish to have a new OOauth provider and wish to use our current google sign in implementation. We should continue to stick with our user model and not this new OverlayUser model. If you signup with google for the first time here we should create a normal cal.com user.

This was on my task list for this week so let me know if you want me to take this over. Thank you very much for your contribution.

@sean-brydon
Copy link
Member

Hi - awesome work on this.

However, we do not wish to have a new OOauth provider and wish to use our current google sign in implementation. We should continue to stick with our user model and not this new OverlayUser model. If you signup with google for the first time here we should create a normal cal.com user.

This was on my task list for this week so let me know if you want me to take this over. Thank you very much for your contribution.

On top of this we need to ensure we are re-using all the code we already have for users and credentials instead of implementing it from scratch for this single feature.

@kart1ka
Copy link
Contributor Author

kart1ka commented Apr 15, 2024

Hi - awesome work on this.

However, we do not wish to have a new OOauth provider and wish to use our current google sign in implementation. We should continue to stick with our user model and not this new OverlayUser model. If you signup with google for the first time here we should create a normal cal.com user.

This was on my task list for this week so let me know if you want me to take this over. Thank you very much for your contribution.

Hi @sean-brydon. Thanks for the review.

I have a couple of questions:

  1. When we use the current google sign in implementation, after the user signs in do we just show the "Connect Your Calendar" page (see below) and once the user connects the google calendar we redirect them back to the booking page?
    Screenshot from 2024-04-15 17-26-44

  2. In the "Connect Your calendar" page, do we let users connect only their google calendar or other calendar as well just like in the normal sign up process?

  3. Regarding using the existing User model, Do you expect other providers to be added for Overlay Calendar because they do not exist for normal cal.com sign up?

@dosubot dosubot bot added this to the v4.1 milestone Apr 15, 2024
@sean-brydon
Copy link
Member

Hi - awesome work on this.
However, we do not wish to have a new OOauth provider and wish to use our current google sign in implementation. We should continue to stick with our user model and not this new OverlayUser model. If you signup with google for the first time here we should create a normal cal.com user.
This was on my task list for this week so let me know if you want me to take this over. Thank you very much for your contribution.

Hi @sean-brydon. Thanks for the review.

I have a couple of questions:

  1. When we use the current google sign in implementation, after the user signs in do we just show the "Connect Your Calendar" page (see below) and once the user connects the google calendar we redirect them back to the booking page?
  • Yes i think we can actually auto signup with the button on the overlay calendar -> you click continue with google we auto signup and connect the calendar - we can skip the onboarding until the user actually uses the app.
  1. In the "Connect Your calendar" page, do we let users connect only their google calendar or other calendar as well just like in the normal sign up process?
    Yes - if we can't auto sign up we can go with this approach

  2. Regarding using the existing User model, Do you expect other providers to be added for Overlay Calendar because they do not exist for normal cal.com sign up?

  • We only have the ones on the figma file planned however, other calendar providers will still work (ideally)

Please reachout if you have any questions on here on in discord. Happy to help!

@kart1ka
Copy link
Contributor Author

kart1ka commented Apr 15, 2024

Thanks. I will get on it. I will let you know if I have any other questions.

@dosubot dosubot bot modified the milestones: v4.1, v4.2 Apr 16, 2024
@kart1ka
Copy link
Contributor Author

kart1ka commented Apr 22, 2024

Raised a new PR with requested changes as per the review.
PR #14693

@sean-brydon
Copy link
Member

Will close this in favour of the second PR you have created <3

@dosubot dosubot bot modified the milestones: v4.2, v4.1 May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
booking-page area: booking page, public booking page, booker 🧹 Improvements Improvements to existing features. Mostly UX/UI Medium priority Created by Linear-GitHub Sync ❗️ migrations contains migration files
Projects
None yet
2 participants