Page MenuHomePhabricator

[web] Add notification permission modal

Authored by michal on Tue, Feb 21, 9:29 AM.
Referenced Files
Unknown Object (File)
Thu, Mar 9, 1:55 PM
Unknown Object (File)
Thu, Mar 9, 11:30 AM
Unknown Object (File)
Thu, Mar 9, 1:39 AM
Unknown Object (File)
Wed, Mar 8, 2:15 PM
Unknown Object (File)
Wed, Mar 8, 11:53 AM
Unknown Object (File)
Tue, Mar 7, 10:16 PM
Unknown Object (File)
Sat, Mar 4, 8:55 PM
F400277: image.png
Fri, Feb 24, 6:51 AM



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.Tue, Feb 21, 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.Wed, Feb 22, 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