User notification mechanism and notification center

1C Developer team

12.11.2017 15 minutes

We have improved the user notification mechanism. From now on, it’s convenient to use in both thin client and web client. We have changed the way the notifications look and added some new features.

Displaying several notifications at a time

In the old version, the screen would display only one notification at a time. New notifications would overlap older ones, meaning that if a user received several notifications in a row, he or she was likely to miss an earlier notification.

Now up to three notifications can be displayed at the same time.

681fdc33d1c7b2da6c6c6ce8f8eac48b.png

This is true for both thin and thick clients and also for the web client running in Internet Explorer and Google Chrome. It is possible to display an unlimited number of notifications in Safari and Mozilla FirefoxMicrosoft Edge shows only the latest notification but has an Action Center, which duplicates all notifications.

Displaying notifications when the application window is inactive

In earlier 1C:Enterprise versions, web client users used to receive notifications only in the active browser window. If they switched to a different window or application, they couldn’t see incoming notifications. Now web client users can see notifications on their screens even when the application window is minimized or inactive.

When the ShowUserNotification() method is first called in the web client in Google ChromeMozilla Firefox, or Safari, the browser asks for the user’s permission to send him or her notifications. The user may choose to enable or disable notifications for this application.

2c2b4c66b7fc76ceb8fd11f276461009.png

If the user chooses to disable the notifications, a new type of notification will be used, however, these will be displayed inside the browser window.

Notification center

To prevent notifications from getting permanently lost, we have introduced a notification center and added a new notification feature–UserNotificationStatus. There are two statuses available: Information and Important.

Notifications tagged as Information appear on the screen and disappear in 10 seconds (4 seconds in Microsoft Edge). Important notifications behave in the same way but are backed up in the notification center.

The notification center can be accessed from the Tools panel. When a new Important notification arrives, an orange dot appears next to the notification icon.

503b763258d9cbf7f932287013cd7a96.png

The notification center displays important notifications the user hasn’t reacted to yet by closing them or acting on them. Notifications are stored in chronological order, the newer ones are closer to the top. This means that even if the user leaves his or her computer, he or she will not miss the important notifications.

2ebcac19809b98191507bca7509e217a.png

A notification can be deleted by pressing the clear button. If the notification requires a certain action, the user can clear it by clicking the notification text. The Clear notifications command deletes all notifications from the list, including those that required certain actions, without performing them.

Actions initiated by clicking notifications

In earlier 1C:Enterprise versions, the only thing a user could do by clicking the notification followed the URL. It was the method’s second parameter.

ShowUserNotification(<Text>,  <URL>, …

We have expanded notification capabilities so that the second parameter could include not only a URL string but also a text describing the notification.

ShowUserNotification(<Text>,  <ActionOnClick>, …

The text describes the procedure that should be performed when the user clicks on the notification.

615f7b496b8b6dcff61340d9d1c60edf.png

Appearance

In the thin client, the style of the notifications in the Taxi interface mode will be as similar as possible to Google Chrome notifications with the Notifications API enabled.

8ce8bb5c2b1541ddd26648400449b5a6.png

If the Version 8.2 interface is used, the style and behavior of the notifications will remain the same.

In the web client, the appearance of the notifications depends on the browser. Generally speaking, the notifications will look the same as they do in a thin client, but there might be differences since every browser has its own specifics. Below is an example of what the same notifications look like in Internet Explorer and Mozilla Firefox.

549287ed20c2128e5a3113ff06f6884a.png

Among other specifics, the Internet Explorer browser supports only notifications displayed inside the application window, while Safari doesn't support the Picture parameter and displays notifications at the top of the screen.
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.