From e98a86b400e926de9a811554f99886e520c9c660 Mon Sep 17 00:00:00 2001 From: Ivan Semenov Date: Fri, 6 Feb 2026 16:17:49 +0100 Subject: [PATCH] refactor [collab]: prioritize the full name in chooser popup GitOrigin-RevId: 7a35fc1aa6f04a9fc941f439c862a2d37c155966 --- .../collaboration/ui/util/popup/popupItemRenderers.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/platform/collaboration-tools/src/com/intellij/collaboration/ui/util/popup/popupItemRenderers.kt b/platform/collaboration-tools/src/com/intellij/collaboration/ui/util/popup/popupItemRenderers.kt index 98caad58f3b7..f28426d491b8 100644 --- a/platform/collaboration-tools/src/com/intellij/collaboration/ui/util/popup/popupItemRenderers.kt +++ b/platform/collaboration-tools/src/com/intellij/collaboration/ui/util/popup/popupItemRenderers.kt @@ -25,11 +25,13 @@ class SimplePopupItemRenderer private constructor(private val presenter: (T) override fun customizeCellRenderer(list: JList, value: T, index: Int, selected: Boolean, hasFocus: Boolean) { val presentation = presenter(value) icon = presentation.icon - append(presentation.shortText) val fullText = presentation.fullText if (fullText != null) { + append(fullText) append(" ") - append(fullText, SimpleTextAttributes.GRAYED_ATTRIBUTES) + append(presentation.shortText, SimpleTextAttributes.GRAYED_ATTRIBUTES) + } else { + append(presentation.shortText) } // ColoredListCellRenderer sets null for a background in case of !selected, so it can't work with SelectablePanel