Skip to content
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

Update html5.markdown to add the silent parameter #36936

Merged
merged 1 commit into from
Jan 17, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions source/_integrations/html5.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ data:

#### Data

Any parameters that you pass in the notify payload that aren't valid for use in the HTML5 notification (`actions`, `badge`, `body`, `dir`, `icon`, `image`, `lang`, `renotify`, `requireInteraction`, `tag`, `timestamp`, `vibrate`, `priority`, `ttl`) will be sent back to you in the [callback events](#automating-notification-events).
Any parameters that you pass in the notify payload that aren't valid for use in the HTML5 notification (`actions`, `badge`, `body`, `dir`, `icon`, `image`, `lang`, `renotify`, `requireInteraction`, `tag`, `timestamp`, `vibrate`, `priority`, `ttl`, `silent`) will be sent back to you in the [callback events](#automating-notification-events).
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Document the purpose and usage of the silent parameter.

While the silent parameter has been added to the lists, its functionality is not documented. Consider adding a section under "Overrides" that explains:

  • The purpose of the silent parameter
  • Expected values (boolean?)
  • Effect on notifications
  • Example usage

Example addition:

#### Silent Notifications

You can make a notification silent by setting the `silent` parameter in the data dictionary:

```yaml
title: Front door
message: The front door is open
data:
  silent: true

Would you like me to help draft the complete documentation for the `silent` parameter?

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 LanguageTool</summary>

[grammar] ~86-~86: There seems to be a noun/verb agreement error. Did you mean “isn't” or “wasn't”?
Context: ...hat you pass in the notify payload that aren't valid for use in the HTML5 notification...

(SINGULAR_NOUN_AGREEMENT_WHO_DONT)

</details>

</details>

<!-- This is an auto-generated comment by CodeRabbit -->


```yaml
title: Front door
Expand Down Expand Up @@ -195,7 +195,7 @@ Common event payload parameters are:
| Parameter | Description |
| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `action` | The `action` key that you set when sending the notification of the action clicked. Only appears in the `clicked` event. |
| `data` | The data dictionary you originally passed in the notify payload, minus any parameters that were added to the HTML5 notification (`actions`, `badge`, `body`, `dir`, `icon`, `image`, `lang`, `renotify`, `requireInteraction`, `tag`, `timestamp`, `vibrate`). |
| `data` | The data dictionary you originally passed in the notify payload, minus any parameters that were added to the HTML5 notification (`actions`, `badge`, `body`, `dir`, `icon`, `image`, `lang`, `renotify`, `requireInteraction`, `tag`, `timestamp`, `vibrate`, `silent`). |
| `tag` | The unique identifier of the notification. Can be overridden when sending a notification to allow for replacing existing notifications. |
| `target` | The target that this notification callback describes. |
| `type` | The type of event callback received. Can be `received`, `clicked` or `closed`. |
Expand Down
Loading