feat: add custom calendar event description #25486
What does this PR do?
This PR implements the "Custom calendar event description" feature, allowing users to customize the description text that appears in calendar events created upon booking.
Key Changes:
-
Database: Added
calendarEventDescriptionfield to theEventTypemodel. -
Frontend:
- Added a new setting in the Advanced tab of Event Types to enable custom calendar descriptions.
- Implemented
CustomCalendarDescriptionModalwhich provides a UI to draft the description with support for dynamic variables (e.g.,{Scheduler},{Organiser},{Location}) and real-time preview.
-
Backend:
- Updated
CalendarManagerandCalEventParserto prioritize the custom description template (if set) over the default auto-generated rich description. - Implemented variable substitution logic for the calendar description, reusing the existing
getEventNamelogic.
- Updated
-
Fixes #25486 (GitHub issue number)
-
Fixes CAL-6839 (Linear issue number - should be visible at the bottom of the GitHub issue description)
Visual Demo (For contributors especially)
A visual demonstration is strongly recommended, for both the original and new change (video / image - any one).
Image Demo (if applicable):
Mandatory Tasks (DO NOT REMOVE)
- [x] I have self-reviewed the code (A decent size PR without self-review might be rejected).
- [x] 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.
- [x] I confirm automated tests are in place that prove my fix is effective or that my feature works.
How should this be tested?
- Setup: Ensure you have an Event Type created.
- Configuration:
- Navigate to the Advanced tab of the Event Type settings.
- Locate the Calendar event description section.
- Click the pencil icon/edit button to open the customization modal.
- Enter a custom description using available variables (e.g., "Meeting with {Scheduler} about {Event type title}").
- Save the Event Type.
- Booking Flow:
- Book a slot for this Event Type.
- On the booking success page, click on one of the "Add to Calendar" icons (e.g., Google Calendar).
- Verification:
- This will open the calendar provider with the event details pre-filled.
- Expected: Verify that the event description in the calendar view matches your custom template with variables replaced by actual values.
- Fallback Test: Clear the custom description and verify the system falls back to the default rich description behavior.
@jadhavharshh 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:
No release type found in pull request title " feat: add custom calendar event description #25486". Add a prefix to indicate what kind of release this pull request corresponds to. For reference, see https://www.conventionalcommits.org/
Available types:
- feat: A new feature
- fix: A bug fix
- docs: Documentation only changes
- style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
- refactor: A code change that neither fixes a bug nor adds a feature
- perf: A code change that improves performance
- test: Adding missing tests or correcting existing tests
- build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
- ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
- chore: Other changes that don't modify src or test files
- revert: Reverts a previous commit
This PR has been marked as stale due to inactivity. If you're still working on it or need any help, please let us know or update the PR to keep it active.