fix: hide organizer email for collective events when enabled
What does this PR do?
Prevent displaying the email of team members in collective events if the hideOrganizerEmail setting is enabled.
- Fixes #21319
- Fixes CAL-5771 (Linear issue number - should be visible at the bottom of the GitHub issue description)
Visual Demo (For contributors especially)
Image Demo:
Before:
After:
Mandatory Tasks (DO NOT REMOVE)
- [x] I have self-reviewed the code (A decent size PR without self-review might be rejected).
- [x] N/A 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] N/A I confirm automated tests are in place that prove my fix is effective or that my feature works.
Summary by mrge
Hides team member emails in collective events when the hideOrganizerEmail setting is enabled, showing only the main attendee's email. This protects organizer privacy in group bookings.
@RajdeepDs is attempting to deploy a commit to the cal Team on Vercel.
A member of the Team first needs to authorize it.
Graphite Automations
"Add consumer team as reviewer" took an action on this PR • (05/15/25)
1 reviewer was added to this PR based on Keith Williams's automation.
"Add community label" took an action on this PR • (05/15/25)
1 label was added to this PR based on Keith Williams's automation.
This PR is being marked as stale due to inactivity.
Making the PR draft until then.
Hey @kart1ka, I have made all the requested changes. Here's the demo video: https://cap.link/gvndb94xx4jrawn
Thanks,
@RajdeepDs Pls address the cubic comments.
[!NOTE]
Other AI code review bot(s) detected
CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.
[!IMPORTANT]
Review skipped
Draft detected.
Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.
Walkthrough
The changes introduce conditional logic to hide email addresses of team members and attendees in collective or round robin events when the option to hide the organizer's email is enabled. In both the booking success view and the email component, the code now checks if the event type is "COLLECTIVE" or "ROUND_ROBIN" and if the hideOrganizerEmail flag is set. When these conditions are met, all member emails are hidden from the UI and emails. The rest of the code changes are stylistic or related to import order and do not affect functionality.
Assessment against linked issues
| Objective | Addressed | Explanation |
|---|---|---|
| Hide all member emails from collective events if the option to hide organizer's email is enabled (#21319, CAL-5771) | ✅ |
Assessment against linked issues: Out-of-scope changes
No out-of-scope changes were found.
✨ Finishing Touches
🧪 Generate unit tests
- [ ] Create PR with unit tests
- [ ] Post copyable unit tests in a comment
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.
@kart1ka Just wanted to ask a few things:
- In the first image, I saw the app is running on
http://acme.app.local:3000/. How can I use this and regenerate this issue? - In the second image, the emails are visible. Should I just hide them or replace them with a placeholder?
@kart1ka Just wanted to ask a few things:
- In the first image, I saw the app is running on
http://acme.app.local:3000/. How can I use this and regenerate this issue?- In the second image, the emails are visible. Should I just hide them or replace them with a placeholder?
acme.cal.local has nothing to do with the emails being visible. If you want to set it up you can do so by following this guide.
For the second image, yes the emails should be hidden. You can instead show the names of the hosts/organizers.
I think there are many places where we need to apply this filter, not just these two files. For eg:- bookinglistItem etc
Okay will do that
@RajdeepDs There is a type check failing. Please fix it.
any eta on this? looking forward to have this functionality
our team is super busy with major feature updates; the consumer team will accept it as soon as they get the time. thanks for your contribution though, it makes us where we are today. cheers :)