What’s changing?
Beginning in Mattermost v11 (estimated in October 2025), we’re removing the registerPostDropdownMenuComponent
hook in the web app’s plugin API in favour of having them use registerPostDropdownMenuAction
instead.
Why are we making this change?
As part of our efforts to improve accessibility in the web app, we want to make controls in Mattermost such as menus follow standard patterns. That’s not currently possible in the post plugin menu due to the way that registerPostDropdownMenuComponent
works, and we’re unable to fix that without breaking changes.
Who may be affected?
If you use any Mattermost plugins which add items to the post menu, you may need to upgrade them to a new version if they use the now-deprecated registerPostDropdownMenuComponent
. If you maintain your own plugins, you will need to update them to use registerPostDropdownMenuAction
.
What do you need to do as a server operator?
If you use any of the following plugins, you will need to upgrade those plugins to new versions which will be available by the time Mattermost v11 releases:
If you use any community-supported plugins which use this feature, you will need to either ensure that they use registerPostDropdownMenuAction
or upgrade to a version that uses that API once such a version becomes available.
For both Mattermost-supported and community-supported plugins, you’re free to upgrade to new versions of plugins as soon as they become available as the new API is supported as far back as v7.10.
What do you need to do as a plugin maintainer?
If you maintain your own plugins which use this feature, you will need to migrate them from using the registerPostDropdownMenuComponent
to registerPostDropdownMenuAction
. An example of the required changes are below, although additional styling changes may also be needed.
// Before
function MyMenuItem({postId}) {
const post = useSelector((state) => getPost(state, postId));
if (isSystemMessage(post)) {
return null;
}
return (
<li>
<button onClick={() => myMenuClick(postId)}>
<MyIcon/>
{'My Menu Item'}
</button>
</li>
);
}
class Plugin {
initialize(registry, store) {
registry.registerPostDropdownMenuComponent(MyMenuItem);
}
}
// After
function MyMenuItem({postId}) {
return (
<>
<MyIcon/>
{'My Menu Item'}
</>
);
}
class Plugin {
initialize(registry, store) {
registry.registerPostDropdownMenuAction({
text: MyMenuItem,
action: (postId) => {
myMenuClick(postId);
},
filter: (postId) => {
const post = getPost(store.getState(), postId);
return post && !isSystemMessage(post);
},
});
}
}
There’s no additional work required if you wish to maintain compatibility with older versions of Mattermost. registerPostDropdownMenuAction
has been supported since v7.10.