Messages section for sidebar

@nathank asked for an option to change the order of group inboxes in the sidebar. I previously asked for ideas on how to best approach this in Configuring the order of groups in theme component settings, and I think I’ve now arrived at a solution.
I combined this with the request to display a group’s full name instead of its short name. Since the full name isn’t easily available in this context, the solution is to allow admins to define a custom display name instead. The field that previously would have only been used to display the group’s name in the configuration is now also used to control the name shown in the sidebar.

Both features are handled via the new advanced_group_inbox_configuration setting.

In this setting you can:

  • select a group from a dropdown
  • optionally define a custom name that will be shown in the sidebar
  • reorder the configured groups using the buttons at the bottom

The custom name is also helpful inside the setting itself.
If no name is provided, the entry will be labeled as group 1, group 2, etc. (based on its position). Adding a temporary name can make reordering easier, and you can remove it again before saving if you like.

Groups with messages that are not added to the advanced configuration will still appear in the sidebar, listed after the configured ones and ordered by their group ID.
Groups listed in the hide_group_inboxes setting will always be hidden, regardless of whether they are also present in the advanced configuration or have messages.


In this example, no custom name was entered for the moderator group, which is why it appears as group 1 in the configuration. The other groups have custom names.

This configuration results in:


Here you can see that the ‘doggo-daily’ and ‘cat_pics’ inboxes have switched positions and are displayed without hyphens or underscores. The ‘Team’ inbox appears below the ones configured in the advanced setting.
You can also see an admin-only warning, which appears because the ‘admin’ group was added to the advanced configuration and to the hide_group_inboxes setting at the same time.

4 Likes