Page MenuHomePhabricator

[web] Add notification permission modal

Authored by michal on Feb 21 2023, 9:29 AM.
Referenced Files
Unknown Object (File)
Tue, Nov 21, 3:08 AM
Unknown Object (File)
Thu, Nov 16, 11:32 AM
Unknown Object (File)
Wed, Nov 15, 5:01 AM
Unknown Object (File)
Tue, Nov 14, 8:08 PM
Unknown Object (File)
Tue, Nov 14, 8:07 PM
Unknown Object (File)
Oct 3 2023, 8:13 PM
Unknown Object (File)
Sep 11 2023, 4:53 PM
Unknown Object (File)
Sep 1 2023, 7:22 PM



Adds a simple modal that asks for permission to display notifications. If user hasn't blocked the notifs yet we will request permission from the browser. If we get it we will then create a new subscription. The modal will be used in the laters diffs.

Test Plan

Check that the user is correctly asked for a permission and the subscription is correctly created.

image.png (454×984 px, 36 KB)

Diff Detail

rCOMM Comm
Lint Not Applicable
Tests Not Applicable

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Feb 21 2023, 9:43 AM
Harbormaster failed remote builds in B16716: Diff 22870!

Can you add a screenshot to the Test Plan?

1 ↗(On Diff #22922)

Nit: we always have a newline after this

11 ↗(On Diff #22922)

Should this be wrapped in React.memo? Otherwise I think it will always re-render whenever App rerenders

This revision is now accepted and ready to land.Feb 22 2023, 11:23 AM

Add newline and react memo.

ashoat added inline comments.
57 ↗(On Diff #23061)

Usually we export default we are not planning to export something else from the file. We can always update it later