-
Notifications
You must be signed in to change notification settings - Fork 42
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: new @ng-web-apis/notification
package (Notification API)
#123
Conversation
Visit the preview URL for this PR (updated for commit f9958a5): https://ng-web-apis-common--pr123-notification-api-bz7qli26.web.app (expires Wed, 11 Oct 2023 13:12:19 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: a9d81cd8541a1a45fa12e730c551222bb3d5ceb9 |
Codecov Report
@@ Coverage Diff @@
## main #123 +/- ##
==========================================
- Coverage 89.29% 88.93% -0.36%
==========================================
Files 201 194 -7
Lines 1186 1112 -74
Branches 128 119 -9
==========================================
- Hits 1059 989 -70
+ Misses 103 100 -3
+ Partials 24 23 -1
Flags with carried forward coverage won't be shown. Click here to find out more. see 7 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
98fcbc3
to
aa56784
Compare
} | ||
|
||
/** | ||
* TODO: replace deprecated callback with promise after Safari 15+ support |
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.
Safari 16 supports Permissions API so I think we can just keep it here until 16 and drop this method completely after that.
We need a demo example showing all the notification options: I also wonder if it's possible to create a declarative directive, something like: <notification *ngIf="open" (close)="open = false">
Text content
<button icon="src" (click)="onClick()">
Action
</button>
</notification> Not sure about actual "tags" inside, but it would be nice to be able to listen to actions in the same manner we listen to clicks on buttons. |
There are examples with inline replies here, not mentioned on MDN: |
6798568
to
b90a2b5
Compare
@ng-web-apis/notification
package (Notification API)@ng-web-apis/notification
package (Notification API)
apps/demo/src/app/pages/notification/examples/02-create-notification/index.ts
Outdated
Show resolved
Hide resolved
apps/demo/src/app/pages/notification/examples/03-close-notification/index.html
Outdated
Show resolved
Hide resolved
apps/demo/src/app/pages/notification/examples/03-close-notification/index.ts
Outdated
Show resolved
Hide resolved
apps/demo/src/app/pages/notification/examples/03-close-notification/index.ts
Outdated
Show resolved
Hide resolved
apps/demo/src/app/pages/notification/examples/04-listen-notification-events/index.ts
Outdated
Show resolved
Hide resolved
apps/demo/src/app/pages/notification/examples/02-create-notification/index.ts
Outdated
Show resolved
Hide resolved
…notifications` / `permissions`
…pt` and `filterPermission` rxjs-operator
6795ca8
to
f9958a5
Compare
PR Type
What kind of change does this PR introduce?
Partially solves #96