-
Notifications
You must be signed in to change notification settings - Fork 111
Docs for the inbox Schedule page #976
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
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
f86683d
Docs for the inbox Schedule page
Aviatorscode2 abd6e8e
Upate styling docs with Schdedule feature
Aviatorscode2 83b6862
Update content/docs/platform/inbox/features/schedule.mdx
Aviatorscode2 4b5d63e
Create docs for the useSchedule in React SDK
Aviatorscode2 660e41f
Update content/docs/platform/inbox/configuration/styling.mdx
Aviatorscode2 bb90827
Update content/docs/platform/inbox/features/schedule.mdx
Aviatorscode2 5215bd9
Update content/docs/platform/inbox/features/schedule.mdx
Aviatorscode2 c5146c8
Update content/docs/platform/sdks/react/hooks/use-schedule.mdx
Aviatorscode2 9f99551
Update base on feedback
Aviatorscode2 a2b5aeb
Merge branch 'MRK-1057' of https://github.com/novuhq/docs into MRK-1057
Aviatorscode2 44eb74e
Update content/docs/platform/inbox/features/schedule.mdx
Aviatorscode2 cc21935
Update the docs for JS SDK
Aviatorscode2 22ac35f
Merge branch 'MRK-1057' of https://github.com/novuhq/docs into MRK-1057
Aviatorscode2 87dcbe6
Update based on feedback
Aviatorscode2 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| { | ||
| "title": "Customize and configure", | ||
| "icon": "SlidersHorizontal", | ||
| "pages": ["styling", "icons", "tabs", "preferences", "snooze", "data-object"], | ||
| "pages": ["styling", "icons", "tabs", "preferences", "data-object"], | ||
| "description": "Learn how to configure your inbox with styling, tabs, preferences, data objects, and snooze functionality" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| { | ||
| "title": "<Inbox /> Features", | ||
| "icon": "Blocks", | ||
| "pages": ["snooze", "schedule"], | ||
| "description": "Learn how to customize the appearance and behavior of the inbox component to match your application’s design system." | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| --- | ||
| title: 'Schedule' | ||
| description: "Learn how subscribers can use the Schedule feature in the Inbox component to control when they receive notifications from email, SMS and push channels." | ||
| icon: 'CalendarCheck' | ||
| --- | ||
|
|
||
| The **Schedule** feature in the <Method href="/platform/inbox/overview">{`<Inbox />`}</Method> lets subscribers control when they want to receive notifications from email, SMS, and push channels. | ||
|
|
||
| By defining their hours of availability from the <Method href="/platform/inbox/overview">{`<Inbox />`}</Method> UI, subscribers can automatically skip notifications outside of their chosen time range. | ||
|
|
||
|  | ||
|
|
||
| <Callout>In-app notifications and notifications from critical workflows are never paused and will always be delivered, regardless of schedule settings.</Callout> | ||
|
|
||
| ## How scheduling works | ||
|
|
||
| The schedule functionality is based on a clear set of rules controlled by the subscriber within the <Method href="/platform/inbox/overview">{`<Inbox />`}</Method>. When a subscriber enables their schedule, they can then manage their availability for each day of the week. | ||
|
|
||
| ### Daily availability | ||
| For any day that the main schedule is active, there will be two possible states: | ||
|
|
||
| - **Day is enabled**: If a day is toggled on, then the subscriber must set a time range. Notifications will only be delivered within these hours. | ||
|
|
||
| - **Day is disabled**: If a day is toggled off, then the subscriber will not receive any non-critical notifications for that entire day. | ||
|
|
||
| ### Automatic timezone handling | ||
|
|
||
| The schedule operates in the subscriber's local timezone, detected automatically from their system settings. There is no need for manual configuration. | ||
|
|
||
| For example, if a subscriber in Warsaw sets their schedule from 9:00 AM to 5:00 PM, they will receive notifications during those hours in Central European Time (CET). | ||
|
|
||
| ## Manage Schedule | ||
Aviatorscode2 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| The schedule UI in the preferences section is designed to be intuitive, giving subscribers several tools to quickly configure their availability. | ||
|
|
||
| You can access **Schedule** from the **Preferences** section of the <Method href="/platform/inbox/overview">{`<Inbox />`}</Method> UI. By default, scheduling is turned off, and all notifications will be delivered normally. | ||
|
|
||
|  | ||
|
|
||
| ### Enable the main schedule | ||
|
|
||
| The entire feature is controlled by a main schedule toggle. When a subscriber turns this on, they can begin configuring individual days. When it's off, all other settings will be inactive, and notifications will be delivered normally. | ||
|
|
||
| ### Setting daily availability | ||
|
|
||
| For each day of the week, the subscriber can: | ||
|
|
||
| - Use the toggle next to the day's name to activate or deactivate it. | ||
| - If activated, use the time-selector menus to set a "from" and "to" time. The time pickers are set to 30-minute increments for ease of use. | ||
|
|
||
| ### Edit or remove schedules | ||
|
|
||
| Existing availability can be adjusted at any time. Subscribers can: | ||
| - Change the start and end times for a day. | ||
| - Re-enable a previously disabled day. | ||
| - Clear a schedule entirely to return to unrestricted delivery. | ||
|
|
||
| ### Copying times to multiple days | ||
|
|
||
| To make setup faster, subscribers can configure the time for one day and apply it to others in a few clicks: | ||
|
|
||
| 1. Set the desired time range for a single day. | ||
| 2. Click **Copy times to...** associated with that day. | ||
| 3. In the menu that appears, select the other days of the week to apply this schedule to. | ||
| 4. Click "Apply." The selected days will automatically be enabled and updated with the new time range. | ||
|
|
||
|  | ||
|
|
||
| ### Automatic saving | ||
|
|
||
| All changes made in the schedule interface will be saved automatically in the background. The UI updates optimistically, providing a seamless experience without requiring the subscriber to click save. | ||
|
|
||
| ## Set default schedule for Subscribers | ||
|
|
||
| You can provide a default schedule for your subscribers by passing the `defaultSchedule` prop to the <Method href="/platform/inbox/overview">{`<Inbox />`}</Method>. This is useful for pre-configuring a recommended schedule that your subscribers can then customize. | ||
|
|
||
| This default schedule only applies if a subscriber has not yet configured their own schedule. Once they make any changes, their custom schedule takes precedence. | ||
|
|
||
| ```tsx | ||
| import { Inbox } from '@novu/react'; | ||
|
|
||
| function InboxWithDefaultSchedule() { | ||
| return ( | ||
| <Inbox | ||
| applicationIdentifier="YOUR_APP_IDENTIFIER" | ||
| subscriberId="YOUR_SUBSCRIBER_ID" | ||
| defaultSchedule={{ | ||
| isEnabled: true, | ||
| weeklySchedule: { | ||
| tuesday: { | ||
| isEnabled: true, | ||
| hours: [{start: '09:00 AM', end: '07:00 PM'}] | ||
| } | ||
| } | ||
| }} | ||
| /> | ||
| ); | ||
| } | ||
|
|
||
| export default InboxWithDefaultSchedule; | ||
| ``` | ||
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,10 @@ | ||
| { | ||
| "pages": ["novu-provider", "use-novu", "use-notifications", "use-counts", "use-preferences"] | ||
| "pages": [ | ||
| "novu-provider", | ||
| "use-novu", | ||
| "use-notifications", | ||
| "use-counts", | ||
| "use-preferences", | ||
| "use-schedule" | ||
| ] | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.