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

chore: Overlay calendar - enabled by default if supported calendar installed #15500

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

anikdhabal
Copy link
Contributor

@anikdhabal anikdhabal commented Jun 19, 2024

What does this PR do?

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected)
  • I have added a Docs issue here if this PR makes changes that would require a documentation change
  • I have added or modified automated tests that prove my fix is effective or that my feature works (PRs might be rejected if logical changes are not properly tested)

How should this be tested?

  • Are there environment variables that should be set?
  • What are the minimal test data to have?
  • What is expected (happy path) to have (input and output)?
  • Any other important info that could help to test that PR

Checklist

  • I haven't read the contributing guide
  • My code doesn't follow the style guidelines of this project
  • I haven't commented my code, particularly in hard-to-understand areas
  • I haven't checked if my changes generate no new warnings

Copy link

vercel bot commented Jun 19, 2024

@anikdhabal 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 Jun 19, 2024
@graphite-app graphite-app bot requested a review from a team June 19, 2024 18:20
@dosubot dosubot bot added this to the v4.4 milestone Jun 19, 2024
@github-actions github-actions bot added booking-page area: booking page, public booking page, booker calendar-apps area: calendar, google calendar, outlook, lark, microsoft 365, apple calendar Medium priority Created by Linear-GitHub Sync 🧹 Improvements Improvements to existing features. Mostly UX/UI labels Jun 19, 2024
@dosubot dosubot bot added the bookings area: bookings, availability, timezones, double booking label Jun 19, 2024
Copy link

graphite-app bot commented Jun 19, 2024

Graphite Automations

"Add community label" took an action on this PR • (06/19/24)

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

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

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

@@ -140,7 +144,16 @@ const BookerComponent = ({
scrolledToTimeslotsOnce.current = true;
}
};

useEffect(() => {
if (connectedCalendars.length > 0 && hasSession) {
Copy link
Contributor

Choose a reason for hiding this comment

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

'connectedCalendars' are passed by the 'calendars' prop, which is passed to 'Booker' by the 'BookerWebWrapper', which gets the 'calendars' using 'useCalendars' hook.

However, if we check 'useCalendars' hook, then fetching connected calendars is enabled only if the setting is set in state or 'overlayCalendar' exists as search param:

const { data, isPending } = trpc.viewer.connectedCalendars.useQuery(undefined, {
    enabled: !!calendarSettingsOverlay || Boolean(searchParams?.get("overlayCalendar")),
  });

But the newly added useEffect only sets 'overlayCalendar' to true, if there are connected calendars, so we have a closed circle - I tried testing this PR and even though I have connected a calendar visiting someone's booking page did nothing.

@keithwillcode keithwillcode added the community-interns The team responsible for reviewing, testing and shipping low/medium community PRs label Jun 27, 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 bookings area: bookings, availability, timezones, double booking calendar-apps area: calendar, google calendar, outlook, lark, microsoft 365, apple calendar community Created by Linear-GitHub Sync community-interns The team responsible for reviewing, testing and shipping low/medium community PRs 🧹 Improvements Improvements to existing features. Mostly UX/UI Medium priority Created by Linear-GitHub Sync
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CAL-3675] Overlay calendar - enabled by default if supported calendar is installed
3 participants