Skip to content

Conversation

@Udit-takkar
Copy link
Contributor

@Udit-takkar Udit-takkar commented Jan 9, 2025

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).
  • 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.
  • N/A I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

Browser push notifications would only work with https url so use this command ngrok http 3000

  1. 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.

  2. Create an org team event type with instant booking enabled

  3. Go to booking page and click on 'Connect Now' modal and book meeting.

You should have gotten a push notification with a ringing sound

@keithwillcode keithwillcode added core area: core, team members only enterprise area: enterprise, audit log, organisation, SAML, SSO labels Jan 9, 2025
@vercel
Copy link

vercel bot commented Jan 9, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Visit Preview Mar 10, 2025 3:49pm
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview Mar 10, 2025 3:49pm

@linear
Copy link

linear bot commented Jan 16, 2025

@Udit-takkar Udit-takkar changed the title feat: sound on notification feat: sound on browser push notification Jan 16, 2025

import { useEffect, useRef } from "react";

export function NotificationSoundHandler() {
Copy link
Contributor Author

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.

https://developer.chrome.com/blog/autoplay

};
self.registration.showNotification(notification.title, options);
});
const title = notificationData.title || "New Cal.com Notification";
Copy link
Contributor Author

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

Comment on lines -199 to -214
{/* 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>
)} */}
Copy link
Contributor Author

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

@Udit-takkar Udit-takkar marked this pull request as ready for review January 16, 2025 20:00
@graphite-app graphite-app bot requested a review from a team January 16, 2025 20:01
@graphite-app
Copy link

graphite-app bot commented Jan 16, 2025

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.

@dosubot dosubot bot added ui area: UI, frontend, button, form, input ✨ feature New feature or request labels Jan 16, 2025
@github-actions
Copy link
Contributor

This PR is being marked as stale due to inactivity.

@github-actions github-actions bot added the Stale label Jan 31, 2025
@dosubot dosubot bot modified the milestones: v5.0, v5.1 Feb 17, 2025
@CarinaWolli CarinaWolli modified the milestones: v5.0, v5.1 Feb 17, 2025
@github-actions github-actions bot removed the Stale label Feb 18, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2025

This PR is being marked as stale due to inactivity.

@github-actions github-actions bot added the Stale label Mar 4, 2025
Copy link
Member

@alishaz-polymath alishaz-polymath left a comment

Choose a reason for hiding this comment

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

LGTM

@Udit-takkar
Copy link
Contributor Author

Let me fix the conflicts

Copy link
Member

@alishaz-polymath alishaz-polymath left a comment

Choose a reason for hiding this comment

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

LGTM

@Udit-takkar Udit-takkar merged commit b0125e1 into main Mar 11, 2025
45 of 46 checks passed
@Udit-takkar Udit-takkar deleted the feat/ringtone branch March 11, 2025 06:19
ThyMinimalDev pushed a commit that referenced this pull request Mar 13, 2025
* feat: sound on notification

* refactor: add load audio

* chore: remove

* fix: type error

* fix: notification

* fix: prevent multiple initialization
=

* feat: create notification page

* chore: update the mp3 file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core area: core, team members only enterprise area: enterprise, audit log, organisation, SAML, SSO ✨ feature New feature or request High priority Created by Linear-GitHub Sync organizations area: organizations, orgs ready-for-e2e ui area: UI, frontend, button, form, input webhooks area: webhooks, callback, webhook payload

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CAL-4113] instant meetings: browser notification and ring tone when calling

5 participants