Commit dccdf8bf authored by mattgaunt's avatar mattgaunt Committed by Commit bot

Adding macOS notes on the rich notification article

BUG=715691

Review-Url: https://codereview.chromium.org/2842293002
Cr-Commit-Position: refs/heads/master@{#467690}
parent 499dce94
<h1 id="richNotifications">Rich Notifications</h1> <h1 id="richNotifications">Rich Notifications</h1>
<p class="note">
<strong>Platform difference:</strong> In Chrome version 59, notifications
appear differently for Mac OS X users. Instead of Chrome's own
notifications, users see native Mac OS X notifications.
<a href="https://developers.google.com/web/updates/2017/04/native-mac-os-notifications">Learn more in this article</a>.
</p>
<p>The <a href="https://developer.chrome.com/apps/notifications">rich notifications API</a> <p>The <a href="https://developer.chrome.com/apps/notifications">rich notifications API</a>
lets you create notifications using templates and lets you create notifications using templates and
show these notifications to users in the user's system tray: show these notifications to users in the user's system tray:
...@@ -70,6 +77,11 @@ Priorities > 0 are shown for increasing duration and ...@@ -70,6 +77,11 @@ Priorities > 0 are shown for increasing duration and
more high priority notifications can be displayed in the system tray. more high priority notifications can be displayed in the system tray.
</p> </p>
<p class="note">
<strong>Platform difference:</strong> The <code>priority</code> does not
affect the order of notifications in Chrome version 59+ on Mac OS X.
</p>
<p> <p>
In addition to displaying information, In addition to displaying information,
all notification types can include up to two action items. all notification types can include up to two action items.
...@@ -143,6 +155,11 @@ template type also includes an <code>imageUrl</code>, which is a link to ...@@ -143,6 +155,11 @@ template type also includes an <code>imageUrl</code>, which is a link to
an image that is previewed within the notification: an image that is previewed within the notification:
</p> </p>
<p class="note">
<strong>Platform difference:</strong> Images will not be display to users using
Chrome version 59+ on Mac OS X.
</p>
<pre> <pre>
var opt = { var opt = {
type: "basic", type: "basic",
...@@ -167,6 +184,11 @@ The <code>list</code> template displays <code>items</code> ...@@ -167,6 +184,11 @@ The <code>list</code> template displays <code>items</code>
in a list format: in a list format:
</p> </p>
<p class="note">
<strong>Platform difference:</strong> Only the first list item is
displayed to users in Chrome version 59+ on Mac OS X.
</p>
<pre> <pre>
var opt = { var opt = {
type: "list", type: "list",
...@@ -186,6 +208,12 @@ The <code>progress</code> template displays a progress bar where current ...@@ -186,6 +208,12 @@ The <code>progress</code> template displays a progress bar where current
progress ranges from 0 to 100: progress ranges from 0 to 100:
</p> </p>
<p class="note">
<strong>Platform difference:</strong> In Chrome version 59+ on Mac OS X, the
progress bar displays as a percentage value in the title of the notification
instead of displaying a progress bar.
</p>
<pre> <pre>
var opt = { var opt = {
type: "progress", type: "progress",
...@@ -196,7 +224,6 @@ var opt = { ...@@ -196,7 +224,6 @@ var opt = {
} }
</pre> </pre>
<h2 id="events">Listening for and responding to events</h2> <h2 id="events">Listening for and responding to events</h2>
<p> <p>
...@@ -225,4 +252,3 @@ function replyBtnClick { ...@@ -225,4 +252,3 @@ function replyBtnClick {
<a href="app_lifecycle#create_event_page">event page</a>, <a href="app_lifecycle#create_event_page">event page</a>,
so that notifications can pop-up even when the app or extension isn't running. so that notifications can pop-up even when the app or extension isn't running.
</p> </p>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment