From 9500afaf1995d7c982d8cb9d414abcff4580a549 Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Fri, 19 Sep 2025 01:19:10 -0400 Subject: [PATCH] MM-63447/MM-65101 Remaining changes for deprecated registerPostDropdownMenuComponent API (#33928) Automatic Merge --- .../widgets/menu/menu_items/menu_item.scss | 3 +-- webapp/channels/src/plugins/registry.ts | 13 +++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/webapp/channels/src/components/widgets/menu/menu_items/menu_item.scss b/webapp/channels/src/components/widgets/menu/menu_items/menu_item.scss index 89db10e73d7..dee9b57f8c2 100644 --- a/webapp/channels/src/components/widgets/menu/menu_items/menu_item.scss +++ b/webapp/channels/src/components/widgets/menu/menu_items/menu_item.scss @@ -55,6 +55,7 @@ span.MenuItem__primary-text { display: inline-flex; max-width: 100%; + align-items: center; padding: 5px 0; line-height: 22px; white-space: nowrap; @@ -162,8 +163,6 @@ } .MenuItem__icon { - position: relative; - top: 4px; display: inline-flex; width: 20px; height: 20px; diff --git a/webapp/channels/src/plugins/registry.ts b/webapp/channels/src/plugins/registry.ts index 1b8850a24a1..f5348cdab1d 100644 --- a/webapp/channels/src/plugins/registry.ts +++ b/webapp/channels/src/plugins/registry.ts @@ -644,9 +644,22 @@ export default class PluginRegistry { return {id, rootRegisterMenuItem: registerMenuItem(this.id, id, undefined, text, action, filter)}; }); + warnedAboutRegisterPostDropdownMenuComponent = false; + // Register a component at the bottom of the post dropdown menu. // Accepts a React component. Returns a unique identifier. registerPostDropdownMenuComponent = reArg(['component'], ({component}: DPluginComponentProp) => { + if (!this.warnedAboutRegisterPostDropdownMenuComponent) { + // eslint-disable-next-line no-console + console.warn( + `${this.id}: This plugin is using registerPostDropdownMenuComponent which is deprecated in Mattermost ` + + 'v11.0. That API will be removed in a future release, and plugins that use it may not work correctly. ' + + 'Please update the plugin to use registerPostDropdownMenuAction instead. See ' + + 'https://forum.mattermost.com/t/deprecating-a-post-dropdown-menu-component-plugin-api-v11/25001 for ' + + 'more information.', + ); + this.warnedAboutRegisterPostDropdownMenuComponent = true; + } return dispatchPluginComponentAction('PostDropdownMenuItem', this.id, component); });