Saturday, February 20, 2021

Push Notifications - Disabling the Notification Badge

I saw a question on a forum where someone wanted to disable the push notifications badge from showing the incremental counter.

What is the Notification Badge? It is the counter on the notification icon which indicates any new notifications that were pushed to the client/users.

Why would we want to disable this? Yes, that is a good question. It is hard enough to setup and ensure that Push Notifications is functional, so I would not touch anything if you ever get the badge to increment properly! 😉

That aside, let's say we have a valid reason to remove the counter. Maybe we decided to not interrupt our users and just let them view their notifications on their own accord (i.e., the next time they make a request to the server).

My first thought was that we could simply disable this at the app server configuration level.
PeopleBooks: Configuring an App Server Domain for Push Notifications 

However, this would only stop the server from sending 'push' notifications to the client using WebSockets. This would not stop the counter from displaying when the client/users initiate a request (such as initial login and subsequent actions within the application).

Note: In PeopleTools 8.58, the web profile custom property EnablePNSubscriptions is no longer used. Refer: Understanding Push Notification Configuration

Option 1

Looking for other options, I stumbled upon a PeopleTools Personalization that is new in 8.58.
Refer: Adding PeopleTools Option to Disable and Re-enable Push Notifications

This works great! Easy to setup online (no need to reboot any domains) and effectively stops the notification badge counter from displaying all together. The beauty about this approach is that we could either setup the default option as true or false (i.e., enabled/disabled) at a system level and let users (with appropriate access) to personalize this option via 'My Preferences' at an individual level.

Option 2

The other idea I had was to simply hide the badge using CSS.


CSS

For the sake of a proof of concept, I made the following update to the delivered CSS object - PSBASE_A_STYLES.

This is another option to achieve the same result at a system level.

3 comments:

  1. Hi Sashank,
    What PeopleSoft Role/Permission List drives Hiding or Unhiding the Push Notification Badge

    Our Business Requirment is to Hide Push Notification Bell Icon for Non Admin users..
    Do you have any insights please advise

    ReplyDelete
    Replies
    1. Refer following document on MOS:
      E-PORTAL/FLUID: What Controls the Security Access to the NavBar, Action List, and Add to Notification Icons on Fluid Header? (Doc ID 1953574.1)

      Delete
    2. Thanks Sasank.. Figured out a way to do this.. Just thought might be helpfull for others..
      Create New Permission List
      Add new Menu Item PTPNEVENTS
      Give access to PTPN_POPUP_WINDOW and PTPN_SEEALL Components - That helped me to Control Display of Push Notification Badge via Permission List that I created..

      Delete