-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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: sound on browser push notification #18548
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Skipped Deployments
|
|
||
import { useEffect, useRef } from "react"; | ||
|
||
export function NotificationSoundHandler() { |
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.
This is required to load the audio as soon as user interacts with our site.
}; | ||
self.registration.showNotification(notification.title, options); | ||
}); | ||
const title = notificationData.title || "New Cal.com Notification"; |
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.
The service worker would trigger notification and send message to play sound if notification type is instant meetings
{/* TODO: temporary hide push notifications {props.heading === "Bookings" && buttonToShow && ( | ||
<Button | ||
color="primary" | ||
onClick={buttonToShow === ButtonState.ALLOW ? enableNotifications : disableNotifications} | ||
loading={isLoading} | ||
disabled={buttonToShow === ButtonState.DENIED} | ||
tooltipSide="bottom" | ||
tooltip={ | ||
buttonToShow === ButtonState.DENIED ? t("you_have_denied_notifications") : undefined | ||
}> | ||
{t( | ||
buttonToShow === ButtonState.DISABLE | ||
? "disable_browser_notifications" | ||
: "allow_browser_notifications" | ||
)} | ||
</Button> | ||
)} */} |
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.
I created a new page for this setting. I don't think we should display this in /bookings page like before
Graphite Automations"Add consumer team as reviewer" took an action on this PR • (01/16/25)1 reviewer was added to this PR based on Keith Williams's automation. "Add ready-for-e2e label" took an action on this PR • (03/08/25)1 label was added to this PR based on Keith Williams's automation. |
This PR is being marked as stale due to inactivity. |
This PR is being marked as stale due to inactivity. |
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.
LGTM
Let me fix the conflicts |
00d1295
to
45eaeb1
Compare
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.
LGTM
What does this PR do?
Mandatory Tasks (DO NOT REMOVE)
How should this be tested?
Browser push notifications would only work with https url so use this command ngrok http 3000
Go to /settings/my-account/push-notifications and click on allow notification and make sure you have enabled notification for your browser in system settings.
Create an org team event type with instant booking enabled
Go to booking page and click on 'Connect Now' modal and book meeting.
You should have gotten a push notification with a ringing sound