Messages section for sidebar

:information_source: Summary Adds personal and group message inbox links to the sidebar, including unread message indicators
:eyeglasses: Preview Theme Creator
:hammer_and_wrench: Repository GitHub - moin-Jana/sidebar-messages-section: Adds personal and group message inbox links to the sidebar, including unread message indicators.
:question: Install Guide How to install a theme or theme component
:open_book: New to Discourse Themes? Beginner’s guide to using Discourse Themes

Install this theme component

The component adds a Messages section to the sidebar with links to personal message inboxes - both the user’s personal inbox and any group inboxes they have access to. The section also includes a button for composing a new personal message next to the section heading.

Personal inbox

By default, the component adds a link to the personal inbox for all users. With the show_personal_inbox setting, admins can also hide it entirely or show it only for users who are allowed to create PMs based on the Personal message enabled groups site setting. This mirrors how the personal inbox link appears in the notifications menu, the user’s profile, and the Community section of the sidebar.

:bulb: To avoid duplicate links to the personal inbox, you may want to remove the messages link in the first section of the sidebar.

Group inboxes

All group inboxes that contain at least one message and that the user is a member of will appear automatically in their sidebar. Admins can hide specific group inboxes using the hide_group_inboxes setting, which can be useful when a group inbox is no longer actively used.

Unread indicator

Each inbox link shows the current message state based on the user’s preference for “Show a count of the new items”: either a dot or the numeric count. Values above 100 are displayed as 99+.

5 Likes

wow, nicely done Moin! :clap: :tada:

2 Likes

Minor suggestion: perhaps javascripts/discourse/api-initializers/group-inboxes-in-sidebar.gjs should be a JS file instead of GJS?

Great component!


I spent the last 10 minutes looking through the code and examining core classes and I must say how remarkable Discourse was (and is) made such that everything fits in so well.