Do not disturb mode

Do not disturb is here :tada:

Discourse now allows users to enter do not disturb mode (DND). While in DND, desktop notifications, push notifications, and emails are not sent until the user leaves DND mode. Notification bubbles are also hidden from the user avatar in the site header.

You can enter do not disturb for a specific time period of 30 minutes, 1 hour, 2 hours, or until the end of the day. You can also go to your notification preferences and set a daily notification schedule, and be automatically placed in DND mode during times outside of your notification schedule.

There is a button under the profile tab in the user menu which opens a modal.

Screenshot 2020-12-31 092339

Screenshot 2021-01-28 151722

Once saved, the moon icon replaces notification bubbles/counts on your avatar
3

You can cancel DND early by clicking the button again.

Screenshot 2020-12-31 092326

In your notification preferences, you will see the setting to enable a notification schedule

58 Likes

Iā€™m glad that this is built into Discourse now (not to mention that it is a much better implementation). I no longer have to rely on the one built into the operating system. Just turned it off! :slight_smile:

8 Likes

Cool feature, nicely implemented too - thanks!

One bit of feedback, could the moon icon on the avatar be a different colour? At a glance the blue moon icon looks a bit like a notification count.

May I suggest making it pale yellow, because the moon is made of cheese :slight_smile:

1 Like

Inspect the element, find the CSS selector and add the appropriate code in Admin > Customize > Theme > Edit CSS/HTML :slight_smile:

4 Likes

Ah - fair enough, I didnā€™t think I could style the SVG from the CSS, but I can always hide the original SVG and add in my cheese-coloured one in itā€™s div.

1 Like

Ha! This is interesting!

I used this for the first time today and expected the notification counter to show my pending messages when it expired. While the notifications were showing as new in the drop-down menu, the counter did not. Is that expected behavior?

3 Likes

I see what you mean; that count for non-PM notifications is cleared when you click on your avatar. When you leave DND manually, you have to click your avatar so it must be clearing the count at that point. Iā€™ll see if I can prevent that from happening :+1:

Edit: To leave DND mode you do see those notifications though, because the first pane that opens is the notifications paneā€¦ leaving the count there after you have opened the notifications pane might be more inconsistent than the current behavior.

3 Likes

Can anyone confirm what is supposed to happen if I choose None when configuring the notification schedule? I would guess that DND mode would be active on those days but Iā€™d like to be sure :slight_smile:

4 Likes

Yes, DND will be active for the entirety of the day if ā€œnoneā€ is selected.

8 Likes

Thank you for confirming that! :smiley:

4 Likes

We had the same issue. This is the CSS we added to style the moon gray (assuming default color scheme):

/* Less distracting do-not-disturb */

.do-not-disturb-background .d-icon.d-icon-moon {
    color: var(--primary-high-or-secondary-low) !important;
}
.do-not-disturb-background {
    background-color: var(--primary-med-or-secondary-high) !important;
}
4 Likes

Just a small note to say this feature was renamed to ā€˜Pause Notificationsā€™. :+1:

3 Likes