-
Notifications
You must be signed in to change notification settings - Fork 11.3k
feat: Add public OOO notes display on booking pages #25471
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 public OOO notes display on booking pages #25471
Conversation
|
@dhairyashiil is attempting to deploy a commit to the cal Team on Vercel. A member of the Team first needs to authorize it. |
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.
2 issues found across 16 files
Prompt for AI agents (all 2 issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="packages/features/availability/lib/getUserAvailability.ts">
<violation number="1" location="packages/features/availability/lib/getUserAvailability.ts:650">
`notes` should only be included in the availability payload when `showNotePublicly` is true; otherwise private notes are leaked to the client despite the privacy toggle.</violation>
</file>
<file name="packages/features/bookings/Booker/components/AvailableTimeSlots.tsx">
<violation number="1" location="packages/features/bookings/Booker/components/AvailableTimeSlots.tsx:196">
`isOOODay` only inspects the first slot, so the time-format toggle disappears even when later slots are bookable on partially OOO days.</violation>
</file>
Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR
…rough client-side payloads
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.
1 issue found across 16 files
Prompt for AI agents (all 1 issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="packages/trpc/server/routers/viewer/ooo/outOfOfficeCreateOrUpdate.handler.ts">
<violation number="1" location="packages/trpc/server/routers/viewer/ooo/outOfOfficeCreateOrUpdate.handler.ts:182">
Updating an existing OOO entry without explicitly providing `showNotePublicly` now forces the value back to `false`, so public notes are unintentionally hidden whenever older clients submit updates that omit the new field. Preserve the prior value instead of defaulting to `false` during updates.</violation>
</file>
Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR
packages/trpc/server/routers/viewer/ooo/outOfOfficeCreateOrUpdate.handler.ts
Show resolved
Hide resolved
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.
- Replace Switch with Checkbox for "show note publicly" option - Remove "OOO Message:" prefix from displayed notes on booking page - Update i18n text to "Show note on public booking page" - Remove unused ooo_message i18n key
|
done @CarinaWolli , here is the updated video (also shown the case where this work when there is no redirect) Screen.Recording.2025-12-10.at.11.12.52.PM.mov |
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.
1 issue found across 16 files
Prompt for AI agents (all 1 issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="packages/features/settings/outOfOffice/CreateOrEditOutOfOfficeModal.tsx">
<violation number="1" location="packages/features/settings/outOfOffice/CreateOrEditOutOfOfficeModal.tsx:361">
P2: Accessibility issue: The `<label>` element uses `onClick` instead of proper `htmlFor` association. Screen readers won't announce the relationship between the label and checkbox. Consider adding an `id` to the Checkbox and using `htmlFor` on the label, or use the `CheckboxField` component which has built-in label support.</violation>
</file>
Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR
packages/features/settings/outOfOffice/CreateOrEditOutOfOfficeModal.tsx
Outdated
Show resolved
Hide resolved
|
|
||
| const disabled = away ? !oooInfo?.toUser : isNextMonth ? !hasAvailableSlots : !included || excluded; | ||
| // Allow selecting OOO dates even without redirect - they'll see the OOO message | ||
| const disabled = away ? false : isNextMonth ? !hasAvailableSlots : !included || excluded; |
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.
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.
done
Screen.Recording.2025-12-11.at.2.33.43.PM.mov
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.
No issues found across 16 files
CarinaWolli
left a comment
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.
Nice work, looks great 👏🏻
emrysal
left a comment
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.
Approved!
Video:
Screen.Recording.2025-11-29.at.10.00.57.PM.mov
Screen.Recording.2025-11-29.at.10.00.57.PM.mov
Screen.Recording.2025-11-29.at.10.04.31.PM.mov
Screen.Recording.2025-11-29.at.10.56.30.PM.mov
What does this PR do?
Adds the ability to display Out of Office (OOO) notes publicly on booking pages with a privacy toggle. This feature improves transparency and communication when users are unavailable.
Changes
Database Schema
showNotePubliclyboolean field toOutOfOfficeEntrymodel (default:falsefor backward compatibility)Backend (tRPC)
outOfOfficeCreateOrUpdatehandler to accept and saveshowNotePubliclyfieldshowNotePubliclyas optional booleannotesandshowNotePubliclyfieldsgetUserAvailabilityto propagate OOO notes and visibility through the data flowFrontend - Settings UI
Frontend - Booking Page
showNotePubliclyis enabledUse Cases
Scenario 1: OOO with Redirect
Scenario 2: OOO without Redirect