Thread Titles
Important Links
Figma Prototype (see sidebar for different parts of the experience) |
Introduction
This proposal introduces the ability to give a title to a thread to help keep organized and to better identify conversations.
Optional thread titles
This functionality will be introduced as an optional element and will not be mandatory.
Available in CRT and non-CRT
This feature will be available for all users of Mattermost whether they are using CRT or not.
Composing a new thread with a title
When creating a new message in a channel, DM or GM, users can include a thread title while composing their message.
Using markdown headings at the start of a message
If a message starts with a markdown heading (using either # heading
, ## heading
, or ### heading
), it will be treated as the thread title.
Thread title Character limit
Thread titles are limited to 128 characters.
A few exceptions:
When migrating existing posts that start with heading tags, this limit cannot be imposed
When typing a heading using normal markdown (not using the explicit thread title button), this limit cannot be imposed
Adding the thread title option to the message input formatting bar
The thread title feature will be added as the left-most control in the message formatting bar. This is only available when the formatting bar is expanded, not when collapsed.
When the thread title is toggled ON, a title element is added to the input field
The message input container expands and animates upward to accommodate for the title.
While typing in the thread title, disable formatting controls that aren’t supported
While users are typing in the thread title field, Bold, Heading, Quote, Bulleted List and Numbered List controls should be disabled. See below for more details on what is supported within the thread title.
Autocomplete support within thread titles
Within titles, we should allow support for autocomplete mentions, channels, emojis, but not slash commands.
Markdown formatting support within thread titles
Titles should support the following markdown:
Links
Emojis
Mentions
Italic
Strikethrough
Inline Code
The following will not be supported:
Bold
Tables
Bulleted Lists
Numbered Lists
Quotes
Code Blocks
Images
Horizontal Rules
Adding a title to an existing untitled thread
Only the users with edit permission on the post can edit or add a title to the thread.
Existing messages that start with markdown headings
When the thread titles feature is released, messages that start with markdown heading tags (using # heading
, ## heading
, or ### heading
) will be automatically converted to thread titles and displayed as such in the channel, thread and threads inbox (see notes that follow for how titles display).
Add a title through the Edit message
option in the ••• menu of a root post
If a user is editing an existing root post, the formatting bar should be available with the ability to edit or add the thread title.
Add a title through the Add a thread title
option in the ••• menu on a root post in the center channel.
For threads that have already been posted to a channel, DM, or GM, users can add a title after the fact. A new menu item to Add a thread title
is added to any root post above the Edit message
option.
This option is only available for users with access to edit the post.
NOTE: this menu item changes to Edit thread title
if a title has already been added.
Add a title through the More actions
menu on a root post in the thread RHS, and the threads view
Similar to the center channel more actions menu for a root post, the Add a thread title
option also displays above the Edit message
option in the menu.
Again, this option is only available for users with access to edit the post.
This option can be accessed through the more actions menu in the following contexts:
The ••• menu on a root post (Channel context)
The ••• menu on a root post (RHS context)
The ••• menu on a root post in the thread view (Threads context)
The ••• menu in the header of the thread view (Threads context)
NOTE: this menu item changes to Edit thread title
if a title has already been added.
Editing the title inline - channel
Once ‘Add a thread title’ is selected from the ••• menu:
a title input is added to the thread post
the cursor is focused at the beginning of the input with a ‘Thread title’ placeholder.
Once the user types a title the placeholder is replaced with what is typed,
ENTER
saves the change,ESC
cancels. Typing and then clicking outside of the title area also will save the change.
Editing the title inline - RHS or Threads view
Once ‘Add a thread title’ is selected from the ••• menu, the thread is scrolled to the top and the thread header is focused on the thread title with a ‘Thread title’ placeholder until the user types. Once the user types a title, ENTER
saves the change, ESC
cancels. Typing and then clicking outside of the title area also will save the change.
States of an editable thread title
Editing a thread title when one already exists
Thread titles are only editable for users with permission to edit the root post
If a thread title already exists there are a few ways to edit it:
Hovering over the title and clicking in to edit
Choosing ‘Edit thread title’ from the ••• menu on a root post
Choosing ‘Edit thread title’ from the ••• menu in the Threads View header.
Choosing ‘Edit message’ from the ••• menu on a root post which will open up the entire message to be edited with the title in place.
How the thread title displays
In the channel context
In the channel context, when a thread is titled, the title is displayed above the main message content and the post.
The post is identified as a thread even through it may not have replies yet. If there are no replies, the thread footer still shows with ‘No replies’ displayed and the follow button visible.
In the thread RHS
In the RHS context, when a thread has a title, a new thread intro is added to the top of the thread RHS view with an enlarged icon and title. The root post’s layout is slightly altered as well to show the avatar/name and time stamp above the message content and a divider below the message to identify it as the root message.
In addition:
A ••• icon displays in the top-right corner
This opens the existing thread options menu
A reply count icon button displays next to the ••• button
If there are no replies, this is hidden
If there are replies, show the count of replies
If there thread is followed and there are unread replies, show the unread dot next to the count indicator
Collapsed sticky header in thread view
If the user is scrolled down and the thread header is out of view, a collapsed header displays with the thread title.
Clicking this header bar will scroll the user to the top of the thread.
Untitled threads sticky header
If a thread is untitled, the sticky header will not show, but a dismissable banner will display prompting the user to to give the thread a title.
Clicking the banner will scroll to the top of the thread, add the thread title input and autofocus on editing it.
If the user doesn’t have access to edit the thread title, there will be no sticky header or prompt displayed at all.
In the Threads Inbox list
Threads with titles show the thread title under the author.
The title will be truncated - hovering over truncated titles will display the full title in a tooltip
Untitled threads display as they currently do - using the author as the title. No change to existing thread that don’t have titles (for now).
In the Thread view
A thread title displays the same way as it does in the RHS thread view in the intro.
Title is displayed in full in this context - not truncated.
Collapsed sticky header in thread view
If it is a long thread, the thread title displays in a sticky header. This sticky header only shows if the user is scrolled below the thread title intro area.
In this context, the title is truncated to a single line. Hovering over it should reveal the title in full in a tooltip (only if it is getting truncated).
Clicking this sticky header bar will scroll the user to the top of the thread.
Untitled threads sticky header
If a thread is untitled, the sticky header will not show when scrolled down below the root post, but a dismissable banner will display prompting the user to to give the thread a title.
Clicking the banner will scroll to the top of the thread, add the thread title input and autofocus on editing it.
If the user doesn’t have access to edit the thread title, there will be no sticky header or prompt displayed at all.
In recent mentions, saved messages, pinned messages and search results
In these contexts, the thread title displays similarly to how it displays in the channel context adding the large thread title above the username.
Thread titles should be indexed for search results
When using the global search, thread titles should be searchable and highlighted in the search results. Order of priority to be determined.
Mobile app experience
See the experience documented and designed in this figma file.
Onboarding the new feature
Message Input Tour Point with NEW badge
Once this feature is released, when the text formatting bar is open for the first time, an automatic tour point opens drawing attention to the thread title feature.
Menu item NEW badge
In addition to the tour point, a NEW badge is added to the menu item for adding a title. We could consider removing the ‘NEW’ badge once a user has successfully added/edited a thread title. Or we could make this a time-based badge.