Skip to content

v0.11.0 - Layouts, Reply Callbacks, Is Online Filters and more...

Compare
Choose a tag to compare
@scopsy scopsy released this 05 Feb 11:04
· 10237 commits to next since this release
0474f24

In this release, we are very excited to introduce a lot of new improvements to some of our core features as well as completely new functionalities to help with creating better notification experiences for your users.

Let's deep dive in the new things available:

E-mail Layouts

You can now create and manage email layouts for notification templates. This feature makes it easier for you to customize the look and feel of your e-mail notifications and ensure that they are consistent across templates. Once a layout is created, you can then attach particular notifications to that layout. All the regular variables that are available on the template level will also be available when compiling the layout content.

To read more about layouts, visit our documentation page: https://docs.novu.co/platform/layouts

Is Online Filters

Really excited to share that from now you can send or not send notifications depending on the online status of the current subscriber in your system. When using the Novu notification center, we will track the current active session of the subscriber and allow filtering by its current status. You can filter by currently online, or online in the last X minutes.

Read more about it here.

Reply Callbacks with Inbound E-mail Parsing (Cloud Only)

Subscribers can now reply to e-mails you send them, similar to the behavior you might see when replying to a GitHub issue comment e-mail and your reply e-mail automagically appears as a GitHub comment.

You can enable Reply Callbacks for a particular notification template. Novu will modify the reply to the field to add a unique identifier when a subscriber replies to this e-mail. After parsing novu will call you the webhook URL defined in the template containing information about the particular notification and the e-mail contents for you to perform extra business logic for it.

Novu Starter E-mail Provider (Cloud only)

For new accounts evaluating Novu you could now have up to 300 free e-mails using the built novu provider to evaluate novu without the need to connect your SendGrid account.

Breaking changes

@novu/notification-center changes

NovuProvider:
Added the new prop initialFetchingStrategy which allows deciding about fetching strategy. By default feed notifications and user preferences are not fetched, this behavior is particularly implemented for the PopoverNotificationCenter as we don’t want to make the request for the feed before the notification center is opened, it might not be opened at all. But, sometimes it might be useful to fetch them during the hook mounting, ex. when you build custom UI components, ex. notifications list page, then you can use this prop to define that you want to fetch “right away”. Also, you can change the fetching strategy manually using the useNovuContext and setFetchingStrategy functions.

Hooks:

Changed the return interface of the useNotifications hook:

  • updateAction prop moved to a separate hook useUpdateAction
  • markAsRead renamed to markNotificationAsRead, it takes now only the messageId as the argument
  • markAllAsRead renamed to markAllNotificationsAsRead, it doesn’t require args to pass
  • markAsSeen renamed to markNotificationAsSeen, it takes now only the messageId as the argument
  • fetching renamed to isFetching
  • removed onWidgetClose and onTabChange as these props have nothing to do with this hook and they were only needed for internal use
  • added props: storeId, stores, unseenCount, isLoading, isFetchingNextPage, setStore, markAllNotificationsAsSeen

Split useSubscriberPreference into two separate hooks: useFetchUserPreferences and useUpdateUserPreferences

New hooks: useUpdateUserPreferences, useUpdateAction, useFetchNotifications, useFetchOrganization, useFeedUnseenCount, useMarkNotificationsAs

Hooks removed: useAuth, useApi, useScreens, useUnseenController - used for internal purpose

Hooks exposed: useSocket, useUnseenCount, useNotifications, useNovuContext, useNovuTheme, useNotificationCenter, useTranslations, useUpdateUserPreferences, useUpdateAction, useFetchNotifications, useFetchOrganization, useFeedUnseenCount, useFetchUserPreferences, useMarkNotificationsAs

Other notable changes

New Contributors

Full Changelog: v0.10.3...v0.11.0